[clang] [llvm] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)

2024-11-27 Thread Matthew Maurer via cfe-commits
maurer wrote: This is not a Rust concern, but re-reading the initial post, it *looks* like your own statistics suggest that consuming 3 bits for arity costs more than it buys you. As stated, (didn't check your math, just going off what you said) prior to your change, we expect 0.01383765 colli

[clang] [llvm] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)

2024-11-26 Thread Matthew Maurer via cfe-commits
maurer wrote: Flag guarding this feature seems like it would also be good for any existing C users - for example, if trying to build a kernel module intended to load against a kernel image built with an older `clang`, you need to select the same type ID projection that the kernel did. https:/

[clang] [llvm] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)

2024-11-29 Thread Matthew Maurer via cfe-commits
maurer wrote: I'm not sure I buy the argument that cross-arity functions are significantly more exploitable than same-arity mismatches. Restating your argument to make sure I've understood it correctly: When an attacker swaps in a function pointer of higher arity, a dead variable (or even a l

[clang] [llvm] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)

2024-12-04 Thread Matthew Maurer via cfe-commits
maurer wrote: I think Scott's point may be the relevant one - this may be similar strength or slightly weaker, but having an indicator stating which registers are live is potentially needed to allow FineIBT to poison them during speculative execution (I would be interested if you have a doc ex

[clang] [llvm] [X86] Extend kCFI with a 3-bit arity indicator (PR #121070)

2025-01-10 Thread Matthew Maurer via cfe-commits
maurer wrote: > > If hashing is changed, consider replacing xxhash64 with xxh3+_64bits > > @MaskRay This PR does not change the hashing scheme at all. I think their point is that even if you are not changing the hash scheme, you are proposing breaking compatibility of the identifier with exist