linux/arch/i386/kernel
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
..
acpi [PATCH] i386: port ATI timer fix from x86_64 to i386 II 2006-03-08 18:10:31 -08:00
cpu [PATCH] x86: cpu model calculation for family 6 cpu 2006-03-08 14:14:01 -08:00
timers Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq 2006-02-13 19:10:43 -08:00
.gitignore [PATCH] x86: gitignore some autogenerated files for i386 2006-02-14 16:09:35 -08:00
apic.c [PATCH] Plug kdump shutdown race window 2006-03-14 08:26:44 -08:00
apm.c [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
asm-offsets.c
bootflag.c
cpuid.c [PATCH] arch/i386/kernel/cpuid.c: unused variable 2006-01-06 08:33:38 -08:00
crash_dump.c [PATCH] kdump: read previous kernel's memory 2006-01-10 08:01:28 -08:00
crash.c [PATCH] kdump: save registers early (inline functions) 2006-01-10 08:01:27 -08:00
dmi_scan.c [PATCH] x86_64: Generalize DMI and enable for x86-64 2006-01-11 19:04:51 -08:00
doublefault.c
early_printk.c
efi_stub.S
efi.c [PATCH] EFI: Fix gdt load 2006-03-06 18:40:45 -08:00
entry.S [PATCH] Make vm86 support optional 2006-01-08 20:14:11 -08:00
head.S [PATCH] x86: fix broken SMP boot sequence 2006-02-24 14:31:38 -08:00
i386_ksyms.c [PATCH] x86: fix broken SMP boot sequence 2006-02-24 14:31:38 -08:00
i387.c
i8237.c
i8259.c
init_task.c [PATCH] Change maxaligned_in_smp alignemnt macros to internodealigned_in_smp macros 2006-01-08 20:13:38 -08:00
io_apic.c [PATCH] i386: port ATI timer fix from x86_64 to i386 II 2006-03-08 18:10:31 -08:00
ioport.c [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
irq.c [PATCH] Change maxaligned_in_smp alignemnt macros to internodealigned_in_smp macros 2006-01-08 20:13:38 -08:00
kprobes.c [PATCH] Kprobes causes NX protection fault on i686 SMP 2006-02-24 14:31:37 -08:00
ldt.c
machine_kexec.c [PATCH] fix kexec asm 2006-03-08 14:15:04 -08:00
Makefile [PATCH] i386: port ATI timer fix from x86_64 to i386 II 2006-03-08 18:10:31 -08:00
mca.c
microcode.c [PATCH] x86 microcode driver vs hotplug CPUs. 2006-02-28 20:53:43 -08:00
module.c
mpparse.c [PATCH] i386: Handle non existing APICs without panicing 2006-02-26 09:53:30 -08:00
msr.c [PATCH] arch/i386/kernel/msr.c: removed unused variable 2006-01-06 08:33:38 -08:00
nmi.c [PATCH] x86: Fix i386 nmi_watchdog that does not trigger die_nmi 2006-03-08 14:14:01 -08:00
numaq.c
pci-dma.c
process.c [PATCH] i386: print kernel version in register dumps 2006-02-05 11:06:53 -08:00
ptrace.c
quirks.c [PATCH] EDAC: core EDAC support code 2006-01-18 19:20:31 -08:00
reboot_fixups.c
reboot.c [PATCH] i386/x86-64: Don't IPI to offline cpus on shutdown 2006-01-11 19:04:50 -08:00
relocate_kernel.S
scx200.c [PATCH] arch: Replace pci_module_init() with pci_register_driver() 2006-01-09 12:13:21 -08:00
semaphore.c
setup.c [PATCH] i386: port ATI timer fix from x86_64 to i386 II 2006-03-08 18:10:31 -08:00
sigframe.h
signal.c [PATCH] Handle TIF_RESTORE_SIGMASK for i386 2006-01-18 19:20:29 -08:00
smp.c
smpboot.c [PATCH] x86: check for online cpus before bringing them up 2006-03-17 07:51:25 -08:00
srat.c
summit.c
sys_i386.c
syscall_table.S [PATCH] fstatat64 support 2006-02-11 21:41:10 -08:00
sysenter.c
time_hpet.c [PATCH] move rtc_interrupt() prototype to rtc.h 2006-01-08 20:13:47 -08:00
time.c [PATCH] x86: fix potential jiffies overflow in timer_resume() 2006-03-06 18:40:44 -08:00
topology.c [PATCH] Fix topology.c location 2006-02-24 14:31:39 -08:00
trampoline.S
traps.c [PATCH] i386: print kernel version in register dumps 2006-02-05 11:06:53 -08:00
vm86.c [PATCH] make vm86 call audit_syscall_exit 2006-03-20 14:08:53 -05:00
vmlinux.lds.S
vsyscall-int80.S
vsyscall-note.S
vsyscall-sigreturn.S
vsyscall-sysenter.S [PATCH] x86: document sysenter path 2006-02-14 16:09:35 -08:00
vsyscall.lds.S
vsyscall.S