[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191011164319.2on7snv65jdbz3sb@willie-the-truck>
Date: Fri, 11 Oct 2019 17:43:19 +0100
From: Will Deacon <will@...nel.org>
To: wangxu <wangxu72@...wei.com>
Cc: mark.rutland@....com, linux@...linux.org.uk,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ARM/hw_breakpoint: modify dead code for
breakpoint_handler()
On Wed, Oct 09, 2019 at 05:27:00PM +0800, wangxu wrote:
> From: Wang Xu <wangxu72@...wei.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@...wei.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@...nel.org>
You'll need to put this into rmk's patch system [1].
Will
[1] https://www.arm.linux.org.uk/developer/
Powered by blists - more mailing lists