Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3904894pxb; Wed, 13 Oct 2021 15:51:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzx8CW0r0MLzifk+U+ca1nm6HCObFaOn6x4QC/oiNqF1LKXcHbpKyv4szQHKXnH8jr5RL0O X-Received: by 2002:a62:30c7:0:b0:44c:1ec3:bc31 with SMTP id w190-20020a6230c7000000b0044c1ec3bc31mr2051400pfw.21.1634165462163; Wed, 13 Oct 2021 15:51:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634165462; cv=none; d=google.com; s=arc-20160816; b=jOv2gTa/tdcKJRepyd9uZOjVgyTJ03Iw1NLX99KR9gd1/lxu7Ni4OmCXilo9fgECM4 OYwXE+/K3F00jJPqEGDsz3YxhdvjhHTxNZHJgLixFCpKgcuLPU4iIxCGJMo09ZSVRpUp KGPASFrQPhozZq5w1miSEGjaRSb98ZID0UkCR1izLHzPsrYmoKj5SboMszeTz9wiNBgz RAh2W3ICdLJG+TW3lXbKDExrq4D97RbCoyBS6e1kk9lB7UZt/c99sETSJ285m9dOeuKb +1cmsjXV695h64oPx8pwsxzVy3zUbNNseoMN1RNGvhAFArn7vhlcd5HTKv3TH7a0f2XB uUFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=IPNCwnThf2t1Ii4hs5jFUu0ZSK8PstKHiAQrTyemuXU=; b=VD+KHS4wGbqVRxCTcovip0iXDdXiV3O9IXtXwrJQYx3pA+VgJQ5bOb6tfCx7WFHDoM L8/VgSl1jLhewmn++gTU6akEFsv406EJjXsV8OdWymMcN7iOBDnYWA8Lfif3jF+HEl70 ktSi3XbJCngvxqoRfP33cC2zxxXZk0tzT9lHzzbVv9xFi2iEKfMtnG0HuPhJSvC1W7t9 OmX9AthjnaDvm+y5oZLwCe4PjXPZqr0T6m1SS9qH9obGKkZb7TLAQFCgSzkIXntnz21v Rxm+ZJT9QX68cCF7SK+6rm3nZBWLRSF7a/X7h1Eu5mgjO7m+rmSy+5GzhbKQbDguy2TR ajQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=mkHy3KBn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e25si1243344pgv.612.2021.10.13.15.50.36; Wed, 13 Oct 2021 15:51:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=mkHy3KBn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230396AbhJMWvi (ORCPT + 99 others); Wed, 13 Oct 2021 18:51:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbhJMWvh (ORCPT ); Wed, 13 Oct 2021 18:51:37 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0965C061570 for ; Wed, 13 Oct 2021 15:49:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=IPNCwnThf2t1Ii4hs5jFUu0ZSK8PstKHiAQrTyemuXU=; b=mkHy3KBnPu8RFYERQV5eK5hDd8 eiBovp6x/asrzJeBnzgyvDEHEUuSu2OshMM4+XOzuAWCMYzjqG82IEAJDLW5x+eNRBRxOYyukHN3k /zZNTrpQTxw6JGQ/I9qIOVUH5HTM1yRBDbajoBfpapPZyOv6PfwkgJbdYOPxs3/kaiT3IEJiLlhGy yg7DRZgslLfI8Zr1xma+Oey2pcIsc/dKUI/QSqNnhwAatxB8KV9lXPJfE2Xx2uJsdgmEsx9TgGNvc EvyUeK020H01WoDIlILEl28LPxH59cy/tn4vDfZcXlAFDrC6NevcXKht6LB04daTg5dArBcN6ev1h rC3JzgTw==; Received: from [2601:1c0:6280:3f0::aa0b] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1man3z-000w0v-QA; Wed, 13 Oct 2021 22:49:31 +0000 Subject: Re: [PATCH] init: Make unknown command line param message clearer To: Andrew Halaney , akpm@linux-foundation.org Cc: rostedt@goodmis.org, bp@suse.de, linux-kernel@vger.kernel.org References: <20211013223502.96756-1-ahalaney@redhat.com> From: Randy Dunlap Message-ID: <4e670eb5-2e73-5169-6ae1-6cd2b2ca8013@infradead.org> Date: Wed, 13 Oct 2021 15:49:31 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211013223502.96756-1-ahalaney@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/13/21 3:35 PM, Andrew Halaney wrote: > 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. > > Fixes: 86d1919a4fb0 ("init: print out unknown kernel parameters") > Suggested-by: Steven Rostedt (VMware) > Signed-off-by: Andrew Halaney > --- > > Here's v2 of this. I had to change the code a bit from what Steven > recommended to compile/look proper, but the intended format he had > suggested is still the same. > > v1 -> v2: > * Print a much more concise message > > v1: https://lore.kernel.org/all/20211012213523.39801-1-ahalaney@redhat.com/ > > Thanks, > Andrew > > init/main.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/init/main.c b/init/main.c > index ee4d3e1b3eb9..a286995449e2 100644 > --- a/init/main.c > +++ b/init/main.c > @@ -925,7 +925,9 @@ static void __init print_unknown_bootoptions(void) > 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); > } > > LGTM. Thanks. Acked-by: Randy Dunlap -- ~Randy