[PATCH v4 02/13] arm64: refactor aarch32_break_handler()

Will Deacon will at kernel.org
Fri Jun 27 08:45:02 PDT 2025


On Fri, Jun 20, 2025 at 10:11:56PM +0100, Ada Couprie Diaz wrote:
> `aarch32_break_handler()` is called in `do_el0_undef()` when we
> are trying to handle an exception whose Exception Syndrome is unknown.
> It checks if the instruction hit might be a 32-bit arm break (be it
> A32 or T2), and sends a SIGTRAP to userspace if it is so that it can
> be handled.
> 
> However, this is badly represented in the naming of the function, and
> is not consistent with the other functions called with the same logic
> in `do_el0_undef()`.
> 
> Rename it `try_handle_aarch32_break()` and change the return value to
> a boolean to align with the logic of the other tentative handlers in
> `do_el0_undef()`, the previous error code being ignored anyway.
> 
> Signed-off-by: Ada Couprie Diaz <ada.coupriediaz at arm.com>
> Tested-by: Luis Claudio R. Goncalves <lgoncalv at redhat.com>
> Reviewed-by: Anshuman Khandual <anshuman.khandual at arm.com>
> Acked-by: Mark Rutland <mark.rutland at arm.com>
> ---
>  arch/arm64/include/asm/debug-monitors.h |  2 +-
>  arch/arm64/kernel/debug-monitors.c      | 10 +++++-----
>  arch/arm64/kernel/traps.c               |  2 +-
>  3 files changed, 7 insertions(+), 7 deletions(-)

Reviewed-by: Will Deacon <will at kernel.org>

Will



More information about the linux-arm-kernel mailing list