From: Andrew Halaney <ahalaney@redhat.com>
To: Borislav Petkov <bp@suse.de>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Randy Dunlap <rdunlap@infradead.org>,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] init: Print out unknown kernel parameters
Date: Wed, 5 May 2021 11:55:42 -0500 [thread overview]
Message-ID: <20210505165542.tpptt5g7ffxcfmxe@halaneylaptop> (raw)
In-Reply-To: <YJLMxXp2f7YvjGJ9@zn.tnic>
On Wed, May 05, 2021 at 06:50:13PM +0200, Borislav Petkov wrote:
> On Wed, May 05, 2021 at 11:37:28AM -0500, Andrew Halaney wrote:
> > I actually did use that recommendation essentially, the patch I've sent
> > is riding on the work done by unknown_bootoption() which is populated by
> > iterating over over the different sections parameters can live in - so
> > this is only printing out arguments that didn't match a known kernel
> > parameter. Sorry if I didn't make that clear earlier, definitely was
> > trying to listen to your advice.
>
> Bah, don't take my "advice" too seriously - I'm just throwing out
> guesses. :-)
>
> So ok, unknown_bootoption() handles those and AFAICT, that gets passed
> to parse_args() with the __start___param and __stop___param range.
>
> But then there is that do_early_param() thing for early params, which
> are different and which are between __setup_start and __setup_end -
> i.e., the ones I meant above.
>
> And that function doesn't do the unknown bootoption handling ;-\
>
> More fun.
>
Ah, but don't worry! It is handled, just secretly:
unknown_bootoption()->obsolete_checksetup() walks __setup_start
:)
> > I'll have to think about this some more (the "did you mean this
> > parameter" part).. that seems like it might be more trouble than it is
> > worth, but I admittedly haven't looked into those cheap algorithms you
> > mentioned yet. The reason I say it might be more trouble than it is
> > worth is because it is easy to say "why didn't my param work", then grep
> > for it in dmesg and find it in the "Unknown command line parameters"
> > list - that's sort of the workflow I imagined would happen when someone
> > mucks with their kernel cli and doesn't get the intended result.
>
> Oh sure - that's what I meant with "cheap". If it can't be done
> elegantly and easily, just forget it. dmesg | grep is a lot easier. :-)
>
> Thx.
>
Still worth considering, so at least lemme ponder it for a day instead
of being lazy.
Thanks,
Andrew
next prev parent reply other threads:[~2021-05-05 17:06 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
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 [this message]
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=20210505165542.tpptt5g7ffxcfmxe@halaneylaptop \
--to=ahalaney@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bp@suse.de \
--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®