From: Borislav Petkov <bp@suse.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Randy Dunlap <rdunlap@infradead.org>,
Andrew Halaney <ahalaney@redhat.com>,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] init: Print out unknown kernel parameters
Date: Tue, 4 May 2021 17:00:51 +0200 [thread overview]
Message-ID: <YJFho3AasxxcD/hH@zn.tnic> (raw)
In-Reply-To: <20210503184606.5e8461c0@gandalf.local.home>
On Mon, May 03, 2021 at 06:46:06PM -0400, Steven Rostedt wrote:
> Note, the issue this is trying to solve is to catch "typos" when someone
> adds a parameter. Perhaps we should add a parameter called "check" and/or a
> config option to always check.
Well, actually, you want this checking to always happen and
unconditionally at that.
The fact that we cannot differentiate between params given to init vs
mistyped params, makes it harder to solve elegantly.
> > > +void print_unknown_bootoptions(void)
static
> > > +{
> > > + const char *const *p;
> > > +
> > > + if (panic_later || (!argv_init[1] && !envp_init[2]))
> > > + return;
> > > +
> > > + pr_notice("Unknown command line parameters:\n");
> > > + for (p = &argv_init[1]; *p; p++)
> > > + pr_notice(" %s\n", *p);
> > > + for (p = &envp_init[2]; *p; p++)
> > > + pr_notice(" %s\n", *p);
> > > +}
>
> Perhaps make this one line, like "Kernel command line:" has.
Yap, only one newline at the end pls.
--
Regards/Gruss,
Boris.
SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
next prev parent reply other threads:[~2021-05-04 15:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-03 21:34 Andrew Halaney
2021-05-03 21:59 ` Randy Dunlap
2021-05-03 22:46 ` Steven Rostedt
2021-05-04 15:00 ` Borislav Petkov [this message]
2021-05-04 15:26 ` Andrew Halaney
2021-05-05 14:20 ` Borislav Petkov
2021-05-05 16:37 ` Andrew Halaney
2021-05-05 16:50 ` Borislav Petkov
2021-05-05 16:55 ` Andrew Halaney
2021-05-05 17:08 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YJFho3AasxxcD/hH@zn.tnic \
--to=bp@suse.de \
--cc=ahalaney@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®