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]
Message-ID: <4e670eb5-2e73-5169-6ae1-6cd2b2ca8013@infradead.org>
Date:   Wed, 13 Oct 2021 15:49:31 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Andrew Halaney <ahalaney@...hat.com>, akpm@...ux-foundation.org
Cc:     rostedt@...dmis.org, bp@...e.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] init: Make unknown command line param message clearer

On 10/13/21 3:35 PM, Andrew Halaney wrote:
> The prior message is confusing users, which is the exact opposite of the
> goal. If the message is being seen, one of the following situations is
> happening:
> 
>   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
> 
> To make that more clear to the user, explicitly mention "kernel command
> line" and also note that the params are still passed to user space to
> avoid causing any alarm over params intended for init.
> 
> Fixes: 86d1919a4fb0 ("init: print out unknown kernel parameters")
> Suggested-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
> Signed-off-by: Andrew Halaney <ahalaney@...hat.com>
> ---
> 
> Here's v2 of this. I had to change the code a bit from what Steven
> recommended to compile/look proper, but the intended format he had
> suggested is still the same.
> 
> v1 -> v2:
>   * Print a much more concise message
> 
> v1: https://lore.kernel.org/all/20211012213523.39801-1-ahalaney@redhat.com/
> 
> Thanks,
> Andrew
> 
>   init/main.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/init/main.c b/init/main.c
> index ee4d3e1b3eb9..a286995449e2 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -925,7 +925,9 @@ static void __init print_unknown_bootoptions(void)
>   	for (p = &envp_init[2]; *p; p++)
>   		end += sprintf(end, " %s", *p);
>   
> -	pr_notice("Unknown command line parameters:%s\n", unknown_options);
> +	/* Start at unknown_options[1] to skip the initial space */
> +	pr_notice("Unknown kernel command line parameters \"%s\", will be passed to user space.\n",
> +		&unknown_options[1]);
>   	memblock_free(unknown_options, len);
>   }
>   
> 

LGTM. Thanks.

Acked-by: Randy Dunlap <rdunlap@...radead.org>

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ