[clang] [llvm] [ARM][KCFI] Add backend support for Kernel Control-Flow Integrity (PR #163698)

Kees Cook via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 16 09:10:34 PDT 2025


================
@@ -12007,6 +12011,49 @@ static void genTPLoopBody(MachineBasicBlock *TpLoopBody,
       .add(predOps(ARMCC::AL));
 }
 
+bool ARMTargetLowering::supportKCFIBundles() const {
+  // KCFI is only supported in ARM mode, not Thumb mode
+  return !Subtarget->isThumb();
----------------
kees wrote:

Oh, there firmware using the generic KCFI? Yeah, if they depend on Thumb, that would break. Would Thumb support just need a different asmprinter?

https://github.com/llvm/llvm-project/pull/163698


More information about the cfe-commits mailing list