alistair23-linux/arch/x86
Tejun Heo b9cd18de4d ptrace,x86: force IRET path after a ptrace_stop()
The 'sysret' fastpath does not correctly restore even all regular
registers, much less any segment registers or reflags values.  That is
very much part of why it's faster than 'iret'.

Normally that isn't a problem, because the normal ptrace() interface
catches the process using the signal handler infrastructure, which
always returns with an iret.

However, some paths can get caught using ptrace_event() instead of the
signal path, and for those we need to make sure that we aren't going to
return to user space using 'sysret'.  Otherwise the modifications that
may have been done to the register set by the tracer wouldn't
necessarily take effect.

Fix it by forcing IRET path by setting TIF_NOTIFY_RESUME from
arch_ptrace_stop_needed() which is invoked from ptrace_stop().

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Andy Lutomirski <luto@amacapital.net>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-07-03 17:27:23 -07:00
..
boot x86, kaslr: boot-time selectable with hibernation 2014-06-16 23:30:44 +02:00
configs USB: remove CONFIG_USB_DEBUG from defconfig files 2014-05-28 09:40:45 -07:00
crypto
ia32 x86, vdso: Reimplement vdso.so preparation in build-time C 2014-05-05 13:18:51 -07:00
include ptrace,x86: force IRET path after a ptrace_stop() 2014-07-03 17:27:23 -07:00
kernel Merge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-06-27 18:43:03 -07:00
kvm Merge commit '33b458d276bb' into kvm-master 2014-06-30 16:45:40 +02:00
lguest asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
lib Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-06-12 19:18:49 -07:00
math-emu asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
mm Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-06-12 19:18:49 -07:00
net net: filter: cleanup A/X name usage 2014-06-11 00:13:16 -07:00
oprofile
pci x86: enable DMA CMA with swiotlb 2014-06-04 16:53:57 -07:00
platform x86: intel-mid: add watchdog platform code for Merrifield 2014-06-10 21:48:20 +02:00
power asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
realmode
syscalls x86, x32: Use compat shims for io_{setup,submit} 2014-05-04 17:49:22 -07:00
tools
um x86, vdso: Clean up 32-bit vs 64-bit vdso params 2014-05-05 13:18:40 -07:00
vdso x86/vdso: Error out in vdso2c if DT_RELA is present 2014-06-24 13:53:57 -07:00
video
xen xen: regression and PVH fixes for 3.16-rc1 2014-06-19 07:53:27 -10:00
.gitignore
Kbuild
Kconfig x86, kaslr: boot-time selectable with hibernation 2014-06-16 23:30:44 +02:00
Kconfig.cpu
Kconfig.debug
Makefile x86-64, build: Fix stack protector Makefile breakage with 32-bit userland 2014-05-07 14:14:44 -07:00
Makefile.um
Makefile_32.cpu