Skip to content

Fix lack of section mismatch warnings with LTO

Nathan Chancellor linux-crypto linux-kbuild linux-patches lkml llvm 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 1 replyIn review
  2. v22 patches 7 repliesSuperseded
  3. v12 patches 8 repliesSuperseded

Changes in v3 from the cover letter

- 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).
v2: https://lore.kernel.org/[email protected]/
v1: https://lore.kernel.org/[email protected]/

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2padata: Mark padata_work_init() as __refkernel/padata.c+10 -20 replies
2/2modpost: Include '.text.*' in TEXT_SECTIONSscripts/mod/modpost.c+2 -20 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchAlexander LobakinSami TolvanenVincent Donnefort
1/2
2/2Reviewed-and-tested-by R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/2] Fix lack of section mismatch warnings with LTO

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 vmlinux.lds 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 maintainers.

Cc Steffen Klassert <[email protected]>
Cc Daniel Jordan <[email protected]>

v3:
- 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).
v2: https://lore.kernel.org/[email protected]/
v1: https://lore.kernel.org/[email protected]/

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

Signature · 1 line
2.39.0