mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-28 16:53:49 +00:00
93e34a0b5c
When enabling both KASAN and RETHUNK, objtool emits the following
warnings:
rust/core.o: warning: objtool: asan.module_ctor+0x13: 'naked' return found in MITIGATION_RETHUNK build
rust/core.o: warning: objtool: asan.module_dtor+0x13: 'naked' return found in MITIGATION_RETHUNK build
This is caused by the -Zfunction-return=thunk-extern flag in rustc not
informing LLVM about the mitigation at the module level (it does so at
the function level only currently, which covers most cases, but both
are required), which means that the KASAN functions asan.module_ctor
and asan.module_dtor are generated without the rethunk mitigation.
The other mitigations that we enabled for Rust (SLS, RETPOLINE) do not
have the same bug, as they're being applied through the target-feature
functionality instead.
This is being fixed for rustc 1.83.0, so update Kconfig to reject this
configuration on older compilers.
Link: https://github.com/rust-lang/rust/pull/130824
Fixes:
|
||
---|---|---|
.. | ||
.gitignore | ||
calibrate.c | ||
do_mounts_initrd.c | ||
do_mounts_rd.c | ||
do_mounts.c | ||
do_mounts.h | ||
init_task.c | ||
initramfs.c | ||
Kconfig | ||
main.c | ||
Makefile | ||
noinitramfs.c | ||
version-timestamp.c | ||
version.c |