From patchwork Tue Nov 9 02:34:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12609521 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D34DC433EF for ; Tue, 9 Nov 2021 02:34:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 23CBD611CC for ; Tue, 9 Nov 2021 02:34:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 23CBD611CC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id B06346B00D8; Mon, 8 Nov 2021 21:34:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9EBF06B00D9; Mon, 8 Nov 2021 21:34:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7EF7A6B00DA; Mon, 8 Nov 2021 21:34:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0128.hostedemail.com [216.40.44.128]) by kanga.kvack.org (Postfix) with ESMTP id 709336B00D8 for ; Mon, 8 Nov 2021 21:34:29 -0500 (EST) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2FC617CB20 for ; Tue, 9 Nov 2021 02:34:29 +0000 (UTC) X-FDA: 78787823058.31.DA6FC1B Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf15.hostedemail.com (Postfix) with ESMTP id 5F208D0020EE for ; Tue, 9 Nov 2021 02:34:16 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id D006961208; Tue, 9 Nov 2021 02:34:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1636425268; bh=OKdmbgZHg3U10cBTLK0231EdB0xD/wqywqcJSwnKgbA=; h=Date:From:To:Subject:In-Reply-To:From; b=LLzmqeJ6kj9MXICZpP8DkC+gVJSw5EZjMFccc//VWeJwclrJO+q08uR1ibJYunmSl 153O3X9x9yXBOl8+Avovygzb8DTyc0IbU8QoUoM1aMCKiIm+vpWtrZAMcRD8Q3Xujw gK8wqKE5LDvgCS1LNHWMhNMnqS4ovqjDnz3HSkUA= Date: Mon, 08 Nov 2021 18:34:27 -0800 From: Andrew Morton To: ahalaney@redhat.com, akpm@linux-foundation.org, bp@suse.de, linux-mm@kvack.org, mm-commits@vger.kernel.org, rdunlap@infradead.org, rostedt@goodmis.org, torvalds@linux-foundation.org Subject: [patch 56/87] init: make unknown command line param message clearer Message-ID: <20211109023427.MwfRSiD2I%akpm@linux-foundation.org> In-Reply-To: <20211108183057.809e428e841088b657a975ec@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 5F208D0020EE X-Stat-Signature: 1mohcigs91w3w8k4ycm5txua5fi3os6a Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=LLzmqeJ6; dmarc=none; spf=pass (imf15.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-HE-Tag: 1636425256-717748 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Andrew Halaney Subject: init: make unknown command line param message clearer The prior message is confusing users, which is the exact opposite of the goal. If the message is being seen, one of the following situations is happening: 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 To make that more clear to the user, explicitly mention "kernel command line" and also note that the params are still passed to user space to avoid causing any alarm over params intended for init. Link: https://lkml.kernel.org/r/20211013223502.96756-1-ahalaney@redhat.com Fixes: 86d1919a4fb0 ("init: print out unknown kernel parameters") Signed-off-by: Andrew Halaney Suggested-by: Steven Rostedt (VMware) Acked-by: Randy Dunlap Cc: Borislav Petkov Signed-off-by: Andrew Morton --- init/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/init/main.c~init-make-unknown-command-line-param-message-clearer +++ a/init/main.c @@ -924,7 +924,9 @@ static void __init print_unknown_bootopt for (p = &envp_init[2]; *p; p++) end += sprintf(end, " %s", *p); - pr_notice("Unknown command line parameters:%s\n", unknown_options); + /* Start at unknown_options[1] to skip the initial space */ + pr_notice("Unknown kernel command line parameters \"%s\", will be passed to user space.\n", + &unknown_options[1]); memblock_free(unknown_options, len); }