[RUST] After enabling RUST objtool reports massive warnings
Hi together,
We have recently synced the config changes introduced in 14fad3df to CachyOS Kernel.
After pushing this build, many people reporting issues, specially with clang built kernels.
Building the latest commit from this repository with pkgctl build --clean
results into following at the objtool part:
vmlinux.o: warning: objtool: _RNvMNtCshyPOIFsUJSF_4core3f32f7next_up+0x47: 'naked' return found in MITIGATION_RETHUNK build
vmlinux.o: warning: objtool: _RNvMNtCshyPOIFsUJSF_4core3f32f9next_down+0x39: 'naked' return found in MITIGATION_RETHUNK build
vmlinux.o: warning: objtool: _RNvNvMNtCshyPOIFsUJSF_4core3f32f7to_bits13ct_f32_to_u32+0x46: 'naked' return found in MITIGATION_RETHUNK build
vmlinux.o: warning: objtool: _RNvNvMNtCshyPOIFsUJSF_4core3f32f9from_bits13ct_u32_to_f32+0x72: 'naked' return found in MITIGATION_RETHUNK build
vmlinux.o: warning: objtool: _RNvMNtCshyPOIFsUJSF_4core3f64d7next_up+0x5b: 'naked' return found in MITIGATION_RETHUNK build
vmlinux.o: warning: objtool: _RNvMNtCshyPOIFsUJSF_4core3f64d9next_down+0x51: 'naked' return found in MITIGATION_RETHUNK build
...
vmlinux.o: warning: objtool: _RNvXsfZ_Cs3r4LqD30Q6s_4uapiNtB6_19compat_group_filterNtNtCshyPOIFsUJSF_4core7default7Default7default+0x18: 'naked' return found in MITIGATION_RETHUNK build
vmlinux.o: warning: objtool: _RNvXsg0_Cs3r4LqD30Q6s_4uapiNtB6_11scm_fp_listNtNtCshyPOIFsUJSF_4core7default7Default7default+0x18: 'naked' return found in MITIGATION_RETHUNK build
vmlinux.o: warning: objtool: _RNvXsge_Cs3r4LqD30Q6s_4uapiNtB6_41ethtool_rx_ntuple_flow_spec__bindgen_ty_1NtNtCshyPOIFsUJSF_4core7default7Default7default+0x4e: 'naked' return found in MITIGATION_RETHUNK build
vmlinux.o: warning: objtool: _RNvXsgo_Cs3r4LqD30Q6s_4uapiNtB6_35ethtool_eth_mac_stats__bindgen_ty_1NtNtCshyPOIFsUJSF_4core7default7Default7default+0x18: 'naked' return found in MITIGATION_RETHUNK build
vmlinux.o: warning: objtool: _RNvXsgh_Cs3r4LqD30Q6s_4uapiNtB6_13ethtool_flashNtNtCshyPOIFsUJSF_4core7default7Default7default+0x18: 'naked' return found in MITIGATION_RETHUNK build
vmlinux.o: warning: objtool: _RNvXsgi_Cs3r4LqD30Q6s_4uapiNtB6_20ethtool_per_queue_opNtNtCshyPOIFsUJSF_4core7default7Default7default+0x18: 'naked' return found in MITIGATION_RETHUNK build
vmlinux.o: warning: objtool: _RNvXsgC_Cs3r4LqD30Q6s_4uapiNtB6_16ethtool_mm_stateNtNtCshyPOIFsUJSF_4core7default7Default7default+0x1e: 'naked' return found in MITIGATION_RETHUNK build
OBJCOPY modules.builtin.modinfo
GEN modules.builtin
The complete warning output can be found here: https://paste.cachyos.org/p/c162918.log
I have talked with Andrea Righi, which was the Kernel Maintainer for Ubuntu and he knew about these issues, when enabling RUST in the Kernel for Ubuntu. Andrea shared me following links about the required patches and their transition:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2007654
It should be considered to either pull these patches in, or dropping the RUST support for now, until this is correctly solved in upstream.