samitolvanen wrote:

> I modified the `nocf_check` attribute handler to check for either 
> `-cf-protection` or `-fsanitize=kcfi` being enabled.

Looking at this a bit closer, the `nocf_check` attribute also applies to 
function pointers with `-fcf-protection`, and disables tracking for indirect 
branches. Since KCFI already has the `no_sanitize("kcfi")` attribute for this 
purpose, we would presumably just ignore the `nocf_check` attribute on pointers 
used for indirect calls when only KCFI is enabled, but preserve the semantics 
for assigning and casting the attributed pointers. How does the GCC KCFI 
implementation handle this? I would like to make sure both compilers behave the 
same way here.

https://github.com/llvm/llvm-project/pull/158133
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to