Skip to content

ARM/arm64: Fix loading of modules with an exit section

James Morse linux-arm-kernel linux-modules 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3module: Expose module_init_layout_section()include/linux/moduleloader.h kernel/module/main.c+6 -10 replies
2/3arm64: module: Use module_init_layout_section() to spot init sectionsarch/arm64/kernel/module-plts.c+1 -11 reply
3/3ARM: module: Use module_init_layout_section() to spot init sectionsarch/arm/kernel/module-plts.c+1 -10 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAdam JohnstonLuis ChamberlainCatalin Marinas
SeriesR-b
1/3
2/3T-b A-b
3/3

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 v1 thread

Cover letter [PATCH 0/3] ARM/arm64: Fix loading of modules with an exit section

Adam reports that Yocto can't load modules on arm64. This turns out to be due to the arch code disagreeing with the core code when it comes to the layout of the modules exit text, resulting in a shortage of PLTs and a bunch of warnings.

arm and arm64 are unusual here as they are counting the PLTs based on the section name. This series exposes the helper that core code uses to decide the layout.

I've been unable to reproduce the behaviour on 32bit - but it looks like its possible to reach the BUG_ON() in get_module_plt(). To test this, disable CONFIG_MODULE_UNLOAD, and try to load modules with relocations in their exit text.

This series is based on v6.5-rc4, and can be retrieved from:
https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git arm64/modules/exit_sections/v1

Thanks,

James Morse (3):
module: Expose module_init_layout_section()
arm64: module: Use module_init_layout_section() to spot init sections
ARM: module: Use module_init_layout_section() to spot init sections

 arch/arm/kernel/module-plts.c   | 2 +-
 arch/arm64/kernel/module-plts.c | 2 +-
 include/linux/moduleloader.h    | 5 +++++
 kernel/module/main.c            | 2 +-
 4 files changed, 8 insertions(+), 3 deletions(-)
Signature · 1 line
2.39.2