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, 27 Jan 2014 08:41:09 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>
CC:	Jiri Kosina <jkosina@...e.cz>, Michael Matz <matz@...e.de>,
	Michal Hocko <mhocko@...e.cz>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] x86: Disable traditional FPU instructions too

On 01/27/2014 08:37 AM, Borislav Petkov wrote:
> Hey guys,
> 
> should we do the below? It looks like we don't disable the generation of
> *all* FPU instructions on x86_64 (commit message below has the rationale
> why).
> 
> We do -msoft-float on 32-bit only and Micha says that -msoft-float and
> -mno-80387 are the same and the gcc manpage says:
> 
>            On machines where a function returns floating-point results in the 80387
>            register stack, some floating-point opcodes may be emitted even if
>            -msoft-float is used.
> 
> and right after, it has also
> 
>        -mno-fp-ret-in-387
>            Do not use the FPU registers for return values of functions.
> 
>            The usual calling convention has functions return values of types "float"
>            and "double" in an FPU register, even if there is no FPU.  The idea is that
>            the operating system should emulate an FPU.
> 
>            The option -mno-fp-ret-in-387 causes such values to be returned in ordinary
>            CPU registers instead.
> 
> Btw, there's this -mno-fp-regs switch too which forces passing of FP
> results of functions in integer registers...
> 

I don't think it'd hurt... although I think the above pretty much
requires that the code contain actual floating-point types to ever be
generated.  The issue with MMX/SSE is that an autovectorizing compiler
could decide to use them for *integer* code.

-mno-fp-ret-in-387 in particular will only ever apply if a function
return type is a floating-point type.

	-hpa


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