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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20180313032609.405-1-mdf@kernel.org>
Date:   Mon, 12 Mar 2018 20:26:09 -0700
From:   Moritz Fischer <mdf@...nel.org>
To:     linux-kernel@...r.kernel.org
Cc:     linux-riscv@...ts.infradead.org, palmer@...ive.com,
        albert@...ive.com, olof@...om.net, Moritz Fischer <mdf@...nel.org>,
        Trung Tran <trung.tran@...us.com>
Subject: [RFC/PATCH] risc-v: Fix issue ignoring CONFIG_CMDLINE_OVERRIDE

Fix issue where CONFIG_CMDLINE_OVERRIDE is being
ignored.

Signed-off-by: Trung Tran <trung.tran@...us.com>
Signed-off-by: Moritz Fischer <mdf@...nel.org>
---

Hi all,

not sure this is the right fix, hopefully someone
can chime in and come up with the correct solution.

Thanks,

Moritz
---
 arch/riscv/kernel/setup.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index 09f7064e898c..e24191a0c244 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -38,6 +38,8 @@
 #include <asm/tlbflush.h>
 #include <asm/thread_info.h>
 
+static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE;
+
 #ifdef CONFIG_DUMMY_CONSOLE
 struct screen_info screen_info = {
 	.orig_video_lines	= 30,
@@ -194,7 +196,11 @@ static void __init setup_bootmem(void)
 
 void __init setup_arch(char **cmdline_p)
 {
+#if defined(CONFIG_CMDLINE_OVERRIDE)
+	*cmdline_p = default_command_line;
+#else
 	*cmdline_p = boot_command_line;
+#endif
 
 	parse_early_param();
 
-- 
2.16.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ