[PATCH v3] ARM: breakpoint: CFI breakpoints only on demand

Linus Walleij linusw at kernel.org
Wed Jul 1 05:49:57 PDT 2026


On Wed, Jul 1, 2026 at 1:10 PM Russell King <linux at armlinux.org.uk> wrote:

> Have the LLVM compiler people responded to this bug yet? What is their
> plan with the silly choice of BKPT usage for CFI failure?

Haven't heard anything.

My tentative plan is to follow this up with a patch to LLVM (and I guess
then later also GCC...) to enable handling CFI faults with a read
to the guard region at 0xffc00000 instead of using BKPT so we get a
good old predictable segfault instead. I was thinking something like

-fsanitize-kcfi-guard-region-address=0xffc00000

My idea is that the unwinder can then see that this is caused by KCFI
and act accordingly, but already the existing stack trace should make
it pretty obvious what happened.

It's the best I can think of at least, haven't seen any other ideas.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list