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: <20070116224705.GJ17269@csclub.uwaterloo.ca>
Date:	Tue, 16 Jan 2007 17:47:05 -0500
From:	lsorense@...lub.uwaterloo.ca (Lennart Sorensen)
To:	takada <takada@....nifty.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: fix typo in geode_configre()@cyrix.c

On Wed, Jan 17, 2007 at 01:38:35AM +0900, takada wrote:
> You are right. I agree to your comment. These variables are needless.
> I made a patch again.
> 
> diff -Narup linux-2.6.19.orig/arch/i386/kernel/cpu/cyrix.c linux-2.6.19/arch/i386/kernel/cpu/cyrix.c
> --- linux-2.6.19.orig/arch/i386/kernel/cpu/cyrix.c	2006-11-30 06:57:37.000000000 +0900
> +++ linux-2.6.19/arch/i386/kernel/cpu/cyrix.c	2007-01-16 19:55:05.000000000 +0900
> @@ -161,19 +161,15 @@ static void __cpuinit set_cx86_inc(void)
>  static void __cpuinit geode_configure(void)
>  {
>  	unsigned long flags;
> -	u8 ccr3, ccr4;
>  	local_irq_save(flags);
>  
>  	/* Suspend on halt power saving and enable #SUSP pin */
>  	setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);
>  
> -	ccr3 = getCx86(CX86_CCR3);
> -	setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10);	/* Enable */
> +	setCx86(CX86_CCR3, (getCx86(CX86_CCR3) & 0x0f) | 0x10);	/* Enable */
>  	
> -	ccr4 = getCx86(CX86_CCR4);
> -	ccr4 |= 0x38;		/* FPU fast, DTE cache, Mem bypass */
> -	
> -	setCx86(CX86_CCR3, ccr3);
> +	/* FPU fast, DTE cache, Mem bypass */
> +	setCx86(CX86_CCR4, getCx86(CX86_CCR4) | 0x30);

Actually is it possible that the original intent was:

ccr3 = getCx86(CX86_CCR3);
setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10);       /* Enable */ /* enable advanced register access?  */

ccr4 = getCx86(CX86_CCR4);
ccr4 |= 0x38;           /* FPU fast, DTE cache, Mem bypass */
setCx86(CX86_CCR4, ccr4);

setCx86(CX86_CCR3, ccr3); /* restore ccr3 register */

Seems something similar with ccr3 was taking place elsewhere in the
function.

--
Len Sorensen
-
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