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: <8179020.mG8hWW8BRr@wuerfel>
Date:	Sat, 03 Sep 2011 10:41:16 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	"H.J. Lu" <hjl.tools@...il.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Christoph Hellwig <hch@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Richard Kuo <rkuo@...eaurora.org>,
	Mark Salter <msalter@...hat.com>,
	Jonas Bonn <jonas@...thpole.se>,
	Tobias Klauser <tklauser@...tanz.ch>
Subject: Re: RFD: x32 ABI system call numbers

On Friday 02 September 2011 22:29:38 H. Peter Anvin wrote:
> On 09/02/2011 09:44 PM, H.J. Lu wrote:
> > 
> > Is there a way to support something similar to  __SNATIVE_LONG_TYPE
> > and  __UNATIVE_LONG_TYPE for kernel header files.
> > 
> 
> Again, what is the definition you're looking for?  We have __u64 and
> __s64, but the question is what alignment those types should be using,
> given that we're presumably stuck with using compat_ioctl for ioctl...

I think the above types have to use full 64 bit alignment, otherwise
you are incompatible with any native data structures that have padding
in the 64-bit ABI.

For the ioctl interface however, the __u64/__s64 type in the x32 ABI
must be defined with __attribute__((packed,aligned(4))) to match what
the kernel implements because it emulates the x86-32 ABI.

This also means we need to audit all ioctl definitions that use
some other type like 'unsigned long long' or 'uint64_t' and change
those to use the proper '__u64'.

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