[PATCH v2 1/4] arm64: make rodata=on behaviour be the original rodata=full

Huang Shijie shijie at os.amperecomputing.com
Tue Nov 26 00:56:44 PST 2024


Make rodata=on behaviour be the original rodata=full.
After this patch, the rodata=on will be the default,
and the arm64 kernel behaviour will follow the
Documentation/admin-guide/kernel-parameters.txt:
	rodata=		[KNL,EARLY]
		on	Mark read-only kernel memory as read-only (default).

Signed-off-by: Huang Shijie <shijie at os.amperecomputing.com>
---
 arch/arm64/include/asm/setup.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/include/asm/setup.h b/arch/arm64/include/asm/setup.h
index ba269a7a3201..5ded3bd11476 100644
--- a/arch/arm64/include/asm/setup.h
+++ b/arch/arm64/include/asm/setup.h
@@ -21,7 +21,7 @@ static inline bool arch_parse_debug_rodata(char *arg)
 	if (!arg)
 		return false;
 
-	if (!strcmp(arg, "full")) {
+	if (!strcmp(arg, "on")) {
 		rodata_enabled = rodata_full = true;
 		return true;
 	}
@@ -31,7 +31,7 @@ static inline bool arch_parse_debug_rodata(char *arg)
 		return true;
 	}
 
-	if (!strcmp(arg, "on")) {
+	if (!strcmp(arg, "full")) {
 		rodata_enabled = true;
 		rodata_full = false;
 		return true;
-- 
2.40.1




More information about the linux-arm-kernel mailing list