Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2836461pxb; Tue, 12 Oct 2021 14:37:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2cUE8s9svG4gjxGpP1bqi2ASkaNOThw8+exSp4Ciun45k3KoqxM7DnfZziHROG6AUhtBC X-Received: by 2002:a17:90a:9509:: with SMTP id t9mr8849160pjo.149.1634074647764; Tue, 12 Oct 2021 14:37:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634074647; cv=none; d=google.com; s=arc-20160816; b=eZ6/sjm4c/HZX82C29EhyKuBDHQJ6ux31lhhNh21ok0/7tDO+ERd3lOsDibwAj3pq8 aoEgSSbZELd+cOtRWhZXId/RWAsBGOieupmQwBCHT2V1LjBUyIW7LCEZ1y6P3p03QYZh nR6TMz0Is+rPwGy8T+IbO9HRLKuLCz+r5RMkPSiflsglKQjFEmY0nItlwmLcHHjZSRoh m0bPO6MeOzE2ua/C7CFyN31DKWR+dTjFXNsJGwyJso51lqADKLHcwSJNkZ4AP4ed74kI gT81byoQBZgz/gX/kkH/Hoj5p0BicR6uh8gTxenMTuLZDdYkuk71c3+3EV3l5xpzEafu ia2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=SkoPLiocY49c2kTh11FieWxtqcanklmJP04+gg+k/yY=; b=nDUS1K83DtelMIDK2YwuVERca7Q030Y8+QAvppqqwkbwiH+oEk4tSPvYgKc5piKPqT dZNnc7YoQ5Q8EzxqTGjTw5QJfWB+nSxIevjL8iDvR6/wzBW+f21RNIWXL4+Az/S52B9n 3zWw3AAfRxOc0cIPWDYKHAAn3tnDONCDnVfNrtfBOwdaKFpKwEqjq3MbmunfvAYw2tSY vWVF5e8uNopqYyW38DlxlzBYzTA7bNgJmAKsIAMgW0eP7r1tCJJNbTo/kr5y3GjTs5rr knHvx/dA7Rk3GlvNd+O2wzoMedY8E2RGjBKJb9vttNauJU052Xr2+GdLBVgCdcpTH8JJ BxmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="ZF7eVBA/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i10si16010881pgp.630.2021.10.12.14.37.15; Tue, 12 Oct 2021 14:37:27 -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=@redhat.com header.s=mimecast20190719 header.b="ZF7eVBA/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233953AbhJLViX (ORCPT + 99 others); Tue, 12 Oct 2021 17:38:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50945 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233650AbhJLViW (ORCPT ); Tue, 12 Oct 2021 17:38:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634074580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=SkoPLiocY49c2kTh11FieWxtqcanklmJP04+gg+k/yY=; b=ZF7eVBA/34oIxSckjDw1qXwcwbA5dQDtNsAvk9v3hMj7GMqFPdVSEfphrLbkrxHimMpkDk bxp3jP/cnXbrZzjE9R3TuGP2AgqqGFPmlzgqsPOxOSdMebE9IxzmcZHunCmHEXLDiTecMK FsSapoaO/oPRftMDx0EPyxMc4KfQGBc= Received: from mail-io1-f72.google.com (mail-io1-f72.google.com [209.85.166.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-248-Ys3UAjR4Nuqs3OVf8bOJVg-1; Tue, 12 Oct 2021 17:36:19 -0400 X-MC-Unique: Ys3UAjR4Nuqs3OVf8bOJVg-1 Received: by mail-io1-f72.google.com with SMTP id f19-20020a6b6213000000b005ddc4ce4deeso370908iog.0 for ; Tue, 12 Oct 2021 14:36:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SkoPLiocY49c2kTh11FieWxtqcanklmJP04+gg+k/yY=; b=Z+xiVYk7c/LeaT/BYykWhA5C2Apwj3i/7ILDCL/cHiZZFZyIQgc7cGoAoflihHgxzR LR8scqlDZDtZdRfVkMWtPImhnXJr41zuZczh6kod/yNgpWGcfwuOezhjYNZH0NI/T65c O9Tzu4a4D7rmaLxFy++OJ0rBVn2HPwTGwI046U/spDhIsOaa01OHjeAHvaqKftiYBWNG MQdy/ryDNX0TBjK0cv7+ciM5Zq9r6Xx74iWn4Sv1Fd4EUVpLNnjfxDbl66Creq7Qx5UY /EOowXGa/sevxU5GJeDgRNVrJPOZJPTQjQ+dQiaDLs6Bodo28TQLQQmOwIoyULPoi5Ef eB3g== X-Gm-Message-State: AOAM531SlyHZ9mUFrOylzubOJkwa1NbEFlttPO7OX2umftTS4CSReNz9 as3M00m9Py/WApY71ib03FAhiztb7hQFPrZuf1CAz+igTGSQFbeOknOOMuo6S9HeKGnmRIwscvj Oiixl2HwE7tS01+T569bAdgPc X-Received: by 2002:a5d:8493:: with SMTP id t19mr25985186iom.79.1634074578242; Tue, 12 Oct 2021 14:36:18 -0700 (PDT) X-Received: by 2002:a5d:8493:: with SMTP id t19mr25985171iom.79.1634074578030; Tue, 12 Oct 2021 14:36:18 -0700 (PDT) Received: from halaneylaptop.redhat.com (068-184-200-203.res.spectrum.com. [68.184.200.203]) by smtp.gmail.com with ESMTPSA id f3sm5847104ilq.62.2021.10.12.14.36.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 14:36:11 -0700 (PDT) From: Andrew Halaney To: akpm@linux-foundation.org Cc: rostedt@goodmis.org, bp@suse.de, linux-kernel@vger.kernel.org, Andrew Halaney Subject: [PATCH] init: Make unknown command line param message clearer Date: Tue, 12 Oct 2021 16:35:23 -0500 Message-Id: <20211012213523.39801-1-ahalaney@redhat.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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