[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201205182121.02706.arnd@arndb.de>
Date: Fri, 18 May 2012 21:21:02 +0000
From: Arnd Bergmann <arnd@...db.de>
To: "H.J. Lu" <hjl.tools@...il.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
"H. Peter Anvin" <hpa@...nel.org>, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org, mingo@...nel.org, tglx@...utronix.de,
Paul Mundt <lethal@...ux-sh.org>,
David Howells <dhowells@...hat.com>
Subject: Re: [PATCH 08/10] Use __kernel_ulong_t in struct msqid64_ds
On Friday 18 May 2012, H.J. Lu wrote:
> Since x32 uses the same kernel interface as x86-64 with a few
> exceptions. The current kernel header files with
>
> #ifdef __x86_64__
> # define __BITS_PER_LONG 64
> #else
> # define __BITS_PER_LONG 32
> #endif
>
> #if __BITS_PER_LONG == 64
> Define x86-64 types
> #endif
>
> work fine for x32 even if long for x32 is 32 bits. If __BITS_PER_LONG
> is changed to 32 for x32, many types in kernel header files will be
> wrong for x32.
>
A lot of things are broken if __BITS_PER_LONG is set to 64 in x32 user
space. It was specifically introduced to get around places in exported
headers that incorrectly used '#ifdef CONFIG_64BIT' to define a user
space structure, so that we can depend on whatever the user sees
in bitmasks and other data structures.
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