diff options
author | David Woodhouse <dwmw2@infradead.org> | 2005-11-18 09:43:54 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-03-20 14:08:54 -0500 |
commit | ee436dc46a762f430e37952d375a23d87735f73f (patch) | |
tree | 3fde296efe8da60dff929e2891bff22bf46fe771 /arch/ia64 | |
parent | 7306a0b9b3e2056a616c84841288ca2431a05627 (diff) |
[PATCH] Fix IA64 success/failure indication in syscall auditing.
Original 2.6.9 patch and explanation from somewhere within HP via
bugzilla...
ia64 stores a success/failure code in r10, and the return value (normal
return, or *positive* errno) in r8. The patch also sets the exit code to
negative errno if it's a failure result for consistency with other
architectures.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/kernel/ptrace.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c index eaed14aac6aa..9887c8787e7a 100644 --- a/arch/ia64/kernel/ptrace.c +++ b/arch/ia64/kernel/ptrace.c | |||
@@ -1656,8 +1656,14 @@ syscall_trace_leave (long arg0, long arg1, long arg2, long arg3, | |||
1656 | long arg4, long arg5, long arg6, long arg7, | 1656 | long arg4, long arg5, long arg6, long arg7, |
1657 | struct pt_regs regs) | 1657 | struct pt_regs regs) |
1658 | { | 1658 | { |
1659 | if (unlikely(current->audit_context)) | 1659 | if (unlikely(current->audit_context)) { |
1660 | audit_syscall_exit(current, AUDITSC_RESULT(regs.r10), regs.r8); | 1660 | int success = AUDITSC_RESULT(regs.r10); |
1661 | long result = regs.r8; | ||
1662 | |||
1663 | if (success != AUDITSC_SUCCESS) | ||
1664 | result = -result; | ||
1665 | audit_syscall_exit(current, success, result); | ||
1666 | } | ||
1661 | 1667 | ||
1662 | if (test_thread_flag(TIF_SYSCALL_TRACE) | 1668 | if (test_thread_flag(TIF_SYSCALL_TRACE) |
1663 | && (current->ptrace & PT_PTRACED)) | 1669 | && (current->ptrace & PT_PTRACED)) |