From: Oleg Nesterov <oleg@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
Felipe Contreras <felipe.contreras@gmail.com>,
Grazvydas Ignotas <notasas@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@elte.hu>, Denys Vlasenko <dvlasenk@redhat.com>
Subject: [PATCH 1/1] Revert "ptrace: PTRACE_DETACH should do flush_ptrace_hw_breakpoint(child)"
Date: Tue, 6 Aug 2013 17:43:37 +0200 [thread overview]
Message-ID: <20130806154337.GB398@redhat.com> (raw)
In-Reply-To: <20130806154314.GA398@redhat.com>
This reverts commit fab840fc2d542fabcab903db8e03589a6702ba5f.
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>
---
kernel/ptrace.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 4041f57..a146ee3 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -469,7 +469,6 @@ static int ptrace_detach(struct task_struct *child, unsigned int data)
/* Architecture-specific hardware disable .. */
ptrace_disable(child);
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
- flush_ptrace_hw_breakpoint(child);
write_lock_irq(&tasklist_lock);
/*
--
1.5.5.1
next prev parent reply other threads:[~2013-08-06 15:49 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-04 21:09 Linux 3.11-rc4 Linus Torvalds
2013-08-05 2:34 ` O_TMPFILE fs corruption (Re: Linux 3.11-rc4) Andy Lutomirski
2013-08-05 3:45 ` Linus Torvalds
2013-08-05 4:45 ` Andrew Lutomirski
2013-08-05 8:26 ` Christoph Hellwig
2013-08-05 16:04 ` Jörn Engel
2013-08-05 14:31 ` Al Viro
2013-08-05 4:20 ` Linux 3.11-rc4 Felipe Contreras
2013-08-05 13:29 ` Oleg Nesterov
2013-08-05 14:27 ` Felipe Contreras
2013-08-05 14:39 ` Oleg Nesterov
2013-08-05 17:02 ` Felipe Contreras
2013-08-05 17:11 ` Oleg Nesterov
2013-08-05 17:40 ` Felipe Contreras
2013-08-05 17:56 ` Oleg Nesterov
2013-08-05 17:39 ` Linus Torvalds
2013-08-05 17:43 ` Felipe Contreras
2013-08-05 18:08 ` Felipe Contreras
2013-08-05 17:47 ` Oleg Nesterov
2013-08-05 18:46 ` Oleg Nesterov
2013-08-05 18:54 ` Linus Torvalds
2013-08-05 18:57 ` Oleg Nesterov
2013-08-05 19:06 ` Linus Torvalds
2013-08-06 15:43 ` [PATCH 0/1] (Was: Linux 3.11-rc4) Oleg Nesterov
2013-08-06 15:43 ` Oleg Nesterov [this message]
2013-08-07 12:05 ` Grazvydas Ignotas
2013-08-07 17:22 ` Oleg Nesterov
2013-08-07 19:26 ` Linus Torvalds
2013-08-07 19:27 ` Oleg Nesterov
2013-08-07 19:47 ` Linus Torvalds
2013-08-08 15:41 ` Oleg Nesterov
2013-08-08 16:25 ` Linus Torvalds
2013-08-08 16:54 ` Frederic Weisbecker
2013-08-08 18:15 ` Oleg Nesterov
2013-08-09 16:45 ` Frederic Weisbecker
2013-08-09 17:12 ` Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130806154337.GB398@redhat.com \
--to=oleg@redhat.com \
--cc=dvlasenk@redhat.com \
--cc=felipe.contreras@gmail.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=notasas@gmail.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).