diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-01-13 20:38:18 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-01-24 05:13:58 -0500 |
commit | cfcd1705b61ecce1ab102b9593cf733fef314a19 (patch) | |
tree | 26ec97215dc25ae897af278a79b1f37303ff35a3 /arch/powerpc/kernel/ptrace.c | |
parent | 0e47e3cca100e7c8e8124378e4e44969c2e042fd (diff) |
[POWERPC] Mask 32-bit system call arguments to 32 bits on PPC64 in audit code
The system call entry code will clear the high bits of argument
registers before invoking the system call; don't report whatever noise
happens to be in the high bits of the register before that happens.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/ptrace.c')
-rw-r--r-- | arch/powerpc/kernel/ptrace.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 975102a020d9..cc44c7b975aa 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -532,16 +532,22 @@ void do_syscall_trace_enter(struct pt_regs *regs) | |||
532 | && (current->ptrace & PT_PTRACED)) | 532 | && (current->ptrace & PT_PTRACED)) |
533 | do_syscall_trace(); | 533 | do_syscall_trace(); |
534 | 534 | ||
535 | if (unlikely(current->audit_context)) | 535 | if (unlikely(current->audit_context)) { |
536 | audit_syscall_entry( | 536 | #ifdef CONFIG_PPC64 |
537 | #ifdef CONFIG_PPC32 | 537 | if (!test_thread_flag(TIF_32BIT)) |
538 | AUDIT_ARCH_PPC, | 538 | audit_syscall_entry(AUDIT_ARCH_PPC64, |
539 | #else | 539 | regs->gpr[0], |
540 | test_thread_flag(TIF_32BIT)?AUDIT_ARCH_PPC:AUDIT_ARCH_PPC64, | 540 | regs->gpr[3], regs->gpr[4], |
541 | regs->gpr[5], regs->gpr[6]); | ||
542 | else | ||
541 | #endif | 543 | #endif |
542 | regs->gpr[0], | 544 | audit_syscall_entry(AUDIT_ARCH_PPC, |
543 | regs->gpr[3], regs->gpr[4], | 545 | regs->gpr[0], |
544 | regs->gpr[5], regs->gpr[6]); | 546 | regs->gpr[3] & 0xffffffff, |
547 | regs->gpr[4] & 0xffffffff, | ||
548 | regs->gpr[5] & 0xffffffff, | ||
549 | regs->gpr[6] & 0xffffffff); | ||
550 | } | ||
545 | } | 551 | } |
546 | 552 | ||
547 | void do_syscall_trace_leave(struct pt_regs *regs) | 553 | void do_syscall_trace_leave(struct pt_regs *regs) |