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: <20220630043823.19242-1-huanglin@uniontech.com>
Date:   Thu, 30 Jun 2022 12:38:23 +0800
From:   hmy <huanglin@...ontech.com>
To:     robh+dt@...nel.org
Cc:     linux-kernel@...r.kernel.org, hmy <huanglin@...ontech.com>
Subject: [PATCH] FIX CONFIG_CMDLINE is not avail when kernel config line in grub ends with --

when boot_command_line = grub-command "--" CONFIG_CMDLINE,
    parse_args() will exit and without parsing the contents of CONFIG_CMDLINE

Signed-off-by: hmy <huanglin@...ontech.com>
---
 drivers/of/fdt.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index a8f5b6532165..696dc4179944 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -1160,6 +1160,7 @@ int __init early_init_dt_scan_chosen(char *cmdline)
 {
 	int l, node;
 	const char *p;
+	char *q;
 	const void *rng_seed;
 	const void *fdt = initial_boot_params;
 
@@ -1188,6 +1189,9 @@ int __init early_init_dt_scan_chosen(char *cmdline)
 #if defined(CONFIG_CMDLINE_EXTEND)
 	strlcat(cmdline, " ", COMMAND_LINE_SIZE);
 	strlcat(cmdline, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
+	q = strstr(data, "--");
+	if (q)
+		*q = '\0';
 #elif defined(CONFIG_CMDLINE_FORCE)
 	strlcpy(cmdline, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
 #else
-- 
2.20.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ