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]
Message-ID: <18383.48432.414612.650004@harpo.it.uu.se>
Date:	Thu, 6 Mar 2008 10:45:20 +0100
From:	Mikael Pettersson <mikpe@...uu.se>
To:	Aurelien Jarno <aurelien@...el32.net>
Cc:	Joe Buck <Joe.Buck@...opsys.COM>, "H. Peter Anvin" <hpa@...or.com>,
	linux-kernel@...r.kernel.org, gcc@....gnu.org
Subject: Re: Linux doesn't follow x86/x86-64 ABI wrt direction flag

Aurelien Jarno writes:
 > On Wed, Mar 05, 2008 at 11:58:34AM -0800, Joe Buck wrote:
 > > 
 > > Aurelien Jarno wrote:
 > > > >Since version 4.3, gcc changed its behaviour concerning the x86/x86-64 
 > > > >ABI and the direction flag, that is it now assumes that the direction 
 > > > >flag is cleared at the entry of a function and it doesn't clear once 
 > > > >more if needed.
 > > > >...
 > > > >I guess this has to be fixed on the kernel side, but also gcc-4.3 could
 > > > >revert back to the old behaviour, that is clearing the direction flag
 > > > >when entering a routine that touches it until most people are running a
 > > > >fixed kernel.
 > > 
 > > On Wed, Mar 05, 2008 at 08:00:42AM -0800, H. Peter Anvin wrote:
 > > > Linux should definitely follow the ABI.  This is a bug, and a pretty 
 > > > serious such.
 > > 
 > > Unfortunately, there are a lot of kernels out there already with this
 > > problem, and the symptoms are likely to be subtle.  So even if it is true
 > > that it is the kernel that is "in the wrong", I think we still are going
 > > to need to give users a workaround from the gcc side as well.
 > > 
 > > So I think gcc at least needs an *option* to revert to the old behavior,
 > > and there's a good argument to make it the default for now, at least for
 > > x86/x86-64 on Linux.
 > 
 > And for other kernels. I tested OpenBSD 4.1, FreeBSD 6.3, NetBSD 4.0,
 > they have the same behaviour as Linux, that is they don't clear DF
 > before calling the signal handler.

FWIW, Solaris 10 (both 32- and 64-bit) gets it right.
--
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