Patch "modpost: Include '.text.*' in TEXT_SECTIONS" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    modpost: Include '.text.*' in 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-include-.text.-in-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 a2633f3fd62266b7b480e2247b48b2400b0b1fbe Mon Sep 17 00:00:00 2001
From: Nathan Chancellor <nathan@xxxxxxxxxx>
Date: Tue, 13 Dec 2022 11:35:29 -0700
Subject: modpost: Include '.text.*' in TEXT_SECTIONS

From: Nathan Chancellor <nathan@xxxxxxxxxx>

commit 19331e84c3873256537d446afec1f6c507f8c4ef upstream.

Commit 6c730bfc894f ("modpost: handle -ffunction-sections") added
".text.*" to the OTHER_TEXT_SECTIONS macro to fix certain section
mismatch warnings. Unfortunately, this makes it impossible for modpost
to warn about section mismatches with LTO, which implies
'-ffunction-sections', as all functions are put in their own
'.text.<func_name>' sections, which may still reference functions in
sections they are not supposed to, such as __init.

Fix this by moving ".text.*" into TEXT_SECTIONS, so that configurations
with '-ffunction-sections' will see warnings about mismatched sections.

Link: https://lore.kernel.org/Y39kI3MOtVI5BAnV@xxxxxxxxxx/
Reported-by: Vincent Donnefort <vdonnefort@xxxxxxxxxx>
Reviewed-and-tested-by: Alexander Lobakin <alexandr.lobakin@xxxxxxxxx>
Reviewed-by: Sami Tolvanen <samitolvanen@xxxxxxxxxx>
Tested-by: Vincent Donnefort <vdonnefort@xxxxxxxxxx>
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 |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -824,10 +824,10 @@ static void check_section(const char *mo
 #define ALL_EXIT_SECTIONS EXIT_SECTIONS
 
 #define DATA_SECTIONS ".data", ".data.rel"
-#define TEXT_SECTIONS ".text", ".text.unlikely", ".sched.text", \
+#define TEXT_SECTIONS ".text", ".text.*", ".sched.text", \
 		".kprobes.text", ".cpuidle.text", ".noinstr.text"
 #define OTHER_TEXT_SECTIONS ".ref.text", ".head.text", ".spinlock.text", \
-		".fixup", ".entry.text", ".exception.text", ".text.*", \
+		".fixup", ".entry.text", ".exception.text", \
 		".coldtext", ".softirqentry.text"
 
 #define INIT_SECTIONS      ".init.*"


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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux