lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 5 May 2021 16:20:47 +0200
From:   Borislav Petkov <bp@...e.de>
To:     Andrew Halaney <ahalaney@...hat.com>
Cc:     Steven Rostedt <rostedt@...dmis.org>,
        Randy Dunlap <rdunlap@...radead.org>,
        akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] init: Print out unknown kernel parameters

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ