mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 03:53:37 +02:00
parisc: Fix signal code to depend on CONFIG_COMPAT instead of CONFIG_64BIT
The signal handler code used CONFIG_64BIT to decide if compat handling code should be compiled in. Fix it to use CONFIG_COMPAT instead. This allows to disable CONFIG_COMPAT even when running a 64-bit kernel. Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
b5d5faba0f
commit
7dc9ee6e5e
|
|
@ -80,7 +80,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
|
|||
sigset_t set;
|
||||
unsigned long usp = (regs->gr[30] & ~(0x01UL));
|
||||
unsigned long sigframe_size = PARISC_RT_SIGFRAME_SIZE;
|
||||
#ifdef CONFIG_64BIT
|
||||
#ifdef CONFIG_COMPAT
|
||||
struct compat_rt_sigframe __user * compat_frame;
|
||||
|
||||
if (is_compat_task())
|
||||
|
|
@ -96,7 +96,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
|
|||
|
||||
regs->orig_r28 = 1; /* no restarts for sigreturn */
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
#ifdef CONFIG_COMPAT
|
||||
compat_frame = (struct compat_rt_sigframe __user *)frame;
|
||||
|
||||
if (is_compat_task()) {
|
||||
|
|
@ -112,7 +112,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
|
|||
set_current_blocked(&set);
|
||||
|
||||
/* Good thing we saved the old gr[30], eh? */
|
||||
#ifdef CONFIG_64BIT
|
||||
#ifdef CONFIG_COMPAT
|
||||
if (is_compat_task()) {
|
||||
DBG(1, "%s: compat_frame->uc.uc_mcontext 0x%p\n",
|
||||
__func__, &compat_frame->uc.uc_mcontext);
|
||||
|
|
@ -218,13 +218,13 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs,
|
|||
unsigned long haddr, sigframe_size;
|
||||
unsigned long start;
|
||||
int err = 0;
|
||||
#ifdef CONFIG_64BIT
|
||||
#ifdef CONFIG_COMPAT
|
||||
struct compat_rt_sigframe __user * compat_frame;
|
||||
#endif
|
||||
|
||||
|
||||
usp = (regs->gr[30] & ~(0x01UL));
|
||||
sigframe_size = PARISC_RT_SIGFRAME_SIZE;
|
||||
#ifdef CONFIG_64BIT
|
||||
#ifdef CONFIG_COMPAT
|
||||
if (is_compat_task()) {
|
||||
/* The gcc alloca implementation leaves garbage in the upper 32 bits of sp */
|
||||
usp = (compat_uint_t)usp;
|
||||
|
|
@ -239,7 +239,7 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs,
|
|||
if (start >= TASK_SIZE_MAX - sigframe_size)
|
||||
return -EFAULT;
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
#ifdef CONFIG_COMPAT
|
||||
|
||||
compat_frame = (struct compat_rt_sigframe __user *)frame;
|
||||
|
||||
|
|
@ -349,8 +349,8 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs,
|
|||
|
||||
regs->gr[2] = rp; /* userland return pointer */
|
||||
regs->gr[26] = ksig->sig; /* signal number */
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
if (is_compat_task()) {
|
||||
regs->gr[25] = A(&compat_frame->info); /* siginfo pointer */
|
||||
regs->gr[24] = A(&compat_frame->uc); /* ucontext pointer */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user