aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-07-29 20:54:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-29 20:54:17 -0400
commit797cee982eef9195736afc5e7f3b8f613c41d19a (patch)
tree2baf2ada982bb1c2cbe058b1378e38272cbda5d3 /arch/s390/kernel
parent7a1e8b80fb1e8ead4cec15d1fc494ed290e4d2e9 (diff)
parent43761473c254b45883a64441dd0bc85a42f3645c (diff)
Merge branch 'stable-4.8' of git://git.infradead.org/users/pcmoore/audit
Pull audit updates from Paul Moore: "Six audit patches for 4.8. There are a couple of style and minor whitespace tweaks for the logs, as well as a minor fixup to catch errors on user filter rules, however the major improvements are a fix to the s390 syscall argument masking code (reviewed by the nice s390 folks), some consolidation around the exclude filtering (less code, always a win), and a double-fetch fix for recording the execve arguments" * 'stable-4.8' of git://git.infradead.org/users/pcmoore/audit: audit: fix a double fetch in audit_log_single_execve_arg() audit: fix whitespace in CWD record audit: add fields to exclude filter by reusing user filter s390: ensure that syscall arguments are properly masked on s390 audit: fix some horrible switch statement style crimes audit: fixup: log on errors from filter user rules
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/ptrace.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
index cea17010448f..9336e824e2db 100644
--- a/arch/s390/kernel/ptrace.c
+++ b/arch/s390/kernel/ptrace.c
@@ -821,6 +821,8 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
821 821
822asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) 822asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
823{ 823{
824 unsigned long mask = -1UL;
825
824 /* 826 /*
825 * The sysc_tracesys code in entry.S stored the system 827 * The sysc_tracesys code in entry.S stored the system
826 * call number to gprs[2]. 828 * call number to gprs[2].
@@ -846,9 +848,12 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
846 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) 848 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
847 trace_sys_enter(regs, regs->gprs[2]); 849 trace_sys_enter(regs, regs->gprs[2]);
848 850
849 audit_syscall_entry(regs->gprs[2], regs->orig_gpr2, 851 if (is_compat_task())
850 regs->gprs[3], regs->gprs[4], 852 mask = 0xffffffff;
851 regs->gprs[5]); 853
854 audit_syscall_entry(regs->gprs[2], regs->orig_gpr2 & mask,
855 regs->gprs[3] &mask, regs->gprs[4] &mask,
856 regs->gprs[5] &mask);
852 857
853 return regs->gprs[2]; 858 return regs->gprs[2];
854} 859}