[clang] [llvm] [ARM][KCFI] Add backend support for Kernel Control-Flow Integrity (PR #163698)
Sami Tolvanen via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 16 08:44:51 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();
----------------
samitolvanen wrote:
This seems fine for the Linux kernel, but we have existing (firmware) KCFI users who [mix ARM and Thumb code](https://github.com/llvm/llvm-project/issues?q=is%3Aissue%20kcfi%20thumb). This would completely break that use case, correct?
https://github.com/llvm/llvm-project/pull/163698
More information about the cfe-commits
mailing list