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
crypto
ia32
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
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
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
realmode
syscalls
tools
um
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
Makefile.um
Makefile_32.cpu