summaryrefslogtreecommitdiff
path: root/init/main.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-12 17:51:22 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-12 17:51:22 +0300
commita791dc135325862fdf491ac088f54993710e2515 (patch)
tree3fe941c0d8b8d315ad4b2235836462e0820f98ae /init/main.c
parentd11b1e908e9a1301e43cefc37fc17dd2b1257b77 (diff)
parent80e78fcce86de0288793a0ef0f6acf37656ee4cf (diff)
downloadlinux-a791dc135325862fdf491ac088f54993710e2515.tar.xz
Merge 6.0-rc5 into driver-core-next
We need the driver core and debugfs changes in this branch. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/init/main.c b/init/main.c
index 91642a4e69be..1fe7942f5d4a 100644
--- a/init/main.c
+++ b/init/main.c
@@ -1446,13 +1446,25 @@ static noinline void __init kernel_init_freeable(void);
#if defined(CONFIG_STRICT_KERNEL_RWX) || defined(CONFIG_STRICT_MODULE_RWX)
bool rodata_enabled __ro_after_init = true;
+
+#ifndef arch_parse_debug_rodata
+static inline bool arch_parse_debug_rodata(char *str) { return false; }
+#endif
+
static int __init set_debug_rodata(char *str)
{
- if (strtobool(str, &rodata_enabled))
+ if (arch_parse_debug_rodata(str))
+ return 0;
+
+ if (str && !strcmp(str, "on"))
+ rodata_enabled = true;
+ else if (str && !strcmp(str, "off"))
+ rodata_enabled = false;
+ else
pr_warn("Invalid option string for rodata: '%s'\n", str);
- return 1;
+ return 0;
}
-__setup("rodata=", set_debug_rodata);
+early_param("rodata", set_debug_rodata);
#endif
#ifdef CONFIG_STRICT_KERNEL_RWX