]> www.infradead.org Git - users/jedix/linux-maple.git/commit
module: Add a separate function to mark sections as read-only after init
authorPetr Pavlu <petr.pavlu@suse.com>
Thu, 6 Mar 2025 13:13:53 +0000 (14:13 +0100)
committerPetr Pavlu <petr.pavlu@suse.com>
Sun, 18 May 2025 11:56:21 +0000 (13:56 +0200)
commitf7984942630b0508c44276ceaa3a3a47d8fd3d2c
tree55f3700ba0c35f2fcb2bf62841a7a677675b7aac
parent7bba3167c08a3bebda6e5fcc0179482b4517ba5b
module: Add a separate function to mark sections as read-only after init

Move the logic to mark special sections as read-only after module
initialization into a separate function, along other related code in
strict_rwx.c. Use a table with names of such sections to make it easier to
add more.

Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20250306131430.7016-3-petr.pavlu@suse.com
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
kernel/module/internal.h
kernel/module/main.c
kernel/module/strict_rwx.c