Linux kernel -stable discussions
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] modpost: Add .irqentry.text to OTHER_SECTIONS" failed to apply to 5.4-stable tree
@ 2024-12-10  9:30 gregkh
  2024-12-10 11:13 ` [PATCH 5.4.y] modpost: Add .irqentry.text to OTHER_SECTIONS Sergey Senozhatsky
  0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2024-12-10  9:30 UTC (permalink / raw)
  To: tglx, masahiroy, senozhatsky; +Cc: stable


The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.4.y
git checkout FETCH_HEAD
git cherry-pick -x 7912405643a14b527cd4a4f33c1d4392da900888
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2024121044-elbow-varmint-5f14@gregkh' --subject-prefix 'PATCH 5.4.y' HEAD^..

Possible dependencies:



thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 7912405643a14b527cd4a4f33c1d4392da900888 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Sun, 1 Dec 2024 12:17:30 +0100
Subject: [PATCH] modpost: Add .irqentry.text to OTHER_SECTIONS

The compiler can fully inline the actual handler function of an interrupt
entry into the .irqentry.text entry point. If such a function contains an
access which has an exception table entry, modpost complains about a
section mismatch:

  WARNING: vmlinux.o(__ex_table+0x447c): Section mismatch in reference ...

  The relocation at __ex_table+0x447c references section ".irqentry.text"
  which is not in the list of authorized sections.

Add .irqentry.text to OTHER_SECTIONS to cure the issue.

Reported-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org # needed for linux-5.4-y
Link: https://lore.kernel.org/all/20241128111844.GE10431@google.com/
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 0584cbcdbd2d..fb787a5715f5 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -772,7 +772,7 @@ static void check_section(const char *modname, struct elf_info *elf,
 		".ltext", ".ltext.*"
 #define OTHER_TEXT_SECTIONS ".ref.text", ".head.text", ".spinlock.text", \
 		".fixup", ".entry.text", ".exception.text", \
-		".coldtext", ".softirqentry.text"
+		".coldtext", ".softirqentry.text", ".irqentry.text"
 
 #define ALL_TEXT_SECTIONS  ".init.text", ".exit.text", \
 		TEXT_SECTIONS, OTHER_TEXT_SECTIONS


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 5.4.y] modpost: Add .irqentry.text to OTHER_SECTIONS
  2024-12-10  9:30 FAILED: patch "[PATCH] modpost: Add .irqentry.text to OTHER_SECTIONS" failed to apply to 5.4-stable tree gregkh
@ 2024-12-10 11:13 ` Sergey Senozhatsky
  2024-12-10 19:24   ` Sasha Levin
  0 siblings, 1 reply; 3+ messages in thread
From: Sergey Senozhatsky @ 2024-12-10 11:13 UTC (permalink / raw)
  To: stable; +Cc: Thomas Gleixner, Sergey Senozhatsky, Masahiro Yamada

From: Thomas Gleixner <tglx@linutronix.de>

The compiler can fully inline the actual handler function of an interrupt
entry into the .irqentry.text entry point. If such a function contains an
access which has an exception table entry, modpost complains about a
section mismatch:

  WARNING: vmlinux.o(__ex_table+0x447c): Section mismatch in reference ...

  The relocation at __ex_table+0x447c references section ".irqentry.text"
  which is not in the list of authorized sections.

Add .irqentry.text to OTHER_SECTIONS to cure the issue.

Reported-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org # needed for linux-5.4-y
Link: https://lore.kernel.org/all/20241128111844.GE10431@google.com/
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
(cherry picked from commit 7912405643a14b527cd4a4f33c1d4392da900888)
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
---
 scripts/mod/modpost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 53e276bb24ac..cb8858388a22 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -963,7 +963,7 @@ static void check_section(const char *modname, struct elf_info *elf,
 		".kprobes.text", ".cpuidle.text", ".noinstr.text"
 #define OTHER_TEXT_SECTIONS ".ref.text", ".head.text", ".spinlock.text", \
 		".fixup", ".entry.text", ".exception.text", ".text.*", \
-		".coldtext"
+		".coldtext", ".irqentry.text"
 
 #define INIT_SECTIONS      ".init.*"
 #define MEM_INIT_SECTIONS  ".meminit.*"
-- 
2.47.1.613.gc27f4b7a9f-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 5.4.y] modpost: Add .irqentry.text to OTHER_SECTIONS
  2024-12-10 11:13 ` [PATCH 5.4.y] modpost: Add .irqentry.text to OTHER_SECTIONS Sergey Senozhatsky
@ 2024-12-10 19:24   ` Sasha Levin
  0 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2024-12-10 19:24 UTC (permalink / raw)
  To: stable; +Cc: Sergey Senozhatsky, Sasha Levin

[ Sasha's backport helper bot ]

Hi,

Found matching upstream commit: 7912405643a14b527cd4a4f33c1d4392da900888

WARNING: Author mismatch between patch and found commit:
Backport author: Sergey Senozhatsky <senozhatsky@chromium.org>
Commit author: Thomas Gleixner <tglx@linutronix.de>


Status in newer kernel trees:
6.12.y | Not found
6.6.y | Not found
6.1.y | Not found
5.15.y | Not found
5.10.y | Not found
5.4.y | Not found

Note: The patch differs from the upstream commit:
---
1:  7912405643a14 < -:  ------------- modpost: Add .irqentry.text to OTHER_SECTIONS
-:  ------------- > 1:  4384906dd88d5 modpost: Add .irqentry.text to OTHER_SECTIONS
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-5.4.y        |  Success    |  Success   |

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-10 19:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-10  9:30 FAILED: patch "[PATCH] modpost: Add .irqentry.text to OTHER_SECTIONS" failed to apply to 5.4-stable tree gregkh
2024-12-10 11:13 ` [PATCH 5.4.y] modpost: Add .irqentry.text to OTHER_SECTIONS Sergey Senozhatsky
2024-12-10 19:24   ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox