Skip to contentSkip to conversation

kernel/modules: fix build without ARCH_HAS_STRICT_MODULE_RWX

PATCH In review Max Filippov 3 participants 3 messages Jun 4, 2020 – Jun 5, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel/modules: fix build without ARCH_HAS_STRICT_MODULE_RWX

On configurations with CONFIG_ARCH_HAS_STRICT_MODULE_RWX disabled kernel build fails with the following message:

kernel/module.c:3593:2: error: implicit declaration of function ‘module_enable_ro’;

Add empty module_enable_ro definition to fix the build.

Fixes e6eff4376e28 ("module: Make module_enable_ro() static again")
---
 kernel/module.c | 1 +
 1 file changed, 1 insertion(+)
kernel/module.c +1 -0
index bca993c5f1bc..a74a29001814 100644
@@ -2038,6 +2038,7 @@ static void module_enable_x(const struct module *mod)
 #else /* !CONFIG_ARCH_HAS_STRICT_MODULE_RWX */
 static void module_enable_nx(const struct module *mod) { }
 static void module_enable_x(const struct module *mod) { }
+static void module_enable_ro(const struct module *mod, bool after_init) {}
 #endif /* CONFIG_ARCH_HAS_STRICT_MODULE_RWX */
 
 
Signature · 1 line
2.20.1
#1 lore raw

Hi,

Quoted 10 lines · Max Filippov

On configurations with CONFIG_ARCH_HAS_STRICT_MODULE_RWX disabled kernel build fails with the following message:

kernel/module.c:3593:2: error: implicit declaration of function ‘module_enable_ro’;

Add empty module_enable_ro definition to fix the build.

Fixes e6eff4376e28 ("module: Make module_enable_ro() static again")

I think the problem should disappear once Jessica sends her pull request for modules tree.

Unfortunate though.

Miroslav

#2 lore raw

+++ Miroslav Benes [05/06/20 09:50 +0200]:

Quoted 10 lines

Hi,

Quoted 6 lines · Max Filippov

On configurations with CONFIG_ARCH_HAS_STRICT_MODULE_RWX disabled kernel build fails with the following message:

kernel/module.c:3593:2: error: implicit declaration of function ‘module_enable_ro’;

Quoted 7 lines
Quoted 4 lines

Add empty module_enable_ro definition to fix the build.

Fixes e6eff4376e28 ("module: Make module_enable_ro() static again")

I think the problem should disappear once Jessica sends her pull request for modules tree.

Yep, the pull request was sent today. So this should get resolved in the next day or two.

Thanks,

Jessica