Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal

Pull assorted signal-related fixes from Al Viro:
"uml regression fix (braino in sys_execve() patch) + a bunch of fucked
sigaltstack-on-rt_sigreturn uses, similar to sparc64 fix that went in
through davem's tree. m32r horrors not included - that one's waiting
for maintainer."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal:
microblaze: rt_sigreturn is too trigger-happy about sigaltstack errors
score: do_sigaltstack() expects a userland pointer...
sh64: fix altstack switching on sigreturn
openrisk: fix altstack switching on sigreturn
um: get_safe_registers() should be done in flush_thread(), not start_thread()

+9 -15
+1 -1
arch/microblaze/kernel/signal.c
··· 111 111 112 112 /* It is more difficult to avoid calling this function than to 113 113 call it and ignore errors. */ 114 - if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->r1)) 114 + if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->r1) == -EFAULT) 115 115 goto badframe; 116 116 117 117 return rval;
+2 -4
arch/openrisc/kernel/signal.c
··· 84 84 { 85 85 struct rt_sigframe *frame = (struct rt_sigframe __user *)regs->sp; 86 86 sigset_t set; 87 - stack_t st; 88 87 89 88 /* 90 89 * Since we stacked the signal on a dword boundary, ··· 103 104 if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) 104 105 goto badframe; 105 106 106 - if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st))) 107 - goto badframe; 108 107 /* It is more difficult to avoid calling this function than to 109 108 call it and ignore errors. */ 110 - do_sigaltstack(&st, NULL, regs->sp); 109 + if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->sp) == -EFAULT) 110 + goto badframe; 111 111 112 112 return regs->gpr[11]; 113 113
+2 -5
arch/score/kernel/signal.c
··· 148 148 { 149 149 struct rt_sigframe __user *frame; 150 150 sigset_t set; 151 - stack_t st; 152 151 int sig; 153 152 154 153 /* Always make any pending restarted system calls return -EINTR */ ··· 167 168 else if (sig) 168 169 force_sig(sig, current); 169 170 170 - if (__copy_from_user(&st, &frame->rs_uc.uc_stack, sizeof(st))) 171 - goto badframe; 172 - 173 171 /* It is more difficult to avoid calling this function than to 174 172 call it and ignore errors. */ 175 - do_sigaltstack((stack_t __user *)&st, NULL, regs->regs[0]); 173 + if (do_sigaltstack(&frame->rs_uc.uc_stack, NULL, regs->regs[0]) == -EFAULT) 174 + goto badframe; 176 175 regs->is_syscall = 0; 177 176 178 177 __asm__ __volatile__(
+2 -4
arch/sh/kernel/signal_64.c
··· 347 347 { 348 348 struct rt_sigframe __user *frame = (struct rt_sigframe __user *) (long) REF_REG_SP; 349 349 sigset_t set; 350 - stack_t __user st; 351 350 long long ret; 352 351 353 352 /* Always make any pending restarted system calls return -EINTR */ ··· 364 365 goto badframe; 365 366 regs->pc -= 4; 366 367 367 - if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st))) 368 - goto badframe; 369 368 /* It is more difficult to avoid calling this function than to 370 369 call it and ignore errors. */ 371 - do_sigaltstack(&st, NULL, REF_REG_SP); 370 + if (do_sigaltstack(&frame->uc.uc_stack, NULL, REF_REG_SP) == -EFAULT) 371 + goto badframe; 372 372 373 373 return (int) ret; 374 374
+2 -1
arch/um/kernel/exec.c
··· 32 32 "err = %d\n", ret); 33 33 force_sig(SIGKILL, current); 34 34 } 35 + get_safe_registers(current_pt_regs()->regs.gp, 36 + current_pt_regs()->regs.fp); 35 37 36 38 __switch_mm(&current->mm->context.id); 37 39 } 38 40 39 41 void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) 40 42 { 41 - get_safe_registers(regs->regs.gp, regs->regs.fp); 42 43 PT_REGS_IP(regs) = eip; 43 44 PT_REGS_SP(regs) = esp; 44 45 current->ptrace &= ~PT_DTRACE;