summaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-07-09 00:48:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-09 00:48:15 -0400
commit5ad18b2e60b75c7297a998dea702451d33a052ed (patch)
treec47fb503b4cfc8d3e99ad425aadede9832e96dc4 /arch/alpha
parent92c1d6522135050cb377a18cc6e30d08dfb87efb (diff)
parent318759b4737c3b3789e2fd64d539f437d52386f5 (diff)
Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
Pull force_sig() argument change from Eric Biederman: "A source of error over the years has been that force_sig has taken a task parameter when it is only safe to use force_sig with the current task. The force_sig function is built for delivering synchronous signals such as SIGSEGV where the userspace application caused a synchronous fault (such as a page fault) and the kernel responded with a signal. Because the name force_sig does not make this clear, and because the force_sig takes a task parameter the function force_sig has been abused for sending other kinds of signals over the years. Slowly those have been fixed when the oopses have been tracked down. This set of changes fixes the remaining abusers of force_sig and carefully rips out the task parameter from force_sig and friends making this kind of error almost impossible in the future" * 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (27 commits) signal/x86: Move tsk inside of CONFIG_MEMORY_FAILURE in do_sigbus signal: Remove the signal number and task parameters from force_sig_info signal: Factor force_sig_info_to_task out of force_sig_info signal: Generate the siginfo in force_sig signal: Move the computation of force into send_signal and correct it. signal: Properly set TRACE_SIGNAL_LOSE_INFO in __send_signal signal: Remove the task parameter from force_sig_fault signal: Use force_sig_fault_to_task for the two calls that don't deliver to current signal: Explicitly call force_sig_fault on current signal/unicore32: Remove tsk parameter from __do_user_fault signal/arm: Remove tsk parameter from __do_user_fault signal/arm: Remove tsk parameter from ptrace_break signal/nds32: Remove tsk parameter from send_sigtrap signal/riscv: Remove tsk parameter from do_trap signal/sh: Remove tsk parameter from force_sig_info_fault signal/um: Remove task parameter from send_sigtrap signal/x86: Remove task parameter from send_sigtrap signal: Remove task parameter from force_sig_mceerr signal: Remove task parameter from force_sig signal: Remove task parameter from force_sigsegv ...
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/kernel/signal.c4
-rw-r--r--arch/alpha/kernel/traps.c2
-rw-r--r--arch/alpha/mm/fault.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c
index 33e904a05881..a813020d2f11 100644
--- a/arch/alpha/kernel/signal.c
+++ b/arch/alpha/kernel/signal.c
@@ -225,7 +225,7 @@ do_sigreturn(struct sigcontext __user *sc)
225 return; 225 return;
226 226
227give_sigsegv: 227give_sigsegv:
228 force_sig(SIGSEGV, current); 228 force_sig(SIGSEGV);
229} 229}
230 230
231asmlinkage void 231asmlinkage void
@@ -253,7 +253,7 @@ do_rt_sigreturn(struct rt_sigframe __user *frame)
253 return; 253 return;
254 254
255give_sigsegv: 255give_sigsegv:
256 force_sig(SIGSEGV, current); 256 force_sig(SIGSEGV);
257} 257}
258 258
259 259
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c
index bc9627698796..f6b9664ac504 100644
--- a/arch/alpha/kernel/traps.c
+++ b/arch/alpha/kernel/traps.c
@@ -402,7 +402,7 @@ do_entDbg(struct pt_regs *regs)
402{ 402{
403 die_if_kernel("Instruction fault", regs, 0, NULL); 403 die_if_kernel("Instruction fault", regs, 0, NULL);
404 404
405 force_sig_fault(SIGILL, ILL_ILLOPC, (void __user *)regs->pc, 0, current); 405 force_sig_fault(SIGILL, ILL_ILLOPC, (void __user *)regs->pc, 0);
406} 406}
407 407
408 408
diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c
index 188fc9256baf..741e61ef9d3f 100644
--- a/arch/alpha/mm/fault.c
+++ b/arch/alpha/mm/fault.c
@@ -221,13 +221,13 @@ retry:
221 up_read(&mm->mmap_sem); 221 up_read(&mm->mmap_sem);
222 /* Send a sigbus, regardless of whether we were in kernel 222 /* Send a sigbus, regardless of whether we were in kernel
223 or user mode. */ 223 or user mode. */
224 force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *) address, 0, current); 224 force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *) address, 0);
225 if (!user_mode(regs)) 225 if (!user_mode(regs))
226 goto no_context; 226 goto no_context;
227 return; 227 return;
228 228
229 do_sigsegv: 229 do_sigsegv:
230 force_sig_fault(SIGSEGV, si_code, (void __user *) address, 0, current); 230 force_sig_fault(SIGSEGV, si_code, (void __user *) address, 0);
231 return; 231 return;
232 232
233#ifdef CONFIG_ALPHA_LARGE_VMALLOC 233#ifdef CONFIG_ALPHA_LARGE_VMALLOC