From: Borislav Petkov <bp@suse.de>
To: Andrew Halaney <ahalaney@redhat.com>
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 16:20:47 +0200 [thread overview]
Message-ID: <YJKpv6vjCcCkbzNT@zn.tnic> (raw)
In-Reply-To: <20210504152614.mgiihv4ukqajo3jb@halaneylaptop>
On Tue, May 04, 2021 at 10:26:14AM -0500, Andrew Halaney wrote:
> Definitely a matter of opinion, but with the kernel having specific
> ways to denote init destined parameters (anything after "--") I think
> an unconditional message is acceptable.
Or - and I had alluded to that on IRC - you *actually* know which params
are kernel params:
#define __setup_param(str, unique_id, fn, early) \
static const char __setup_str_##unique_id[] __initconst \
__aligned(1) = str; \
static struct obs_kernel_param __setup_##unique_id \
__used __section(".init.setup") \
^^^^^^^^^^^^^^^^^^
__aligned(__alignof__(struct obs_kernel_param)) \
= { __setup_str_##unique_id, fn, early }
all those guys in the above section.
So you'd have iterate over those and do some cheap version of those
autocorrect algorithms which guess which words you meant. For example,
if you have:
panik_on_oops instead of
panic_on_oops
the difference is one letter so it is likely a mistyped param rather
than something which goes to init or other random garbage and then you
warn.
Something like that.
It would need a lot of experimentation first, though, to see whether
this makes sense and it is workable at all.
Thx.
--
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-05 14:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-03 21:34 [PATCH] init: Print out unknown kernel parameters 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 [this message]
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=YJKpv6vjCcCkbzNT@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