Re: [PATCH v4 00/24] ILP32 for ARM64

From: Arnd Bergmann
Date: Mon May 04 2015 - 06:30:51 EST


On Saturday 18 April 2015 21:24:19 Arnd Bergmann wrote:
> Given Catalin's comments from yesterday, I think we can just fix the
> definitions of 'struct stat64' for asm-generic to make it have the same
> layout as the 64-bit version of 'struct stat', and use that for aarch64-ilp32.
>
> Similarly for the four sysvipc headers, we can have a modified version of
> the asm-generic ones in arch/arm64/uapi/asm, which will use the same layout
> for ilp32 and lp64 without having to set __kernel_ulong_t to 64-bit.

To pick up that earlier thread, I now have a prototype implementation for
converting all 32-bit architectures to use 64-bit time_t.

For 'struct stat', I ended up introducing a new structure on arm32 that
matches the layout of arm64 (and I did the same for all other 32-bit
architectures that have a 64-bit counterpart). This means we can share
the same system calls between arm64-lp64, arm64-ilp32 and arm32 with
64-bit time_t and arm64-aarch32 emulation for 32-bit time_t, while
using the existing compat handling for the original 'struct stat'
emulation in both arm32 and arm64-aarch32.

However, for ipc, the situation is different: I found a way to use
extra padding fields in semid64_ds/shmid64_ds/msqid64_ds, so the
ipc system calls will still use normal 32-bit data structures
on arm32 and arm64-aarch64, but you cannot use them arm64-ilp32,
and will have to #ifdef the three header files there to choose between
the two implementations.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/