[llvm] [X86][KCFI] Do not emit a type prefix for nocf_check functions (PR #158133)

Kees Cook via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 13 13:07:30 PDT 2025


https://github.com/kees commented:

I see this is only testing the IR level, but not the front-end. Do you want `-fsanitize=kcfi` to work with `nocf_check` regardless of `-fcf-protection`? I think it should -- there may actually be some value in being able to remove preambles for a function regardless of `-fcf-protection`. (This is the logic I'm implementing in the GCC KCFI.)

That way we won't get these kinds of errors if someone tries to use `nocf_check`:

```
kcfi-runtime.c:17:16: warning: 'nocf_check' attribute ignored; use -fcf-protection to enable the
      attribute [-Wignored-attributes]
   17 | __attribute__((nocf_check))
      |                ^
```

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


More information about the llvm-commits mailing list