]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "ptrace: PTRACE_DETACH should do flush_ptrace_hw_breakpoint(child)"
authorOleg Nesterov <oleg@redhat.com>
Tue, 6 Aug 2013 15:43:37 +0000 (17:43 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 6 Aug 2013 20:16:32 +0000 (13:16 -0700)
commit213e07e2e7926df9ada947176eed65f5cab93858
tree520b0ab0c8aa28c808eabb81e979f01749811018
parentdce1ca45fdfe50d34be577b7e682e1cdcd831756
Revert "ptrace: PTRACE_DETACH should do flush_ptrace_hw_breakpoint(child)"

This reverts commit a002bcc0c39cac74d247f9e18612299101f55de6.

This commit even has the test-case to prove that the tracee
can be killed by SIGTRAP if the debugger does not remove the
breakpoints before PTRACE_DETACH.

However, this is exactly what wineserver deliberately does,
set_thread_context() calls PTRACE_ATTACH + PTRACE_DETACH just
for PTRACE_POKEUSER(DR*) in between.

So we should revert this fix and document that PTRACE_DETACH
should keep the breakpoints.

Reported-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/ptrace.c