Skip to content

module: Make .static_call_sites read-only after init

Petr Pavlu linux-modules lkml 2 versions – Applied

Status from this message: Queued now on modules-next, for 6.16-rc1.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 7 repliesApplied
  2. v13 patches 2 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3module: Constify parameters of module_enforce_rwx_sections()kernel/module/internal.h kernel/module/strict_rwx.c+6 -40 replies
2/3module: Add a separate function to mark sections as read-only after initkernel/module/internal.h kernel/module/main.c kernel/module/strict_rwx.c+38 -150 replies
3/3module: Make .static_call_sites read-only after initkernel/module/strict_rwx.c+9 -05 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.

PatchLuis ChamberlainSami Tolvanen
SeriesR-b
1/3
2/3
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] module: Make .static_call_sites read-only after init

Section .static_call_sites holds data structures that need to be sorted and processed only at module load time. The section is never modified afterwards. Make it therefore read-only after module initialization to avoid any (non-)accidental modifications.

Changes since v1 [1]:
* Rebase the patches. The kernel now has commit 110b1e070f1d ("module:
Don't fail module loading when setting ro_after_init section RO failed") which addresses a previous problem with handling ro_after_init sections.

[1] https://lore.kernel.org/linux-modules/[email protected]/

Petr Pavlu (3):
module: Constify parameters of module_enforce_rwx_sections()
module: Add a separate function to mark sections as read-only after
init
module: Make .static_call_sites read-only after init

 kernel/module/internal.h   |  7 ++++--
 kernel/module/main.c       | 18 +++------------
 kernel/module/strict_rwx.c | 47 ++++++++++++++++++++++++++++++++++++--
 3 files changed, 53 insertions(+), 19 deletions(-)

base-commit: 848e076317446f9c663771ddec142d7c2eb4cb43

Signature · 1 line
2.43.0