module: Move module_enable_x() and frob_text() in strict_rwx.c
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 23 Feb 2022 09:00:59 +0000 (10:00 +0100)
committerLuis Chamberlain <mcgrof@kernel.org>
Tue, 5 Apr 2022 15:43:04 +0000 (08:43 -0700)
commit32a08c17d8096f0fd2c6600bc5fe8464aaf68ea7
treeca8c7a86bf5a6a83cf56d96f1cdf42353dd28dd3
parent0597579356fe5b6c0b99196e4743d4c2978f654a
module: Move module_enable_x() and frob_text() in strict_rwx.c

Move module_enable_x() together with module_enable_nx() and
module_enable_ro().

Those three functions are going together, they are all used
to set up the correct page flags on the different sections.

As module_enable_x() is used independently of
CONFIG_STRICT_MODULE_RWX, build strict_rwx.c all the time and
use IS_ENABLED(CONFIG_STRICT_MODULE_RWX) when relevant.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
kernel/module/Makefile
kernel/module/internal.h
kernel/module/main.c
kernel/module/strict_rwx.c