This is a note to let you know that I've just added the patch titled modpost: Add '.ltext' and '.ltext.*' to TEXT_SECTIONS to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: modpost-add-.ltext-and-.ltext.-to-text_sections.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 7e3d85ff880b1b5640c7f8a694615380ce09a8a3 Mon Sep 17 00:00:00 2001 From: Nathan Chancellor <nathan@xxxxxxxxxx> Date: Tue, 23 Jan 2024 15:59:55 -0700 Subject: modpost: Add '.ltext' and '.ltext.*' to TEXT_SECTIONS From: Nathan Chancellor <nathan@xxxxxxxxxx> commit 397586506c3da005b9333ce5947ad01e8018a3be upstream. After the linked LLVM change, building ARCH=um defconfig results in a segmentation fault in modpost. Prior to commit a23e7584ecf3 ("modpost: unify 'sym' and 'to' in default_mismatch_handler()"), there was a warning: WARNING: modpost: vmlinux.o(__ex_table+0x88): Section mismatch in reference to the .ltext:(unknown) WARNING: modpost: The relocation at __ex_table+0x88 references section ".ltext" which is not in the list of authorized sections. If you're adding a new section and/or if this reference is valid, add ".ltext" to the list of authorized sections to jump to on fault. This can be achieved by adding ".ltext" to OTHER_TEXT_SECTIONS in scripts/mod/modpost.c. The linked LLVM change moves global objects to the '.ltext' (and '.ltext.*' with '-ffunction-sections') sections with '-mcmodel=large', which ARCH=um uses. These sections should be handled just as '.text' and '.text.*' are, so add them to TEXT_SECTIONS. Cc: stable@xxxxxxxxxxxxxxx Closes: https://github.com/ClangBuiltLinux/linux/issues/1981 Link: https://github.com/llvm/llvm-project/commit/4bf8a688956a759b7b6b8d94f42d25c13c7af130 Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx> Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx> Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- scripts/mod/modpost.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -825,7 +825,8 @@ static void check_section(const char *mo #define DATA_SECTIONS ".data", ".data.rel" #define TEXT_SECTIONS ".text", ".text.*", ".sched.text", \ - ".kprobes.text", ".cpuidle.text", ".noinstr.text" + ".kprobes.text", ".cpuidle.text", ".noinstr.text", \ + ".ltext", ".ltext.*" #define OTHER_TEXT_SECTIONS ".ref.text", ".head.text", ".spinlock.text", \ ".fixup", ".entry.text", ".exception.text", \ ".coldtext", ".softirqentry.text" Patches currently in stable-queue which might be from nathan@xxxxxxxxxx are queue-6.1/drm-amd-display-increase-frame-larger-than-for-all-display_mode_vba-files.patch queue-6.1/modpost-don-t-let-driver-s-reference-.exit.patch queue-6.1/tools-rtla-fix-uninitialized-bucket-data-bucket_size-warning.patch queue-6.1/modpost-include-.text.-in-text_sections.patch queue-6.1/tools-rtla-fix-makefile-compiler-options-for-clang.patch queue-6.1/linux-init-remove-__memexit-annotations.patch queue-6.1/modpost-add-.ltext-and-.ltext.-to-text_sections.patch queue-6.1/tools-rtla-remove-unused-sched_getattr-function.patch queue-6.1/modpost-propagate-w-1-build-option-to-modpost.patch queue-6.1/um-fix-adding-no-pie-for-clang.patch queue-6.1/kbuild-fix-changing-elf-file-type-for-output-of-gen_btf-for-big-endian.patch