* [PATCH] ARM/hw_breakpoint: modify dead code for breakpoint_handler()
@ 2019-10-09 9:27 wangxu
2019-10-11 16:43 ` Will Deacon
0 siblings, 1 reply; 3+ messages in thread
From: wangxu @ 2019-10-09 9:27 UTC (permalink / raw)
To: will, mark.rutland, linux, linux-arm-kernel, linux-kernel
From: Wang Xu <wangxu72@huawei.com>
In perf_event_alloc(), event->overflow_handler is initialized to a
non-null value, which makes enable_single_step(bp, addr) in
breakpoint_handler() never be executed.
As a matter of fact, the branch condition has been updated to
is_default_overflow_handler().
Signed-off-by: Wang Xu <wangxu72@huawei.com>
---
arch/arm/kernel/hw_breakpoint.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c
index b0c195e..586a587 100644
--- a/arch/arm/kernel/hw_breakpoint.c
+++ b/arch/arm/kernel/hw_breakpoint.c
@@ -822,7 +822,7 @@ static void breakpoint_handler(unsigned long unknown, struct pt_regs *regs)
info->trigger = addr;
pr_debug("breakpoint fired: address = 0x%x\n", addr);
perf_bp_event(bp, regs);
- if (!bp->overflow_handler)
+ if (is_default_overflow_handler(bp))
enable_single_step(bp, addr);
goto unlock;
}
--
1.8.5.6
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM/hw_breakpoint: modify dead code for breakpoint_handler()
2019-10-09 9:27 [PATCH] ARM/hw_breakpoint: modify dead code for breakpoint_handler() wangxu
@ 2019-10-11 16:43 ` Will Deacon
0 siblings, 0 replies; 3+ messages in thread
From: Will Deacon @ 2019-10-11 16:43 UTC (permalink / raw)
To: wangxu; +Cc: mark.rutland, linux, linux-arm-kernel, linux-kernel
On Wed, Oct 09, 2019 at 05:27:00PM +0800, wangxu wrote:
> From: Wang Xu <wangxu72@huawei.com>
>
> In perf_event_alloc(), event->overflow_handler is initialized to a
> non-null value, which makes enable_single_step(bp, addr) in
> breakpoint_handler() never be executed.
>
> As a matter of fact, the branch condition has been updated to
> is_default_overflow_handler().
>
> Signed-off-by: Wang Xu <wangxu72@huawei.com>
> ---
> arch/arm/kernel/hw_breakpoint.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c
> index b0c195e..586a587 100644
> --- a/arch/arm/kernel/hw_breakpoint.c
> +++ b/arch/arm/kernel/hw_breakpoint.c
> @@ -822,7 +822,7 @@ static void breakpoint_handler(unsigned long unknown, struct pt_regs *regs)
> info->trigger = addr;
> pr_debug("breakpoint fired: address = 0x%x\n", addr);
> perf_bp_event(bp, regs);
> - if (!bp->overflow_handler)
> + if (is_default_overflow_handler(bp))
> enable_single_step(bp, addr);
> goto unlock;
Seems to match what we do on arm64, so:
Acked-by: Will Deacon <will@kernel.org>
You'll need to put this into rmk's patch system [1].
Will
[1] https://www.arm.linux.org.uk/developer/
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ARM/hw_breakpoint: modify dead code for breakpoint_handler()
@ 2019-10-12 3:28 wangxu
0 siblings, 0 replies; 3+ messages in thread
From: wangxu @ 2019-10-12 3:28 UTC (permalink / raw)
To: linux-arm-kernel
From: Wang Xu <wangxu72@huawei.com>
In perf_event_alloc(), event->overflow_handler is initialized to a
non-null value, which makes enable_single_step(bp, addr) in
breakpoint_handler() never be executed.
As a matter of fact, the branch condition has been updated to
is_default_overflow_handler().
Signed-off-by: Wang Xu <wangxu72@huawei.com>
---
arch/arm/kernel/hw_breakpoint.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c
index b0c195e..586a587 100644
--- a/arch/arm/kernel/hw_breakpoint.c
+++ b/arch/arm/kernel/hw_breakpoint.c
@@ -822,7 +822,7 @@ static void breakpoint_handler(unsigned long unknown, struct pt_regs *regs)
info->trigger = addr;
pr_debug("breakpoint fired: address = 0x%x\n", addr);
perf_bp_event(bp, regs);
- if (!bp->overflow_handler)
+ if (is_default_overflow_handler(bp))
enable_single_step(bp, addr);
goto unlock;
}
--
1.8.5.6
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-12 3:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09 9:27 [PATCH] ARM/hw_breakpoint: modify dead code for breakpoint_handler() wangxu
2019-10-11 16:43 ` Will Deacon
2019-10-12 3:28 wangxu
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).