]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
[PATCH] make vm86 call audit_syscall_exit
authorJason Baron <jbaron@redhat.com>
Tue, 31 Jan 2006 21:56:28 +0000 (16:56 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 1 May 2006 19:03:42 +0000 (12:03 -0700)
commitf38f300d4a0698791bb11294903702ddb1c4e9d8
treef1e70e9f96729983729543d2a24b762844212873
parentf1e64a332ce7e00d5e5fa25e505e54dff3049ddc
[PATCH] make vm86 call audit_syscall_exit

hi,

The motivation behind the patch below was to address messages in
/var/log/messages such as:

Jan 31 10:54:15 mets kernel: audit(:0): major=252 name_count=0: freeing
multiple contexts (1)
Jan 31 10:54:15 mets kernel: audit(:0): major=113 name_count=0: freeing
multiple contexts (2)

I can reproduce by running 'get-edid' from:
http://john.fremlin.de/programs/linux/read-edid/.

These messages come about in the log b/c the vm86 calls do not exit via
the normal system call exit paths and thus do not call
'audit_syscall_exit'. The next system call will then free the context for
itself and for the vm86 context, thus generating the above messages. This
patch addresses the issue by simply adding a call to 'audit_syscall_exit'
from the vm86 code.

Besides fixing the above error messages the patch also now allows vm86
system calls to become auditable. This is useful since strace does not
appear to properly record the return values from sys_vm86.

I think this patch is also a step in the right direction in terms of
cleaning up some core auditing code. If we can correct any other paths
that do not properly call the audit exit and entries points, then we can
also eliminate the notion of context chaining.

I've tested this patch by verifying that the log messages no longer
appear, and that the audit records for sys_vm86 appear to be correct.
Also, 'read_edid' produces itentical output.

thanks,

-Jason

Signed-off-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/i386/kernel/vm86.c
kernel/auditsc.c