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:	Sun, 19 Feb 2012 16:51:51 -0800
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
	mingo@...nel.org, tglx@...utronix.de, akpm@...ux-foundation.org,
	hjl.tools@...il.com
Subject: Re: [PATCH 02/30] x86-64: Use explicit sizes in sigcontext.h, prepare
 for x32

On Sun, Feb 19, 2012 at 4:07 PM, H. Peter Anvin <hpa@...or.com> wrote:
>
> Use explicit sizes (__u64) instead of implicit sizes (unsigned long)
> in the definition for sigcontext.h; this will allow this structure to
> be shared between the x86-64 native ABI and the x32 ABI.

Btw, since we had this issue just with autofs: what are the x32 ABI
alignment issues for __u64? Are they like x86-64 ("natural alignment")
or x86-32 ("4-byte alignment")?

I assume they are natural alignment, and as pointed out by Davem, we
do have the versions of u64 that make this explicit: "compat_u64" is
the 4-byte-aligned one, while "__aligned_u64" is the natively aligned
one.

Just plain "__u64" doesn't tell which it is, which is sad and wrong,
but we're likely stuck with it forever. Unless some shining knight
comes and says "__u64 is native alignment, and if you want anything
else, you need to use __compat_u64", and actually fixes the cases
where x86-32 depends on the 4-byte aligned one.

Which would be nice, but sounds unlikely. Shining knights tend to be
rare. But this *could* possibly be automated, so it's not entirely out
of the question.

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