This repository was archived by the owner on Nov 8, 2023. It is now read-only.
Commit df9a9de
FROMGIT: cfi: fix conditions for HAVE_CFI_ICALL_NORMALIZE_INTEGERS
The HAVE_CFI_ICALL_NORMALIZE_INTEGERS option has some tricky conditions
when KASAN or GCOV are turned on, as in that case we need some clang and
rustc fixes [1][2] to avoid boot failures. The intent with the current
setup is that you should be able to override the check and turn on the
option if your clang/rustc has the fix. However, this override does not
work in practice. Thus, use the new RUSTC_LLVM_VERSION to correctly
implement the check for whether the fix is available.
Additionally, remove KASAN_HW_TAGS from the list of incompatible
options. The CFI_ICALL_NORMALIZE_INTEGERS option is incompatible with
KASAN because LLVM will emit some constructors when using KASAN that are
assigned incorrect CFI tags. These constructors are emitted due to use
of -fsanitize=kernel-address or -fsanitize=kernel-hwaddress that are
respectively passed when KASAN_GENERIC or KASAN_SW_TAGS are enabled.
However, the KASAN_HW_TAGS option relies on hardware support for MTE
instead and does not pass either flag. (Note also that KASAN_HW_TAGS
does not `select CONSTRUCTORS`.)
Link: llvm/llvm-project#104826 [1]
Link: rust-lang/rust#129373 [2]
Fixes: 4c66f83 ("cfi: encode cfi normalized integers + kasan/gcov bug in Kconfig")
Signed-off-by: Alice Ryhl <[email protected]>
Reviewed-by: Sami Tolvanen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Bug: 359429865
(cherry picked from commit 8b8ca9c
https://github.com/Rust-for-Linux/linux.git rust-fixes)
Change-Id: Iceed2dd26295ae90a797481481abbb6efcb1e8ea
Signed-off-by: Alice Ryhl <[email protected]>1 parent 62376f9 commit df9a9de
2 files changed
+13
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
838 | 838 | | |
839 | 839 | | |
840 | 840 | | |
841 | | - | |
| 841 | + | |
842 | 842 | | |
843 | 843 | | |
844 | 844 | | |
| |||
851 | 851 | | |
852 | 852 | | |
853 | 853 | | |
854 | | - | |
855 | | - | |
856 | | - | |
| 854 | + | |
| 855 | + | |
857 | 856 | | |
858 | | - | |
859 | | - | |
860 | | - | |
| 857 | + | |
| 858 | + | |
861 | 859 | | |
862 | | - | |
863 | | - | |
864 | | - | |
865 | | - | |
866 | | - | |
867 | | - | |
868 | | - | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
869 | 867 | | |
870 | 868 | | |
871 | 869 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1949 | 1949 | | |
1950 | 1950 | | |
1951 | 1951 | | |
1952 | | - | |
| 1952 | + | |
1953 | 1953 | | |
1954 | 1954 | | |
1955 | 1955 | | |
| |||
0 commit comments