linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] module: fix DEBUG_SET_MODULE_RONX typo
@ 2016-11-28 14:59 Arnd Bergmann
  2016-11-28 19:46 ` Jessica Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2016-11-28 14:59 UTC (permalink / raw)
  To: Jessica Yu
  Cc: Mark Rutland, AKASHI Takahiro, Kees Cook, Rusty Russell,
	Arnd Bergmann, Andrew Morton, linux-kernel

The newly added 'rodata_enabled' global variable is protected by
the wrong #ifdef, leading to a link error when CONFIG_DEBUG_SET_MODULE_RONX
is turned on:

kernel/module.o: In function `disable_ro_nx':
module.c:(.text.unlikely.disable_ro_nx+0x88): undefined reference to `rodata_enabled'
kernel/module.o: In function `module_disable_ro':
module.c:(.text.module_disable_ro+0x8c): undefined reference to `rodata_enabled'
kernel/module.o: In function `module_enable_ro':
module.c:(.text.module_enable_ro+0xb0): undefined reference to `rodata_enabled'

CONFIG_SET_MODULE_RONX does not exist, so use the correct one instead.

Fixes: 39290b389ea2 ("module: extend 'rodata=off' boot cmdline parameter to module mappings")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 init/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/main.c b/init/main.c
index 4b529c74a0e2..74cf81e2b9d0 100644
--- a/init/main.c
+++ b/init/main.c
@@ -923,7 +923,7 @@ static int try_to_run_init_process(const char *init_filename)
 
 static noinline void __init kernel_init_freeable(void);
 
-#if defined(CONFIG_DEBUG_RODATA) || defined(CONFIG_SET_MODULE_RONX)
+#if defined(CONFIG_DEBUG_RODATA) || defined(CONFIG_DEBUG_SET_MODULE_RONX)
 bool rodata_enabled __ro_after_init = true;
 static int __init set_debug_rodata(char *str)
 {
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: module: fix DEBUG_SET_MODULE_RONX typo
  2016-11-28 14:59 [PATCH] module: fix DEBUG_SET_MODULE_RONX typo Arnd Bergmann
@ 2016-11-28 19:46 ` Jessica Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Jessica Yu @ 2016-11-28 19:46 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mark Rutland, AKASHI Takahiro, Kees Cook, Rusty Russell,
	Andrew Morton, linux-kernel

+++ Arnd Bergmann [28/11/16 15:59 +0100]:
>The newly added 'rodata_enabled' global variable is protected by
>the wrong #ifdef, leading to a link error when CONFIG_DEBUG_SET_MODULE_RONX
>is turned on:
>
>kernel/module.o: In function `disable_ro_nx':
>module.c:(.text.unlikely.disable_ro_nx+0x88): undefined reference to `rodata_enabled'
>kernel/module.o: In function `module_disable_ro':
>module.c:(.text.module_disable_ro+0x8c): undefined reference to `rodata_enabled'
>kernel/module.o: In function `module_enable_ro':
>module.c:(.text.module_enable_ro+0xb0): undefined reference to `rodata_enabled'
>
>CONFIG_SET_MODULE_RONX does not exist, so use the correct one instead.
>
>Fixes: 39290b389ea2 ("module: extend 'rodata=off' boot cmdline parameter to module mappings")
>Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied, thanks.

Jessica

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-28 19:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-28 14:59 [PATCH] module: fix DEBUG_SET_MODULE_RONX typo Arnd Bergmann
2016-11-28 19:46 ` Jessica Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).