[clang] [llvm] Fix KCFI types for generated functions with integer normalization (PR #104826)

2024-10-30 Thread Alice Ryhl via cfe-commits

Darksonn wrote:

This [has landed in 
19.1.3](https://discourse.llvm.org/t/llvm-19-1-3-relased/82829). Thanks!

https://github.com/llvm/llvm-project/pull/104826
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2024-11-26 Thread Alice Ryhl via cfe-commits

Darksonn wrote:

Rust already supports kCFI and I see no reason it can't also support this 
scheme. We just need to be careful to introduce it in a good way that reduces 
the risk of mismatched hashing strategies.

https://github.com/llvm/llvm-project/pull/117121
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2024-11-26 Thread Alice Ryhl via cfe-commits

Darksonn wrote:

> AFAIK the use case for KCFI is very narrow: the x86-64 Linux kernel.

At the very least, it's also used in the arm64 Linux Kernel.

https://github.com/llvm/llvm-project/pull/117121
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2024-11-26 Thread Alice Ryhl via cfe-commits

Darksonn wrote:

Sami, I'm guessing you're mainly talking about rustc and clang needing to use 
llvm versions that agree on the kCFI implementation in use? Or are there 
additional things we need to do to make Rust support it / some fundamental 
reason this approach can't work in Rust?

Either way, it would be nice to have some way to set the hashing method being 
used, or at least, a way to query which hashing strategy is used. We are going 
to want logic in Kconfig to ensure that rustc and clang use the same strategy, 
or at least a way to detect when they don't so we can fail the build with a 
good error message.

cc @maurer 

https://github.com/llvm/llvm-project/pull/117121
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2024-11-26 Thread Alice Ryhl via cfe-commits

Darksonn wrote:

FYI cc: @bjorn3 @RalfJung @rcvalle

https://github.com/llvm/llvm-project/pull/117121
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2025-01-10 Thread Alice Ryhl via cfe-commits


@@ -254,6 +254,7 @@ FEATURE(is_trivially_constructible, LangOpts.CPlusPlus)
 FEATURE(is_trivially_copyable, LangOpts.CPlusPlus)
 FEATURE(is_union, LangOpts.CPlusPlus)
 FEATURE(kcfi, LangOpts.Sanitize.has(SanitizerKind::KCFI))
+FEATURE(kcfi_x86_arity, LangOpts.Sanitize.has(SanitizerKind::KCFI))

Darksonn wrote:

I still think it would be best to support both hash types via flags to avoid 
limiting which compiler versions work together.

https://github.com/llvm/llvm-project/pull/121070
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits