kernel-ark/arch/i386
Jason Baron 7e7f8a036b [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>
2006-03-20 14:08:53 -05:00
..
boot [PATCH] x86: gitignore some autogenerated files for i386 2006-02-14 16:09:35 -08:00
crypto [CRYPTO] aes-i586: Remove unused variable ls_tab 2006-01-09 14:15:53 -08:00
kernel [PATCH] make vm86 call audit_syscall_exit 2006-03-20 14:08:53 -05:00
lib
mach-default [PATCH] Fix topology.c location 2006-02-24 14:31:39 -08:00
mach-es7000
mach-generic
mach-visws
mach-voyager [PATCH] fix voyager after topology.c move 2006-02-26 19:10:30 -08:00
math-emu
mm [PATCH] x86_64: add __meminit for memory hotplug 2006-01-16 23:18:35 -08:00
oprofile [PATCH] x86: fix oprofile kernel callgraph regression 2006-02-14 08:25:29 -08:00
pci [PATCH] PCI: handle bogus MCFG entries 2006-01-31 18:00:13 -08:00
power
defconfig [PATCH] e1000: Added disable packet split capability 2006-01-18 16:17:57 -05:00
Kconfig Make Kprobes depend on modules 2006-02-26 20:24:40 -08:00
Kconfig.cpu [PATCH] Base support for AMD Geode GX/LX processors 2006-01-06 08:33:38 -08:00
Kconfig.debug [PATCH] x86/x86_64: mark rodata section read only: x86 parts 2006-01-06 08:33:36 -08:00
Makefile [PATCH] i386: remove gcc version check for CONFIG_REGPARM 2006-01-16 23:15:25 -08:00
Makefile.cpu [PATCH] remove gcc-2 checks 2006-01-08 20:14:02 -08:00