All of
 help / color / mirror / Atom feed
From: Nathan Chancellor <>
To: Masahiro Yamada <>
Cc: Nick Desaulniers <>,
	Tom Rix <>, Nicolas Schier <>,
	Sami Tolvanen <>,
	Vincent Donnefort <>,,,,,
	Nathan Chancellor <>,
	Steffen Klassert <>,
	Daniel Jordan <>,
Subject: [PATCH v3 0/2] Fix lack of section mismatch warnings with LTO
Date: Tue, 13 Dec 2022 11:35:27 -0700	[thread overview]
Message-ID: <> (raw)

Hi all,

Vincent recently reported an issue with lack of section mismatch
warnings with LTO. This is due to commit 6c730bfc894f ("modpost: handle
-ffunction-sections"), which ignores all function sections for modpost.

I believe this is incorrect, as these function sections may still refer
to symbols in other sections and they will ultimately be coalesced into
.text by anyways.

The first patch fixes a warning that I see with allmodconfig + ThinLTO
builds after applying the second patch. The second patch moves ".text.*"
into TEXT_SECTIONS so that modpost audits them for mismatches.

I expect this to go via the kbuild tree with an ack from the padata

Cc: Steffen Klassert <>
Cc: Daniel Jordan <>

  - Stick a comment above padata_work_init() to explain presence of
    __ref (Masahiro, Daniel).
  - Expand on problem in first patch's commit message (Masahiro).
  - Adjust location of __ref within function definition (Daniel)
  - Fix typo in commit message of second patch (Masahiro).

Nathan Chancellor (2):
  padata: Mark padata_work_init() as __ref
  modpost: Include '.text.*' in TEXT_SECTIONS

 kernel/padata.c       | 12 ++++++++++--
 scripts/mod/modpost.c |  4 ++--
 2 files changed, 12 insertions(+), 4 deletions(-)

base-commit: 830b3c68c1fb1e9176028d02ef86f3cf76aa2476

             reply	other threads:[~2022-12-13 18:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 18:35 Nathan Chancellor [this message]
2022-12-13 18:35 ` [PATCH v3 1/2] padata: Mark padata_work_init() as __ref Nathan Chancellor
2022-12-13 18:35 ` [PATCH v3 2/2] modpost: Include '.text.*' in TEXT_SECTIONS Nathan Chancellor
2022-12-14  6:52 ` [PATCH v3 0/2] Fix lack of section mismatch warnings with LTO Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.