lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221024093817.3003291-1-tongtiangen@huawei.com>
Date:   Mon, 24 Oct 2022 09:38:17 +0000
From:   Tong Tiangen <tongtiangen@...wei.com>
To:     Mark Rutland <mark.rutland@....com>,
        <linux-kernel@...r.kernel.org>, <will@...nel.org>,
        <ardb@...nel.org>, <linux-arm-kernel@...ts.infradead.org>
CC:     Tong Tiangen <tongtiangen@...wei.com>,
        <wangkefeng.wang@...wei.com>, Guohanjun <guohanjun@...wei.com>
Subject: [PATCH -next] init/main: Use strtobool for param parsing in set_debug_rodata()

Aftern parsing "full", we can still use strtobool rather than "on" and
"off" parsing in set_debug_rodata().

Fixes: 2e8cff0a0eee ("arm64: fix rodata=full")
Signed-off-by: Tong Tiangen <tongtiangen@...wei.com>
---
 init/main.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/init/main.c b/init/main.c
index aa21add5f7c5..f420e20b1fa3 100644
--- a/init/main.c
+++ b/init/main.c
@@ -1463,13 +1463,7 @@ static int __init set_debug_rodata(char *str)
 	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 0;
+	return strtobool(str, &rodata_enabled);
 }
 early_param("rodata", set_debug_rodata);
 #endif
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ