summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/traps.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2018-09-18 10:56:25 +0200
committerEric W. Biederman <ebiederm@xmission.com>2018-09-21 15:52:43 +0200
commit5d8fb8a58659098a845235f08c1f69de0c96297c (patch)
tree74072d4c1cb24cc216f16fc4ac480371a86191d5 /arch/powerpc/kernel/traps.c
parentc1c7c85ceafe5a96c4d5fc648ff42a7102838dd7 (diff)
downloadlinux-5d8fb8a58659098a845235f08c1f69de0c96297c.tar.bz2
signal/powerpc: Specialize _exception_pkey for handling pkey exceptions
Now that _exception no longer calls _exception_pkey it is no longer necessary to handle any signal with any si_code. All pkey exceptions are SIGSEGV with paired with SEGV_PKUERR. So just handle that case and remove the now unnecessary parameters from _exception_pkey. Reviewed-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch/powerpc/kernel/traps.c')
-rw-r--r--arch/powerpc/kernel/traps.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index c38bec51dd84..e5ea69222459 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -362,20 +362,20 @@ static bool exception_common(int signr, struct pt_regs *regs, int code,
return true;
}
-void _exception_pkey(int signr, struct pt_regs *regs, int code, unsigned long addr, int key)
+void _exception_pkey(struct pt_regs *regs, unsigned long addr, int key)
{
siginfo_t info;
- if (!exception_common(signr, regs, code, addr))
+ if (!exception_common(SIGSEGV, regs, SEGV_PKUERR, addr))
return;
clear_siginfo(&info);
- info.si_signo = signr;
- info.si_code = code;
+ info.si_signo = SIGSEGV;
+ info.si_code = SEGV_PKUERR;
info.si_addr = (void __user *) addr;
info.si_pkey = key;
- force_sig_info(signr, &info, current);
+ force_sig_info(info.si_signo, &info, current);
}
void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)