Re: [PATCH] x86: ipc: fix x32 version of shmid64_ds and msqid64_ds

2018-04-22 Thread Arnd Bergmann
On Sun, Apr 22, 2018 at 2:38 PM, H.J. Lu wrote: > On Fri, Apr 20, 2018 at 7:38 AM, Arnd Bergmann wrote: >> On Fri, Apr 20, 2018 at 3:53 PM, Jeffrey Walton wrote: > > Glibc has correct header files for system calls. I have a very old >

Re: [PATCH] x86: ipc: fix x32 version of shmid64_ds and msqid64_ds

2018-04-22 Thread Arnd Bergmann
On Sun, Apr 22, 2018 at 2:38 PM, H.J. Lu wrote: > On Fri, Apr 20, 2018 at 7:38 AM, Arnd Bergmann wrote: >> On Fri, Apr 20, 2018 at 3:53 PM, Jeffrey Walton wrote: > > Glibc has correct header files for system calls. I have a very old > program to check if Linux kernel header files are correct

Re: [PATCH] x86: ipc: fix x32 version of shmid64_ds and msqid64_ds

2018-04-22 Thread H.J. Lu
On Fri, Apr 20, 2018 at 7:38 AM, Arnd Bergmann wrote: > On Fri, Apr 20, 2018 at 3:53 PM, Jeffrey Walton wrote: >>> +#if !defined(__x86_64__) || !defined(__ilp32__) >>> #include >>> +#else >> >> I understand there's some progress having Clang compile the

Re: [PATCH] x86: ipc: fix x32 version of shmid64_ds and msqid64_ds

2018-04-22 Thread H.J. Lu
On Fri, Apr 20, 2018 at 7:38 AM, Arnd Bergmann wrote: > On Fri, Apr 20, 2018 at 3:53 PM, Jeffrey Walton wrote: >>> +#if !defined(__x86_64__) || !defined(__ilp32__) >>> #include >>> +#else >> >> I understand there's some progress having Clang compile the kernel. >> Clang treats __ILP32__ and

Re: [PATCH] x86: ipc: fix x32 version of shmid64_ds and msqid64_ds

2018-04-20 Thread Arnd Bergmann
On Fri, Apr 20, 2018 at 3:53 PM, Jeffrey Walton wrote: >> +#if !defined(__x86_64__) || !defined(__ilp32__) >> #include >> +#else > > I understand there's some progress having Clang compile the kernel. > Clang treats __ILP32__ and friends differently than GCC. I believe >

Re: [PATCH] x86: ipc: fix x32 version of shmid64_ds and msqid64_ds

2018-04-20 Thread Arnd Bergmann
On Fri, Apr 20, 2018 at 3:53 PM, Jeffrey Walton wrote: >> +#if !defined(__x86_64__) || !defined(__ilp32__) >> #include >> +#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

Re: [PATCH] x86: ipc: fix x32 version of shmid64_ds and msqid64_ds

2018-04-20 Thread Jeffrey Walton
Hi Arnd, One comment here: > +#if !defined(__x86_64__) || !defined(__ilp32__) > #include > +#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,

Re: [PATCH] x86: ipc: fix x32 version of shmid64_ds and msqid64_ds

2018-04-20 Thread Jeffrey Walton
Hi Arnd, One comment here: > +#if !defined(__x86_64__) || !defined(__ilp32__) > #include > +#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,

[PATCH] x86: ipc: fix x32 version of shmid64_ds and msqid64_ds

2018-04-20 Thread Arnd Bergmann
A bugfix broke the x32 shmid64_ds and msqid64_ds data structure layout (as seen from user space) a few years ago: Originally, __BITS_PER_LONG was defined as 64 on x32, so we did not have padding after the 64-bit __kernel_time_t fields, After __BITS_PER_LONG got changed to 32, applications would

[PATCH] x86: ipc: fix x32 version of shmid64_ds and msqid64_ds

2018-04-20 Thread Arnd Bergmann
A bugfix broke the x32 shmid64_ds and msqid64_ds data structure layout (as seen from user space) a few years ago: Originally, __BITS_PER_LONG was defined as 64 on x32, so we did not have padding after the 64-bit __kernel_time_t fields, After __BITS_PER_LONG got changed to 32, applications would