android_kernel_samsung_msm8976/arch
Andrea Arcangeli 4c7fc7220f [PATCH] i386: seccomp fix for auditing/ptrace
This is the same issue as ppc64 before, when returning to userland we
shouldn't re-compute the seccomp check or the task could be killed during
sigreturn when orig_eax is overwritten by the sigreturn syscall.  This was
found by Roland.

This was harmless from a security standpoint, but some i686 users reported
failures with auditing enabled system wide (some distro surprisingly makes
it the default) and I reproduced it too by keeping the whole workload under
strace -f.

Patch is tested and works for me under strace -f.

nobody@athlon:~/cpushare> strace -o /tmp/o -f python seccomp_test.py
make: Nothing to be done for `seccomp_test'.
Starting computing some malicious bytecode
init
load
start
stop
receive_data failure
kill
exit_code 0 signal 9
The malicious bytecode has been killed successfully by seccomp
Starting computing some safe bytecode
init
load
start
stop
174 counts
kill
exit_code 0 signal 0
The seccomp_test.py completed successfully, thank you for testing.

(akpm: collaterally cleaned up a bit of do_syscall_trace() too)

Signed-off-by: Andrea Arcangeli <andrea@cpushare.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 13:57:30 -07:00
..
alpha [PATCH] PCI: remove CONFIG_PCI_NAMES 2005-09-08 14:57:23 -07:00
arm Merge master.kernel.org:/home/rmk/linux-2.6-serial 2005-09-08 15:30:14 -07:00
arm26 [PATCH] Kconfig fix (BLK_DEV_FD dependencies) 2005-09-07 17:17:12 -07:00
cris [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
frv [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
h8300 [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
i386 [PATCH] i386: seccomp fix for auditing/ptrace 2005-09-09 13:57:30 -07:00
ia64 [IA64] Manual merge fix for 3 files 2005-09-08 14:27:13 -07:00
m32r [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
m68k [PATCH] Kconfig fix (BLK_DEV_FD dependencies) 2005-09-07 17:17:12 -07:00
m68knommu [PATCH] m68knommu: extract common timer code for 68EZ328 processor 2005-09-08 17:27:37 -07:00
mips [PATCH] mips: add TANBAC TB0287 support 2005-09-09 13:57:30 -07:00
parisc [PATCH] Kconfig fix (BLK_DEV_FD dependencies) 2005-09-07 17:17:12 -07:00
ppc [PATCH] ppc32: Kill PVR_440* defines 2005-09-09 13:57:29 -07:00
ppc64 Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/ppc64-2.6 2005-09-09 10:38:02 -07:00
s390 [PATCH] missing CHECKFLAGS on s390 2005-09-09 10:31:58 -07:00
sh [PATCH] Kconfig fix (BLK_DEV_FD dependencies) 2005-09-07 17:17:12 -07:00
sh64 [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
sparc [PATCH] Kconfig fix (BLK_DEV_FD dependencies) 2005-09-07 17:17:12 -07:00
sparc64 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2005-09-08 15:55:23 -07:00
um [PATCH] uaccess.h annotations (uml) 2005-09-09 10:31:58 -07:00
v850 [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
x86_64 [PATCH] Fix misspelled i8259 typo in io_apic.c 2005-09-09 10:37:10 -07:00
xtensa [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00