[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
Fri Oct 17 01:15:16 PDT 2025
================
@@ -687,7 +687,9 @@ static void addKCFIPass(const Triple &TargetTriple, const LangOptions &LangOpts,
PassBuilder &PB) {
// If the back-end supports KCFI operand bundle lowering, skip KCFIPass.
if (TargetTriple.getArch() == llvm::Triple::x86_64 ||
- TargetTriple.isAArch64(64) || TargetTriple.isRISCV())
+ TargetTriple.isAArch64(64) || TargetTriple.isRISCV() ||
+ TargetTriple.getArch() == llvm::Triple::arm ||
----------------
kees wrote:
I've implemented Thumb2 and Thumb1 now. As far as the XOR thing, it would still require reading back the instructions to discover the typeid offset, and then also reading from "target address - offset" to get the value. But that's all Linux-side anyway.
https://github.com/llvm/llvm-project/pull/163698
More information about the cfe-commits
mailing list