[PATCH 06/11] arm64: debug: split hardware breakpoint exeception entry

Ada Couprie Diaz ada.coupriediaz at arm.com
Thu May 1 04:15:14 PDT 2025


On 25/04/2025 16:36, Ada Couprie Diaz wrote:

> +void do_breakpoint(unsigned long esr, struct pt_regs *regs)
> +{
> +	unsigned long pc = regs->pc;
> +
> +	if (user_mode(regs) && !is_ttbr0_addr(pc))
> +		arm64_apply_bp_hardening();
After some thinking around the single stepping case, I will be moving 
the `arm64_apply_bp_hardening()` call earlier, in `el0_breakpt()`, 
similarly to what is done in `el0_pc()` ; likewise for the other 
relevant patches in the series.
That way, it can be in `noinstr` code, allow enabling preemption in 
`entry-common.c` for the debug exceptions it makes sense for, and 
removes the always-false check from the EL1 path.



More information about the linux-arm-kernel mailing list