android_kernel_google_msm/arch
Tejun Heo e3293b8639 ptrace,x86: force IRET path after a ptrace_stop()
commit b9cd18de4d upstream.

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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-06 18:49:20 -07:00
..
alpha
arm ARM: stacktrace: avoid listing stacktrace functions in stacktrace 2014-06-30 20:01:33 -07:00
avr32 avr32: Makefile: add '-D__linux__' flag for gcc-4.4.7 use 2014-03-11 16:09:57 -07:00
blackfin
c6x
cris cris: media platform drivers: fix build 2013-11-29 10:50:37 -08:00
frv
h8300
hexagon
ia64 exec/ptrace: fix get_dumpable() incorrect tests 2013-11-29 10:50:34 -08:00
m32r m32r: make memset() global for CONFIG_KERNEL_BZIP2=y 2013-09-14 06:02:11 -07:00
m68k m68k/atari: ARAnyM - Fix NatFeat module support 2013-08-20 08:26:29 -07:00
microblaze
mips MIPS: MSC: Prevent out-of-bounds writes to MIPS SC ioremap'd region 2014-07-06 18:49:19 -07:00
mn10300
openrisc
parisc parisc: fix epoll_pwait syscall on compat kernel 2014-06-07 16:01:57 -07:00
powerpc powerpc: fix typo 'CONFIG_PPC_CPU' 2014-07-06 18:49:20 -07:00
s390 s390/lowcore: reserve 96 bytes for IRB in lowcore 2014-06-30 20:01:31 -07:00
score
sh sh: fix format string bug in stack tracer 2014-05-06 07:51:45 -07:00
sparc sparc64: don't treat 64-bit syscall return codes as 32-bit 2014-04-26 17:13:19 -07:00
tile tile: use a more conservative __my_cpu_offset in CONFIG_PREEMPT 2013-10-13 15:42:50 -07:00
um um: add missing declaration of 'getrlimit()' and friends 2013-12-11 22:34:11 -08:00
unicore32 mm, show_mem: suppress page counts in non-blockable contexts 2013-10-13 15:42:49 -07:00
x86 ptrace,x86: force IRET path after a ptrace_stop() 2014-07-06 18:49:20 -07:00
xtensa xtensa: don't use alternate signal stack on threads 2013-11-13 12:01:49 +09:00
.gitignore
Kconfig