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:	Mon, 08 Sep 2008 12:09:56 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
CC:	Andi Kleen <andi@...stfloor.org>, linux@...dersweb.net,
	linux-kernel@...r.kernel.org,
	the arch/x86 maintainers <x86@...nel.org>
Subject: Re: [BUG] x86 kenel won't boot under Virtual PC

Linus Torvalds wrote:
>>>
>> Yes, it does:
>>
>>   /* We need to decide which NOP sequence to use for 32bit and
>>      64bit. When -mtune= is used:
>>
>>      1. For PROCESSOR_I386, PROCESSOR_I486, PROCESSOR_PENTIUM and
>>      PROCESSOR_GENERIC32, f32_patt will be used.
>>      2. For PROCESSOR_PENTIUMPRO, PROCESSOR_PENTIUM4, PROCESSOR_NOCONA,
>>      PROCESSOR_CORE, PROCESSOR_CORE2, and PROCESSOR_GENERIC64,
>>      alt_long_patt will be used.
>>      3. For PROCESSOR_ATHLON, PROCESSOR_K6, PROCESSOR_K8 and
>>      PROCESSOR_AMDFAM10, alt_short_patt will be used.
>>
>>      When -mtune= isn't used, alt_long_patt will be used if
>>      cpu_arch_isa_flags has Cpu686. Otherwise, f32_patt will
>>      be used.
>>
>> "alt_long_patt" uses NOPL and its variants.
> 
> That is A TOTAL PIECE OF SH*T, and against gcc's own documentation.
> 
> "-mtune=x" is very much defined to be a performance _tuning_ option, not 
> an "architectural" option. 
> 
> Quite frankly, this is a gcc bug. Plain and simple. 
> 

OK, digging some more into this garbage...

Apparently the situation isn't quite as dire as it first seems.
At least gcc 4.3.0 doesn't actually pass -mtune= to gas; it just drops 
the option on the floor.  This means this bug isn't manifest when 
calling from gcc (as opposed to invoking as directly.)

However, I would still like to push the following patch to be on the 
safe side, ok?

	-hpa


View attachment "0002-x86-prevent-binutils-from-being-smart-and-generat.patch" of type "text/x-patch" (1347 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ