diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2010-04-17 12:11:59 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-04-30 22:32:09 -0400 |
commit | 87e9b2024659c614a876ce359a57e98a47b5ef37 (patch) | |
tree | 5a9449e181d59e2142e5424fe68bea225597476a /kernel | |
parent | 73266fc1df2f94cf72b3beba3eee3b88ed0b0664 (diff) |
hw-breakpoints: Check disabled breakpoints again
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | 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 03808ed342a6..9ed9ae3a48b3 100644 --- a/kernel/hw_breakpoint.c +++ b/kernel/hw_breakpoint.c | |||
@@ -316,17 +316,7 @@ int register_perf_hw_breakpoint(struct perf_event *bp) | |||
316 | if (ret) | 316 | if (ret) |
317 | return ret; | 317 | return ret; |
318 | 318 | ||
319 | /* | 319 | ret = arch_validate_hwbkpt_settings(bp, bp->ctx->task); |
320 | * Ptrace breakpoints can be temporary perf events only | ||
321 | * meant to reserve a slot. In this case, it is created disabled and | ||
322 | * we don't want to check the params right now (as we put a null addr) | ||
323 | * But perf tools create events as disabled and we want to check | ||
324 | * the params for them. | ||
325 | * This is a quick hack that will be removed soon, once we remove | ||
326 | * the tmp breakpoints from ptrace | ||
327 | */ | ||
328 | if (!bp->attr.disabled || !bp->overflow_handler) | ||
329 | ret = arch_validate_hwbkpt_settings(bp, bp->ctx->task); | ||
330 | 320 | ||
331 | /* if arch_validate_hwbkpt_settings() fails then release bp slot */ | 321 | /* if arch_validate_hwbkpt_settings() fails then release bp slot */ |
332 | if (ret) | 322 | if (ret) |