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:	Wed, 25 Jun 2008 18:51:29 -0300
From:	Glauber Costa <gcosta@...hat.com>
To:	Max Asbock <masbock@...ibm.com>
CC:	tglx <tglx@...utronix.de>, mingo <mingo@...hat.com>,
	hpa <hpa@...or.com>, linux-kernel@...r.kernel.org
Subject: Re: [patch] x86: shift bits the right way in native_read_tscp

Max Asbock wrote:
> native_read_tscp shifts the bits in the high order value in the wrong direction,
> the attached patch fixes that. 
> 
> Signed-off-by: Max Asbock <masbock@...ux.vnet.ibm.com>
> 
> diff -pburN linux/include/asm-x86/msr.h linux.rdtscp/include/asm-x86/msr.h
> --- linux/include/asm-x86/msr.h	2008-06-20 11:51:17.000000000 -0700
> +++ linux.rdtscp/include/asm-x86/msr.h	2008-06-25 14:26:35.000000000 -0700
> @@ -18,7 +18,7 @@ static inline unsigned long long native_
>  	unsigned long low, high;
>  	asm volatile(".byte 0x0f,0x01,0xf9"
>  		     : "=a" (low), "=d" (high), "=c" (*aux));
> -	return low | ((u64)high >> 32);
> +	return low | ((u64)high << 32);
>  }
>  
>  /*
> 
> 
> ---
> Max
> 
> 
uh-oh!

absolutely right

shame on me.
--
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