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]
Date:	Wed, 25 May 2011 19:58:26 -0400
From:	Andy Lutomirski <luto@....EDU>
To:	Andi Kleen <andi@...stfloor.org>
CC:	x86@...nel.org, linux-kernel@...r.kernel.org,
	Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 1/3] x86, intel: Output microcode revision v2

On 05/25/2011 03:32 PM, Andi Kleen wrote:
> From: Andi Kleen<ak@...ux.intel.com>
>

[...]

>
> I had to add a memory barrier to native_cpuid to prevent it being
> optimized away when the result is not used.
>

[...]

> @@ -179,7 +181,8 @@ static inline void native_cpuid(unsigned int *eax, unsigned int *ebx,
>   	      "=b" (*ebx),
>   	      "=c" (*ecx),
>   	      "=d" (*edx)
> -	    : "0" (*eax), "2" (*ecx));
> +	    : "0" (*eax), "2" (*ecx)
> +	    : "memory");
>   }
>

[...]

> +		cpuid_eax(1);

I'm confused.  Doesn't "asm volatile" (in native_cpuid) mean "don't 
optimize me out"?

I can't reproduce the disappearance of the cpuid instruction when I 
copied and pasted all the macros.

--Andy
--
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