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: <20180925112514.vpxu6ldy3r4hglj6@pathway.suse.cz>
Date:   Tue, 25 Sep 2018 13:25:14 +0200
From:   Petr Mladek <pmladek@...e.com>
To:     zhe.he@...driver.com
Cc:     sergey.senozhatsky@...il.com, rostedt@...dmis.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/2] printk: Fix panic caused by passing log_buf_len
 to command line

On Sat 2018-09-22 23:40:51, zhe.he@...driver.com wrote:
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index 9bf5404..d9821c0 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -1048,7 +1048,14 @@ static void __init log_buf_len_update(unsigned size)
>  /* save requested log_buf_len since it's too early to process it */
>  static int __init log_buf_len_setup(char *str)
>  {
> -	unsigned size = memparse(str, &str);
> +	unsigned int size;
> +
> +	if (!str) {
> +		pr_err("boot command line parameter value not provided\n");

This message is too generic. It would be hard to guess what parameter was
affected. Also it is not fatal, so I would just use warning,
something like:

pr_warn("Warning: No value defined for the command line parameter: log_bug_len\n");

> +		return -EINVAL;
> +	}
> +
> +	size = memparse(str, &str);
>  
>  	log_buf_len_update(size);

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ