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: <20211012213523.39801-1-ahalaney@redhat.com>
Date:   Tue, 12 Oct 2021 16:35:23 -0500
From:   Andrew Halaney <ahalaney@...hat.com>
To:     akpm@...ux-foundation.org
Cc:     rostedt@...dmis.org, bp@...e.de, linux-kernel@...r.kernel.org,
        Andrew Halaney <ahalaney@...hat.com>
Subject: [PATCH] init: Make unknown command line param message clearer

The prior message is confusing users, which is the exact opposite of the
goal. Try and make it clear (without needing to look at the kernel
source) that the message is indicating one of the following
situations:

 1. the param is misspelled
 2. the param is not valid due to the kernel configuration
 3. the param is intended for init but isn't after the '--'
    delineator on the command line

On that same topic, also make it clear that these params are passed to
init still despite not being after the delineator.

Fixes: 86d1919a4fb0 ("init: print out unknown kernel parameters")
Signed-off-by: Andrew Halaney <ahalaney@...hat.com>
---

I'm not a huge fan of the wall of text this adds, but at the same time
I've had a few people come to me with confusion about the message and
concern that userspace isn't getting the params (not the case here, it's
just a cosmetic message). I'm open to better ideas on how to express
what I describe in the commit message, or if people think the message is
more confusing than useful a full revert would be ok with me too
(although I do think it is useful personally).

Thanks,
Andrew

 init/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/init/main.c b/init/main.c
index ee4d3e1b3eb9..8dc88c2386ee 100644
--- a/init/main.c
+++ b/init/main.c
@@ -925,6 +925,10 @@ static void __init print_unknown_bootoptions(void)
 	for (p = &envp_init[2]; *p; p++)
 		end += sprintf(end, " %s", *p);
 
+	pr_notice("The kernel command line has unknown parameters. They are either\n");
+	pr_notice("misspelled, not valid for the current kernel configuration,\n");
+	pr_notice("or are meant for init but are not after the '--' delineator. They will\n");
+	pr_notice("be passed to init along with those after '--' on the command line.\n");
 	pr_notice("Unknown command line parameters:%s\n", unknown_options);
 	memblock_free(unknown_options, len);
 }
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ