diff options
author | Will Deacon <will.deacon@arm.com> | 2012-09-07 13:20:30 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-09-19 16:50:50 -0400 |
commit | ebb5e15c3eb942c047108063423d5d6a04b9f167 (patch) | |
tree | 373a08dafd6406c4e2dd2eafe872f00c03703c96 /arch/arm | |
parent | 1f66e06fb6414732bef7bf4a071ef76a837badec (diff) |
ARM: 7525/1: ptrace: use updated syscall number for syscall auditing
When tracing system calls, a debugger may change the syscall number
in response to a SIGTRAP on syscall entry.
This patch ensures that the new syscall number is passed to the audit
code.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/kernel/ptrace.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index c382d3c76ac6..739db3a1b2d2 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -944,19 +944,19 @@ static int ptrace_syscall_trace(struct pt_regs *regs, int scno, | |||
944 | 944 | ||
945 | asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno) | 945 | asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno) |
946 | { | 946 | { |
947 | int ret = ptrace_syscall_trace(regs, scno, PTRACE_SYSCALL_ENTER); | 947 | scno = ptrace_syscall_trace(regs, scno, PTRACE_SYSCALL_ENTER); |
948 | if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) | 948 | if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) |
949 | trace_sys_enter(regs, ret); | 949 | trace_sys_enter(regs, scno); |
950 | audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0, regs->ARM_r1, | 950 | audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0, regs->ARM_r1, |
951 | regs->ARM_r2, regs->ARM_r3); | 951 | regs->ARM_r2, regs->ARM_r3); |
952 | return ret; | 952 | return scno; |
953 | } | 953 | } |
954 | 954 | ||
955 | asmlinkage int syscall_trace_exit(struct pt_regs *regs, int scno) | 955 | asmlinkage int syscall_trace_exit(struct pt_regs *regs, int scno) |
956 | { | 956 | { |
957 | int ret = ptrace_syscall_trace(regs, scno, PTRACE_SYSCALL_EXIT); | 957 | scno = ptrace_syscall_trace(regs, scno, PTRACE_SYSCALL_EXIT); |
958 | if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) | 958 | if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) |
959 | trace_sys_exit(regs, ret); | 959 | trace_sys_exit(regs, scno); |
960 | audit_syscall_exit(regs); | 960 | audit_syscall_exit(regs); |
961 | return ret; | 961 | return scno; |
962 | } | 962 | } |