audit: tie SECCOMP records to syscall
authorRichard Guy Briggs <rgb@redhat.com>
Thu, 31 May 2018 20:27:24 +0000 (16:27 -0400)
committerPaul Moore <paul@paul-moore.com>
Tue, 19 Jun 2018 14:26:59 +0000 (10:26 -0400)
Since seccomp events are triggered by user activity, tie the SECCOMP
record to the syscall record to collect all records from the same event.

See: https://github.com/linux-audit/audit-kernel/issues/87

Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/auditsc.c

index ceb1c45..fefb9e2 100644 (file)
@@ -2485,7 +2485,7 @@ void audit_seccomp(unsigned long syscall, long signr, int code)
 {
        struct audit_buffer *ab;
 
-       ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_SECCOMP);
+       ab = audit_log_start(audit_context(), GFP_KERNEL, AUDIT_SECCOMP);
        if (unlikely(!ab))
                return;
        audit_log_task(ab);