From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Will Deacon <will.deacon@arm.com>,
Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>,
"K. Prasad" <prasad@linux.vnet.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Jason Wessel <jason.wessel@windriver.com>,
Ingo Molnar <mingo@elte.hu>
Subject: [PATCH 4/8] hw-breakpoints: Check disabled breakpoints again
Date: Sat, 1 May 2010 04:53:51 +0200 [thread overview]
Message-ID: <1272682436-10682-5-git-send-regression-fweisbec@gmail.com> (raw)
In-Reply-To: <1272682436-10682-1-git-send-regression-fweisbec@gmail.com>
We stopped checking disabled breakpoints because we weren't
allowing breakpoints on NULL addresses. And gdb tends to set
NULL addresses on inactive breakpoints.
But refusing NULL addresses was actually a regression that has
been fixed now. There is no reason anymore to not validate
inactive breakpoint settings.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Cc: K. Prasad <prasad@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: Ingo Molnar <mingo@elte.hu>
---
kernel/hw_breakpoint.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/kernel/hw_breakpoint.c b/kernel/hw_breakpoint.c
index 03808ed..9ed9ae3 100644
--- a/kernel/hw_breakpoint.c
+++ b/kernel/hw_breakpoint.c
@@ -316,17 +316,7 @@ int register_perf_hw_breakpoint(struct perf_event *bp)
if (ret)
return ret;
- /*
- * Ptrace breakpoints can be temporary perf events only
- * meant to reserve a slot. In this case, it is created disabled and
- * we don't want to check the params right now (as we put a null addr)
- * But perf tools create events as disabled and we want to check
- * the params for them.
- * This is a quick hack that will be removed soon, once we remove
- * the tmp breakpoints from ptrace
- */
- if (!bp->attr.disabled || !bp->overflow_handler)
- ret = arch_validate_hwbkpt_settings(bp, bp->ctx->task);
+ ret = arch_validate_hwbkpt_settings(bp, bp->ctx->task);
/* if arch_validate_hwbkpt_settings() fails then release bp slot */
if (ret)
--
1.6.2.3
next prev parent reply other threads:[~2010-05-01 2:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-01 2:53 [GIT PULL] perf and breakpoints updates Frederic Weisbecker
2010-05-01 2:53 ` [PATCH 1/8] perf: Remove leftover useless options to record trace events from scripts Frederic Weisbecker
2010-05-01 2:53 ` [PATCH 2/8] perf: Fix warning while reading ring buffer headers Frederic Weisbecker
2010-05-01 2:53 ` [PATCH 3/8] hw-breakpoints: Tag ptrace breakpoint as exclude_kernel Frederic Weisbecker
2010-05-01 2:53 ` Frederic Weisbecker [this message]
2010-05-01 2:53 ` [PATCH 5/8] hw-breakpoints: Change/Enforce some breakpoints policies Frederic Weisbecker
2010-05-01 2:53 ` [PATCH 6/8] hw-breakpoints: Separate constraint space for data and instruction breakpoints Frederic Weisbecker
2010-05-01 2:53 ` [PATCH 7/8] hw-breakpoints: Handle breakpoint weight in allocation constraints Frederic Weisbecker
2010-05-01 2:53 ` [PATCH 8/8] hw-breakpoints: Get the number of available registers on boot dynamically Frederic Weisbecker
2010-05-03 6:50 ` [GIT PULL] perf and breakpoints updates Ingo Molnar
2010-05-03 7:00 ` Ingo Molnar
2010-05-03 13:39 ` Frederic Weisbecker
2010-05-04 8:30 ` [tip:perf/core] hw_breakpoints: Fix percpu build failure tip-bot for 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=1272682436-10682-5-git-send-regression-fweisbec@gmail.com \
--to=fweisbec@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=jason.wessel@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mahesh@linux.vnet.ibm.com \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=prasad@linux.vnet.ibm.com \
--cc=will.deacon@arm.com \
/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
all inboxes | Powered by JetHome®