]> git.baikalelectronics.ru Git - kernel.git/commit
module: Add CONFIG_ARCH_WANTS_MODULES_DATA_IN_VMALLOC
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 23 Feb 2022 12:02:14 +0000 (13:02 +0100)
committerLuis Chamberlain <mcgrof@kernel.org>
Tue, 5 Apr 2022 15:43:05 +0000 (08:43 -0700)
commit07ecfb13de9795f4861d16fff9690d3bbbd3fa4e
tree482f7422adef2c1d7f9c5ac85a065be8edcff18d
parent4fdeab563887f79216767b875294fcd2cedf77b1
module: Add CONFIG_ARCH_WANTS_MODULES_DATA_IN_VMALLOC

Add CONFIG_ARCH_WANTS_MODULES_DATA_IN_VMALLOC to allow architectures
to request having modules data in vmalloc area instead of module area.

This is required on powerpc book3s/32 in order to set data non
executable, because it is not possible to set executability on page
basis, this is done per 256 Mbytes segments. The module area has exec
right, vmalloc area has noexec.

This can also be useful on other powerpc/32 in order to maximize the
chance of code being close enough to kernel core to avoid branch
trampolines.

Cc: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
[mcgrof: rebased in light of kernel/module/kdb.c move]
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
arch/Kconfig
include/linux/module.h
kernel/module/internal.h
kernel/module/kdb.c
kernel/module/main.c
kernel/module/procfs.c
kernel/module/strict_rwx.c
kernel/module/tree_lookup.c