linux-stable/arch/x86/entry
Andy Lutomirski 5e99cb7c35 x86/entry/64/compat: Fix bad fast syscall arg failure path
If user code does SYSCALL32 or SYSENTER without a valid stack,
then our attempt to determine the syscall args will result in a
failed uaccess fault.  Previously, we would try to recover by
jumping to the syscall exit code, but we'd run the syscall exit
work even though we never made it to the syscall entry work.

Clean it up by treating the failure path as a non-syscall entry
and exit pair.

This fixes strace's output when running the syscall_arg_fault
test. Without this fix, strace would get out of sync and would
fail to associate syscall entries with syscall exits.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: paulmck@linux.vnet.ibm.com
Link: http://lkml.kernel.org/r/903010762c07a3d67df914fea2da84b52b0f8f1d.1435952415.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-07-07 10:58:30 +02:00
..
syscalls
vdso x86/compat: Don't build the 32-bit VDSO if not needed 2015-07-06 15:28:56 +02:00
vsyscall x86/compat: Check for both 32-bit compat and x32 in get_gate_vma() 2015-07-06 15:28:57 +02:00
calling.h x86/asm/entry/32: Replace RESTORE_RSI_RDI with open-coded 32-bit reads 2015-07-06 14:56:50 +02:00
entry_32.S
entry_64.S x86/entry/64/compat: Fix bad fast syscall arg failure path 2015-07-07 10:58:30 +02:00
entry_64_compat.S x86/entry/64/compat: Fix bad fast syscall arg failure path 2015-07-07 10:58:30 +02:00
Makefile
syscall_32.c
syscall_64.c
thunk_32.S Merge branch 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 17:59:09 -07:00
thunk_64.S Merge branch 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 17:59:09 -07:00