This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] x86: ipc: fix x32 version of shmid64_ds and msqid64_ds
- From: Arnd Bergmann <arnd at arndb dot de>
- To: Jeffrey Walton <noloader at gmail dot com>
- Cc: "the arch/x86 maintainers" <x86 at kernel dot org>, Thomas Gleixner <tglx at linutronix dot de>, Ingo Molnar <mingo at redhat dot com>, "Eric W . Biederman" <ebiederm at xmission dot com>, y2038 Mailman List <y2038 at lists dot linaro dot org>, LKML <linux-kernel at vger dot kernel dot org>, Linux API <linux-api at vger dot kernel dot org>, linux-arch <linux-arch at vger dot kernel dot org>, GNU C Library <libc-alpha at sourceware dot org>, Deepa Dinamani <deepa dot kernel at gmail dot com>, Al Viro <viro at zeniv dot linux dot org dot uk>, Albert ARIBAUD <albert dot aribaud at 3adev dot fr>, linux-s390 <linux-s390 at vger dot kernel dot org>, Martin Schwidefsky <schwidefsky at de dot ibm dot com>, Catalin Marinas <catalin dot marinas at arm dot com>, Will Deacon <will dot deacon at arm dot com>, "open list:RALINK MIPS ARCHITECTURE" <linux-mips at linux-mips dot org>, James Hogan <jhogan at kernel dot org>, Ralf Baechle <ralf at linux-mips dot org>, linuxppc-dev <linuxppc-dev at lists dot ozlabs dot org>, sparclinux <sparclinux at vger dot kernel dot org>, Ben Hutchings <ben at decadent dot org dot uk>, Daniel Schepler <dschepler at gmail dot com>, "H . J . Lu" <hjl dot tools at gmail dot com>, Adam Borowski <kilobyte at angband dot pl>, tg at mirbsd dot de, John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin dot de>, "# 3.4.x" <stable at vger dot kernel dot org>, "H. Peter Anvin" <hpa at zytor dot com>
- Date: Fri, 20 Apr 2018 16:38:29 +0200
- Subject: Re: [PATCH] x86: ipc: fix x32 version of shmid64_ds and msqid64_ds
- References: <CAK8P3a3qAoR1afmTTK1CAp1L81dzwtBL+SKj=QMqD=dBr_8oRQ@mail.gmail.com> <20180420130346.3178914-1-arnd@arndb.de> <CAH8yC8mnfNnG86kgjnfwiZJ0=qN+w=5PVcLcxddaJdDtYbSanA@mail.gmail.com>
On Fri, Apr 20, 2018 at 3:53 PM, Jeffrey Walton <noloader@gmail.com> wrote:
>> +#if !defined(__x86_64__) || !defined(__ilp32__)
>> #include <asm-generic/msgbuf.h>
>> +#else
>
> I understand there's some progress having Clang compile the kernel.
> Clang treats __ILP32__ and friends differently than GCC. I believe
> ILP32 shows up just about everywhere there are 32-bit ints, longs and
> pointers. You might find it on Aarch64 or you might find it on MIPS64
> when using Clang.
>
> I think that means this may be a little suspicious:
>
> > +#if !defined(__x86_64__) || !defined(__ilp32__)
>
> I kind of felt LLVM was wandering away from the x32 ABI, but the LLVM
> devs insisted they were within their purview. Also see
> https://lists.llvm.org/pipermail/cfe-dev/2015-December/046300.html.
>
> Sorry about the top-post. I just wanted to pick out that one piece.
It seems I made a typo and it needs to be __ILP32__ rather than
__ilp32__ (corrected that locally, will resend once we have resolved
this).
Aside from that, the #if check seems to be correct to me: this
is an x86-specific header, so it won't ever be seen on other
architectures. On x86-32, __x86_64__ isn't set, so we don't care
about whether __ilp32__ is set or not, and on x86-64 (lp64),
__ilp32__ is never set, so we still get the asm-generic header.
Arnd