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: <44C40CD3.80000@gmail.com>
Date:	Mon, 24 Jul 2006 01:56:44 +0159
From:	Jiri Slaby <jirislaby@...il.com>
To:	hnazfoo@...glemail.com
CC:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Prevent usage of uninitialized variable in transmeta
 cpu driver

Johannes Weiner napsal(a):
> This patch fixes a gcc-`uninitialized' warning in
> arch/i386/kernel/cpu/transmeta.c.

NACK.

Gcc bug, don't hide it (I don't really know, why cpu_rev is zeroed).

[Post only whitespace changes. And note that such changes should be in separated
patches.]

> 
> Signed-off-by: Johannes Weiner <hnazfoo@...il.com>
> 
> ---
> 
> 
> ------------------------------------------------------------------------
> 
> diff --git a/arch/i386/kernel/cpu/transmeta.c b/arch/i386/kernel/cpu/transmeta.c
> index 7214c9b..5b71071 100644
> --- a/arch/i386/kernel/cpu/transmeta.c
> +++ b/arch/i386/kernel/cpu/transmeta.c
> @@ -17,9 +17,9 @@ static void __init init_transmeta(struct
>  
>  	/* Print CMS and CPU revision */
>  	max = cpuid_eax(0x80860000);
> -	cpu_rev = 0;
> +	cpu_rev = cpu_freq = 0;
>  	if ( max >= 0x80860001 ) {
> -		cpuid(0x80860001, &dummy, &cpu_rev, &cpu_freq, &cpu_flags); 
> +		cpuid(0x80860001, &dummy, &cpu_rev, &cpu_freq, &cpu_flags);
>  		if (cpu_rev != 0x02000000) {
>  			printk(KERN_INFO "CPU: Processor revision %u.%u.%u.%u, %u MHz\n",
>  				(cpu_rev >> 24) & 0xff,
> @@ -72,7 +72,7 @@ static void __init init_transmeta(struct
>  	wrmsr(0x80860004, ~0, uk);
>  	c->x86_capability[0] = cpuid_edx(0x00000001);
>  	wrmsr(0x80860004, cap_mask, uk);
> -	
> +
>  	/* If we can run i686 user-space code, call us an i686 */
>  #define USER686 (X86_FEATURE_TSC|X86_FEATURE_CX8|X86_FEATURE_CMOV)
>          if ( c->x86 == 5 && (c->x86_capability[0] & USER686) == USER686 )

regards,
-- 
<a href="http://www.fi.muni.cz/~xslaby/">Jiri Slaby</a>
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8  22A0 32CC 55C3 39D4 7A7E
-
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