[PATCH v2 10/11] arm64: debug: split bkpt32 exception entry

Ada Couprie Diaz ada.coupriediaz at arm.com
Thu May 29 03:43:31 PDT 2025


On 21/05/2025 10:07, Will Deacon wrote:

> On Mon, May 12, 2025 at 06:43:25PM +0100, Ada Couprie Diaz wrote:
>> diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c
>> index 94779c957b70..53f0b2281f14 100644
>> --- a/arch/arm64/kernel/debug-monitors.c
>> +++ b/arch/arm64/kernel/debug-monitors.c
>> @@ -298,6 +298,15 @@ void do_brk64(unsigned long esr, struct pt_regs *regs)
>>   }
>>   NOKPROBE_SYMBOL(do_brk64);
>>   
>> +#ifdef CONFIG_COMPAT
>> +/* BRKPT exception always traps to be handled. */
> nit: I don't understand this comment
>
> Will
We don't do any handling of BKPT in the kernel and let userspace do it, 
so I think I am stretching the meaning of "trap" a bit here to mean 
"send a SIGTRAP to userspace".
I'll keep that in mind in the future and be more precise.

However, given that `do_sp_pc_abort()` is a very similar handler and we 
don't make a note of it, I'll remove the comment : it doesn't feel 
really useful.

Thanks,
Ada




More information about the linux-arm-kernel mailing list