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, 21 Nov 2012 22:31:11 +0000
From:	"Blower, Melanie" <melanie.blower@...el.com>
To:	"H. Peter Anvin" <hpa@...or.com>
CC:	"tglx@...utronix.de" <tglx@...utronix.de>,
	"mingo@...hat.com" <mingo@...hat.com>,
	"avi@...hat.com" <avi@...hat.com>,
	"x86@...nel.org" <x86@...nel.org>,
	"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: PROBLEM: compilation issue, inline assembly
 arch/x86/kvm/emulate.c fails at -O0

Thank you so much, this patch solves the compilation errors that I was seeing in the Intel compiler, and with gcc -O0
BTW, my charter is to compile the kernel with the Intel compiler, and my testing stops short of verifying that the kernel build actually works.
Best regards, Melanie Blower

-----Original Message-----
From: H. Peter Anvin [mailto:hpa@...or.com] 
Sent: Wednesday, November 21, 2012 4:35 PM
To: Blower, Melanie
Cc: tglx@...utronix.de; mingo@...hat.com; avi@...hat.com; x86@...nel.org; kvm@...r.kernel.org; linux-kernel@...r.kernel.org
Subject: Re: PROBLEM: compilation issue, inline assembly arch/x86/kvm/emulate.c fails at -O0

On 11/14/2012 11:45 AM, Blower, Melanie wrote:
> [1.] gcc -O0 assembly arch/x86/kvm/emulate.c gets compilation failure 
> -- incorrect register restrictions [2.] Full description of the problem/report:
> I'm trying to compile this file at -O0, but gcc chokes in register allocation at the inline assembly.
> 
> In the ordinary Linux build, this file compiles with gcc at -O2, without compilation errors.
> 
> At -O0, gcc chokes with this message: 
> gcc  -w -c ./emulateE.c               // (using preprocessed file)
> ./emulateE.c: In function `em_mul_ex':
> ./emulateE.c:1918:5: error: can't find a register in class `AREG' while reloading `asm'
> ./emulateE.c:1918:5: error: `asm' operand has impossible constraints
> 
> Explanation:
> The file contains an inline asm of a kind:
> 
>     __asm__ __volatile__ ( " ..... " :
> 
>  "=m" ((ctxt)->eflags), "=&r" (_tmp), "+a" (*rax), "+d" (*rdx), "+qm"(ex) :
>  "i" (11), "m" ((ctxt)->src . val), "a" (*rax), "d" (*rdx));
> 
> Note that "+a" in inputs already means that eax is the return value. An then "a" is used as an output constraint too.
> 

Hi Melanie,

Can you test the attached patch?

	-hpa


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ