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] [day] [month] [year] [list]
Date:	Tue, 28 Jan 2014 16:05:07 +0800 (CST)
From:	管雪涛 <gxt@....edu.cn>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	xypron glpk <xypron.glpk@....de>, gxt@...c.pku.edu.cn,
	paul gortmaker <paul.gortmaker@...driver.com>,
	vapier@...too.org, totglx@...utronix.de,
	linux-kernel@...r.kernel.org
Subject: 回复: Re: [PATCH 1/1] __init setup_early_printk: missing initialization

Thanks.

Acked-by: Xuetao Guan <gxt@...c.pku.edu.cn>

----- Andrew Morton <akpm@...ux-foundation.org> 写道:
> On Mon, 27 Jan 2014 19:10:24 +0100 xypron.glpk@....de wrote:
> 
> > From: Heinrich Schuchardt <xypron.glpk@....de>
> > 
> > If is based on uninitialized value keep_early.
> > This leads to unpredictable result.
> > 
> > ...
> >
> > --- a/arch/unicore32/kernel/early_printk.c
> > +++ b/arch/unicore32/kernel/early_printk.c
> > @@ -35,7 +35,7 @@ static struct console early_ocd_console = {
> >  
> >  static int __init setup_early_printk(char *buf)
> >  {
> > -	int keep_early;
> > +	int keep_early = 0;
> >  
> >  	if (!buf || early_console)
> >  		return 0;
> 
> yup.
> 
> But that code is quite overcooked.  How about this?
> 
> --- a/arch/unicore32/kernel/early_printk.c~arch-unicore32-kernel-early_printkc-setup_early_printk-missing-initialization-fix
> +++ a/arch/unicore32/kernel/early_printk.c
> @@ -35,17 +35,11 @@ static struct console early_ocd_console
>  
>  static int __init setup_early_printk(char *buf)
>  {
> -	int keep_early = 0;
> -
>  	if (!buf || early_console)
>  		return 0;
>  
> -	if (strstr(buf, "keep"))
> -		keep_early = 1;
> -
>  	early_console = &early_ocd_console;
> -
> -	if (keep_early)
> +	if (strstr(buf, "keep"))
>  		early_console->flags &= ~CON_BOOT;
>  	else
>  		early_console->flags |= CON_BOOT;
> _
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ