]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'stable-4.8' of git://git.infradead.org/users/pcmoore/audit
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 30 Jul 2016 00:54:17 +0000 (17:54 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 30 Jul 2016 00:54:17 +0000 (17:54 -0700)
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

1  2 
arch/s390/kernel/ptrace.c
kernel/audit.c
kernel/audit.h
kernel/auditsc.c

index cea17010448feaff4b4443e1a2fa7a6584e66ea5,defc0dca4510c7c7e4b9d8f7bc73786cdeb1788e..9336e824e2db5e119810b438c8c0e272487937b4
@@@ -821,6 -821,16 +821,8 @@@ long compat_arch_ptrace(struct task_str
  
  asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
  {
 -      long ret = 0;
+       unsigned long mask = -1UL;
 -      /* Do the secure computing check first. */
 -      if (secure_computing()) {
 -              /* seccomp failures shouldn't expose any additional code. */
 -              ret = -1;
 -              goto out;
 -      }
 -
        /*
         * The sysc_tracesys code in entry.S stored the system
         * call number to gprs[2].
        if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
                trace_sys_enter(regs, regs->gprs[2]);
  
-       audit_syscall_entry(regs->gprs[2], regs->orig_gpr2,
-                           regs->gprs[3], regs->gprs[4],
-                           regs->gprs[5]);
+       if (is_compat_task())
+               mask = 0xffffffff;
+       audit_syscall_entry(regs->gprs[2], regs->orig_gpr2 & mask,
 -                          regs->gprs[3] & mask, regs->gprs[4] & mask,
 -                          regs->gprs[5] & mask);
 -out:
 -      return ret ?: regs->gprs[2];
++                          regs->gprs[3] &mask, regs->gprs[4] &mask,
++                          regs->gprs[5] &mask);
 +
 +      return regs->gprs[2];
  }
  
  asmlinkage void do_syscall_trace_exit(struct pt_regs *regs)
diff --cc kernel/audit.c
Simple merge
diff --cc kernel/audit.h
Simple merge
Simple merge