Re: Compile Error in Linux 6.9-rc4 with Clang 17.0.6

From: Nathan Chancellor
Date: Mon Apr 15 2024 - 18:06:34 EST


On Tue, Apr 16, 2024 at 02:31:52AM +0700, Memet Zx wrote:
> Hello,
>
> I am writing to report a compile error that I encountered while
> building the latest Linux kernel (6.9-rc4) with Clang version 17.0.6.
> The error message is as follows:
>
> ```
> LD vmlinux.o
> vmlinux.o: warning: objtool: __svm_vcpu_run+0x13c: BP used as a scratch register
> vmlinux.o: warning: objtool: __svm_sev_es_vcpu_run+0x32: BP used as a scratch register
> vmlinux.o: warning: objtool: ip_vs_protocol_init() falls through to next function __initstub__kmod_ip_vs_rr__969_123_ip_vs_rr_init6()
> vmlinux.o: warning: objtool: .text.jffs2_erase_pending_blocks: unexpected end of section
> vmlinux.o: warning: objtool: .text.ocfs2_validate_and_adjust_move_goal: unexpected end of section
> vmlinux.o: warning: objtool: .text.__ocfs2_move_extents_range: unexpected end of section
> vmlinux.o: warning: objtool: .text.csio_ln_fdmi_rhba_cbfn: unexpected end of section
> vmlinux.o: warning: objtool: .text.jme_check_link: unexpected end of section
> vmlinux.o: warning: objtool: .text.vhci_coredump_hdr: unexpected end of section
> OBJCOPY modules.builtin.modinfo
> llvm-objcopy-17: error: SHT_STRTAB string table section [index 1173270] is non-null terminated
> make[5]: *** [scripts/Makefile.vmlinux_o:73: modules.builtin.modinfo] Error 1
> make[4]: *** [Makefile:1141: vmlinux_o] Error 2
> make[3]: *** [debian/rules:74: build-arch] Error 2
> dpkg-buildpackage: error: make -f debian/rules binary subprocess returned exit status 2
> make[2]: *** [scripts/Makefile.package:121: bindeb-pkg] Error 2
> make[1]: *** [/workspaces/greentea/linux/Makefile:1541: bindeb-pkg] Error 2
> make: *** [Makefile:240: __sub-make] Error 2
> ```
>
> The build process was terminated with the above error message.
> I have also noticed several warnings related to objtool,
> which may be related to the issue.
>
> The compiler version I used:
>
> ```
> Ubuntu clang version 17.0.6 (++20231208085846+6009708b4367-1~exp1~20231208085949.74)
> Target: x86_64-pc-linux-gnu
> Thread model: posix
> InstalledDir: /usr/bin
> ```
>
> The commit I used is:
>
> ```
> commit 0bbac3facb5d6cc0171c45c9873a2dc96bea9680 (grafted, HEAD -> master, origin/master, origin/HEAD)
> Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> Date: Sun Apr 14 13:38:39 2024 -0700
>
> Linux 6.9-rc4
> ```
>
> And the .config is attached at the end of this email.
>
> I would appreciate it if you could look into this issue and provide
> a fix or workaround.
>
> Thank you for your attention to this matter.

Thanks for the report. Unfortunately, I cannot reproduce this with your
configuration on 6.9-rc4 with either kernel.org LLVM 17.0.6 [1] or
Debian LLVM 17.0.6 [2]. Is this completely reproducible on your side? Is
this something that just started happening with the 6.9 cycle? What is
your build command, as I might just be missing something?

[1]: https://mirrors.edge.kernel.org/pub/tools/llvm/
[2]: ++20231208085813+6009708b4367-1~exp1~20231208085906.81, should be
the same source version and configuration you are using.

Cheers,
Nathan