summaryrefslogtreecommitdiffstats
path: root/arch/ppc64
diff options
context:
space:
mode:
authorAndrea Arcangeli2005-06-24 07:00:45 +0200
committerLinus Torvalds2005-06-24 09:05:18 +0200
commit7286aa9b9ab35f20b1ff16d867f4535701df99b5 (patch)
treec816ea0350a0f0c7ac503c6020a6ea5398a59ee4 /arch/ppc64
parentMerge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 (diff)
downloadkernel-qcow2-linux-7286aa9b9ab35f20b1ff16d867f4535701df99b5.tar.gz
kernel-qcow2-linux-7286aa9b9ab35f20b1ff16d867f4535701df99b5.tar.xz
kernel-qcow2-linux-7286aa9b9ab35f20b1ff16d867f4535701df99b5.zip
[PATCH] ppc64: fix seccomp with 32-bit userland
The seccomp check has to happen when entering the syscall and not when exiting it or regs->gpr[0] contains garabge during signal handling in ppc64_rt_sigreturn (this actually might be a bug too, but an orthogonal one, since we really have to run the check before invoking the syscall and not after it). Signed-off-by: Andrea Arcangeli <andrea@cpushare.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc64')
-rw-r--r--arch/ppc64/kernel/ptrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/ppc64/kernel/ptrace.c b/arch/ppc64/kernel/ptrace.c
index 9f8c6087ae56..2993f108d96d 100644
--- a/arch/ppc64/kernel/ptrace.c
+++ b/arch/ppc64/kernel/ptrace.c
@@ -305,6 +305,8 @@ static void do_syscall_trace(void)
void do_syscall_trace_enter(struct pt_regs *regs)
{
+ secure_computing(regs->gpr[0]);
+
if (test_thread_flag(TIF_SYSCALL_TRACE)
&& (current->ptrace & PT_PTRACED))
do_syscall_trace();
@@ -320,8 +322,6 @@ void do_syscall_trace_enter(struct pt_regs *regs)
void do_syscall_trace_leave(struct pt_regs *regs)
{
- secure_computing(regs->gpr[0]);
-
if (unlikely(current->audit_context))
audit_syscall_exit(current,
(regs->ccr&0x1000)?AUDITSC_FAILURE:AUDITSC_SUCCESS,