public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] module: Make .static_call_sites read-only after init
@ 2025-03-06 13:13 Petr Pavlu
  2025-03-06 13:13 ` [PATCH v2 1/3] module: Constify parameters of module_enforce_rwx_sections() Petr Pavlu
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Petr Pavlu @ 2025-03-06 13:13 UTC (permalink / raw)
  To: Luis Chamberlain, Petr Pavlu, Peter Zijlstra, Josh Poimboeuf,
	Jason Baron
  Cc: Sami Tolvanen, Daniel Gomez, Steven Rostedt, Ard Biesheuvel,
	Christophe Leroy, linux-modules, linux-kernel

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/20241223093840.29417-1-petr.pavlu@suse.com/

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
-- 
2.43.0


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

end of thread, other threads:[~2025-04-07 14:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-06 13:13 [PATCH v2 0/3] module: Make .static_call_sites read-only after init Petr Pavlu
2025-03-06 13:13 ` [PATCH v2 1/3] module: Constify parameters of module_enforce_rwx_sections() Petr Pavlu
2025-03-06 13:13 ` [PATCH v2 2/3] module: Add a separate function to mark sections as read-only after init Petr Pavlu
2025-03-06 13:13 ` [PATCH v2 3/3] module: Make .static_call_sites " Petr Pavlu
2025-03-06 17:28   ` Christophe Leroy
2025-03-07  0:12     ` Sami Tolvanen
2025-03-12 12:05       ` Petr Pavlu
2025-03-12 23:21         ` Sami Tolvanen
2025-03-13  8:17           ` Petr Pavlu
2025-03-06 17:16 ` [PATCH v2 0/3] " Luis Chamberlain
2025-04-07 14:14 ` Petr Pavlu

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