From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
Paul Mundt <lethal@linux-sh.org>, Ingo Molnar <mingo@elte.hu>,
Alan Stern <stern@rowland.harvard.edu>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: [PATCH 2/6] x86/hw-breakpoints: Actually flush thread breakpoints in flush_thread().
Date: Tue, 3 Nov 2009 20:11:10 +0100 [thread overview]
Message-ID: <1257275474-5285-3-git-send-email-fweisbec@gmail.com> (raw)
In-Reply-To: <1257275474-5285-1-git-send-email-fweisbec@gmail.com>
From: Paul Mundt <lethal@linux-sh.org>
flush_thread() tries to do a TIF_DEBUG check before calling in to
flush_thread_hw_breakpoint() (which subsequently clears the thread flag),
but for some reason, the x86 code is manually clearing TIF_DEBUG
immediately before the test, so this path will never be taken.
This kills off the erroneous clear_tsk_thread_flag() and lets
flush_thread_hw_breakpoint() actually get invoked.
Presumably folks were getting lucky with testing and the
free_thread_info() -> free_thread_xstate() path was taking care of the
flush there.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: "K.Prasad" <prasad@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Alan Stern <stern@rowland.harvard.edu>
LKML-Reference: <20091005102306.GA7889@linux-sh.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
arch/x86/kernel/process.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 2275ce5..cf8ee00 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -107,8 +107,6 @@ void flush_thread(void)
}
#endif
- clear_tsk_thread_flag(tsk, TIF_DEBUG);
-
if (unlikely(test_tsk_thread_flag(tsk, TIF_DEBUG)))
flush_thread_hw_breakpoint(tsk);
memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array));
--
1.6.2.3
next prev parent reply other threads:[~2009-11-03 19:11 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-03 19:11 [GIT PULL v4] hw-breakpoints: Rewrite on top of perf events v4 Frederic Weisbecker
2009-11-03 19:11 ` [PATCH 1/6] perf/core: Provide a kernel-internal interface to get to performance counters Frederic Weisbecker
2009-11-03 19:11 ` Frederic Weisbecker [this message]
2009-11-03 19:11 ` [PATCH 3/6] perf/core: Add a callback to perf events Frederic Weisbecker
2009-11-03 19:11 ` [PATCH 4/6] hw-breakpoints: Rewrite the hw-breakpoints layer on top of " Frederic Weisbecker
2009-11-03 19:58 ` Jan Kiszka
2009-11-03 20:15 ` Frederic Weisbecker
2009-11-03 20:22 ` Jan Kiszka
2009-11-03 20:29 ` Frederic Weisbecker
2009-11-03 20:39 ` Jan Kiszka
2009-11-03 20:45 ` Frederic Weisbecker
2009-11-04 23:59 ` Paul Mackerras
2009-11-05 6:00 ` K.Prasad
2009-11-05 11:00 ` Paul Mackerras
2009-11-05 11:09 ` Frederic Weisbecker
2009-11-07 10:03 ` Paul Mackerras
2009-11-07 19:52 ` Frederic Weisbecker
2009-11-05 11:03 ` Paul Mackerras
2009-11-05 11:11 ` Frederic Weisbecker
2009-11-05 15:34 ` K.Prasad
2009-11-05 21:06 ` Frederic Weisbecker
2009-11-08 17:32 ` K.Prasad
2009-11-12 15:42 ` Frederic Weisbecker
2009-11-03 19:11 ` [PATCH 5/6] hw-breakpoints: Arbitrate access to pmu following registers constraints Frederic Weisbecker
2009-11-05 10:58 ` Paul Mackerras
2009-11-05 11:24 ` Frederic Weisbecker
2009-11-08 20:56 ` Benjamin Herrenschmidt
2009-11-12 15:54 ` Frederic Weisbecker
2009-11-12 20:00 ` Benjamin Herrenschmidt
2009-11-14 13:34 ` Frederic Weisbecker
2009-11-03 19:11 ` [PATCH 6/6] ksym_tracer: Remove KSYM_SELFTEST_ENTRY Frederic Weisbecker
2009-11-05 14:13 ` [GIT PULL v4] hw-breakpoints: Rewrite on top of perf events v4 K.Prasad
2009-11-05 20:30 ` Frederic Weisbecker
-- strict thread matches above, loose matches on Subject: below --
2009-10-26 8:17 [PATCH 4/6] hw-breakpoints: Rewrite the hw-breakpoints layer on top of perf events Jan Kiszka
2009-11-01 21:09 ` [PATCH 2/6] x86/hw-breakpoints: Actually flush thread breakpoints in flush_thread() Frederic Weisbecker
2009-10-24 14:16 [GIT PULL v2] hw-breakpoints: Rewrite on top of perf events Frederic Weisbecker
2009-10-24 14:16 ` [PATCH 2/6] x86/hw-breakpoints: Actually flush thread breakpoints in flush_thread() Frederic Weisbecker
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=1257275474-5285-3-git-send-email-fweisbec@gmail.com \
--to=fweisbec@gmail.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=stern@rowland.harvard.edu \
/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
Powered by JetHome