summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-07-03 15:43:15 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-06 18:57:29 -0700
commitb897eba830537e68a1a0a4b741c975ff705a4662 (patch)
tree705f94851de7871b7e0fdd970c25eef742140c48 /usr
parente3a88572409bfca472be3e0d87f4750478070119 (diff)
downloadkernel-common-b897eba830537e68a1a0a4b741c975ff705a4662.tar.gz
kernel-common-b897eba830537e68a1a0a4b741c975ff705a4662.tar.bz2
kernel-common-b897eba830537e68a1a0a4b741c975ff705a4662.zip
ptrace,x86: force IRET path after a ptrace_stop()
commit b9cd18de4db3c9ffa7e17b0dc0ca99ed5aa4d43a 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>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions