]> git.karo-electronics.de Git - karo-tx-linux.git/commit
audit: add arch field to seccomp event log
authorRichard Guy Briggs <rgb@redhat.com>
Wed, 29 Jan 2014 21:17:58 +0000 (16:17 -0500)
committerEric Paris <eparis@redhat.com>
Tue, 15 Apr 2014 21:29:05 +0000 (17:29 -0400)
commitd95ee326abb92fc84c95795d7a3d34b4e0239ea4
tree217ef008bff82b6d3bee3e418a8181cad51e764e
parentb81b0d2b30651d0d1f87e96a631ed18da4750439
audit: add arch field to seccomp event log

The AUDIT_SECCOMP record looks something like this:

type=SECCOMP msg=audit(1373478171.953:32775): auid=4325 uid=4325 gid=4325 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0 pid=12381 comm="test" sig=31 syscall=231 compat=0 ip=0x39ea8bca89 code=0x0

In order to determine what syscall 231 maps to, we need to have the arch= field right before it.

To see the event, compile this test.c program:

=====
int main(void)
{
        return seccomp_load(seccomp_init(SCMP_ACT_KILL));
}
=====

gcc -g test.c -o test -lseccomp

After running the program, find the record by:  ausearch --start recent -m SECCOMP -i

Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
signed-off-by: Eric Paris <eparis@redhat.com>
kernel/auditsc.c