lkml.org 
[lkml]   [2014]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] audit: add arch field to seccomp event log
Date
On Tuesday, February 18, 2014 03:50:44 PM Richard Guy Briggs wrote:
> > missing '=' but this isn't what audit_get_context() does... it's
> > crappy naming... I'd think a combo of audit_dummy_context() and
> > current->audit_context would be most appropriate.
>
> Ok. I think I finally understand audit_dummy_context(). Thanks for the
> hint. However, it appears it is not useful in this sitation, since if
> there is an audit_context, even a dummy context, it appears arch is
> filled in.
>
> diff --git a/kernel/auditsc.c b/kernel/auditsc.c
> @@ -2406,12 +2406,18 @@ void audit_core_dumps(long signr)
> void __audit_seccomp(unsigned long syscall, long signr, int code)
> {
> struct audit_buffer *ab;
> + struct audit_context *context = current->audit_context;
>
> ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_SECCOMP);
> if (unlikely(!ab))
> return;
> audit_log_task(ab);
> audit_log_format(ab, " sig=%ld", signr);
> + audit_log_format(ab, " arch=");
> + if (context)
> + audit_log_format(ab, "%x", context->arch);
> + else
> + audit_log_format(ab, "(null)");
> audit_log_format(ab, " syscall=%ld", syscall);
> audit_log_format(ab, " compat=%d", is_compat_task());
> audit_log_format(ab, " ip=0x%lx", KSTK_EIP(current));

Is there anything that could be passed by the caller that might identify the
syscall ABI when this call was blocked? '(null)' still makes syscall number
uninterpretable.

-Steve


\
 
 \ /
  Last update: 2014-02-18 23:01    [W:0.076 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site