aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-09-22 04:32:45 -0400
committerPaul Mackerras <paulus@samba.org>2006-09-26 01:24:34 -0400
commit94983cb7881dff760d724759105a6f67935b571d (patch)
treed288981c3aec3c5a0b976c4a3cfb6f10e95ab031 /arch/powerpc/kernel
parent4b9c876a812fd3e2b17e2d1c94082ee4cf31608f (diff)
[POWERPC] Fix PPC32 SECCOMP, unexport do_syscall_trace_{enter,leave}
The secure_computing() call which automatically aborts a process if it tries to execute a syscall it shouldn't is much more useful if we actually do it _before_ the syscall, rather than afterwards. PPC64 got this right, but the original incorrect behaviour inherited from arch/ppc was preserved by ifdefs. Make it the same on PPC32 too. Also, I see no need to export do_syscall_trace_{leave,enter} on ppc32 -- they were only exported because the old do_syscall_trace() (which they replaced) used to be. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/ptrace.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index cf1d1bc49261..975102a020d9 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -526,9 +526,7 @@ static void do_syscall_trace(void)
526 526
527void do_syscall_trace_enter(struct pt_regs *regs) 527void do_syscall_trace_enter(struct pt_regs *regs)
528{ 528{
529#ifdef CONFIG_PPC64
530 secure_computing(regs->gpr[0]); 529 secure_computing(regs->gpr[0]);
531#endif
532 530
533 if (test_thread_flag(TIF_SYSCALL_TRACE) 531 if (test_thread_flag(TIF_SYSCALL_TRACE)
534 && (current->ptrace & PT_PTRACED)) 532 && (current->ptrace & PT_PTRACED))
@@ -548,10 +546,6 @@ void do_syscall_trace_enter(struct pt_regs *regs)
548 546
549void do_syscall_trace_leave(struct pt_regs *regs) 547void do_syscall_trace_leave(struct pt_regs *regs)
550{ 548{
551#ifdef CONFIG_PPC32
552 secure_computing(regs->gpr[0]);
553#endif
554
555 if (unlikely(current->audit_context)) 549 if (unlikely(current->audit_context))
556 audit_syscall_exit((regs->ccr&0x10000000)?AUDITSC_FAILURE:AUDITSC_SUCCESS, 550 audit_syscall_exit((regs->ccr&0x10000000)?AUDITSC_FAILURE:AUDITSC_SUCCESS,
557 regs->result); 551 regs->result);
@@ -561,8 +555,3 @@ void do_syscall_trace_leave(struct pt_regs *regs)
561 && (current->ptrace & PT_PTRACED)) 555 && (current->ptrace & PT_PTRACED))
562 do_syscall_trace(); 556 do_syscall_trace();
563} 557}
564
565#ifdef CONFIG_PPC32
566EXPORT_SYMBOL(do_syscall_trace_enter);
567EXPORT_SYMBOL(do_syscall_trace_leave);
568#endif