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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 12 Apr 2024 14:18:22 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Yuntao Wang <ytcoode@...il.com>
Cc: akpm@...ux-foundation.org, arnd@...db.de, changbin.du@...wei.com,
 christophe.leroy@...roup.eu, geert@...ux-m68k.org, jpoimboe@...nel.org,
 kjlx@...pleofstupid.com, linux-kernel@...r.kernel.org,
 linux-trace-kernel@...r.kernel.org, ndesaulniers@...gle.com,
 peterz@...radead.org, tglx@...utronix.de, tj@...nel.org
Subject: Re: [PATCH v2] init/main.c: Remove redundant space from
 saved_command_line

On Fri, 12 Apr 2024 11:29:50 +0800
Yuntao Wang <ytcoode@...il.com> wrote:

> There is a space at the end of extra_init_args. In the current logic,
> copying extra_init_args to saved_command_line will cause extra spaces
> in saved_command_line here or there. Remove the trailing space from
> extra_init_args to make the string in saved_command_line look more perfect.
> 
> Signed-off-by: Yuntao Wang <ytcoode@...il.com>

OK, this looks good to me.

Acked-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>

Let me pick this to bootconfig/for-next.

Thank you,

> ---
> v1 -> v2: Fix the issue using the method suggested by Masami
> 
>  init/main.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/init/main.c b/init/main.c
> index 881f6230ee59..0f03dd15e0e2 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -627,8 +627,10 @@ static void __init setup_command_line(char *command_line)
>  
>  	if (extra_command_line)
>  		xlen = strlen(extra_command_line);
> -	if (extra_init_args)
> +	if (extra_init_args) {
> +		extra_init_args = strim(extra_init_args); /* remove trailing space */
>  		ilen = strlen(extra_init_args) + 4; /* for " -- " */
> +	}
>  
>  	len = xlen + strlen(boot_command_line) + 1;
>  
> -- 
> 2.44.0
> 

-- 
Masami Hiramatsu (Google) <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ