]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
modules: fix compile error if don't have strict module rwx
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 25 Jun 2019 09:40:28 +0000 (17:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Sep 2019 07:11:07 +0000 (09:11 +0200)
commitec93d0db91ce977de2babea620c76f0206693471
tree1832801d74f4734bda17bbc6e7a57d9b76891cd7
parent0a199213f586efe53b95cf4d5bfd28ea9db58ca2
modules: fix compile error if don't have strict module rwx

commit 93651f80dcb616b8c9115cdafc8e57a781af22d0 upstream.

If CONFIG_ARCH_HAS_STRICT_MODULE_RWX is not defined,
we need stub for module_enable_nx() and module_enable_x().

If CONFIG_ARCH_HAS_STRICT_MODULE_RWX is defined, but
CONFIG_STRICT_MODULE_RWX is disabled, we need stub for
module_enable_nx.

Move frob_text() outside of the CONFIG_STRICT_MODULE_RWX,
because it is needed anyway.

Fixes: 2eef1399a866 ("modules: fix BUG when load module with rodata=n")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/module.c