Message ID | 20151118203620.GC11264@yury-N73SV (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wednesday 18 November 2015 23:36:20 Yury Norov wrote: > On Tue, Nov 17, 2015 at 11:09:05PM +0100, Arnd Bergmann wrote: > > On Wednesday 18 November 2015 00:16:56 Yury Norov wrote: > > > Generic 32-bit and AARCH32 stat64 structures has same names. > > > ILP32 needs generic stat64. So we can either make ILP32 mutual > > > exclusive with AARCH32, or duplicate generic cp_new_stat64 code > > > and struct stat64 to sys_ilp32.c. We choose second because it's > > > more flexible to have independend support for ABIs. > > > > > > > I commented on the previous version, but you have not replied to that, > > or changed anything. > > > > Arnd > > Hi Arnd, > > It seems I misunderstood you. > > Are you OK if we'll enable __ARCH_WANT_COMPAT_STAT64 > for ILP32, as for AARCH32_EL0, and turn glibc to use > struct stat from sysdeps/unix/sysv/linux/bits/stat.h > with this calls? It seems, this is how ARM ABI works. Yes, that's fine. The other approach I suggested was to define a stat64 structure in arch/arm64/include/uapi/asm/stat.h that has the same binary layout as 'struct stat' on arm64, and then use sys_newstat. We are doing it that way in the 64-bit time_t patch set for most architectures, and will assign a new system call number at that point as well. The only two differences between the arm32 'struct stat64' and the arm64 'struct stat' are the size of the time members and the broken __st_ino field on arm32, but that is already handled in glibc. Arnd
diff --git a/arch/arm64/include/asm/stat.h b/arch/arm64/include/asm/stat.h index af04276..15e3559 100644 --- a/arch/arm64/include/asm/stat.h +++ b/arch/arm64/include/asm/stat.h @@ -22,7 +22,6 @@ #include <asm/compat.h> -#ifdef CONFIG_AARCH32_EL0 /* * struct stat64 is needed for compat tasks only. Its definition is different * from the generic struct stat64. @@ -60,4 +59,3 @@ struct stat64 { #endif #endif -#endif diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h index 696e638..3b196f3 100644 --- a/arch/arm64/include/asm/unistd.h +++ b/arch/arm64/include/asm/unistd.h @@ -19,7 +19,6 @@ #endif #ifdef CONFIG_AARCH32_EL0 #define __ARCH_WANT_COMPAT_SYS_GETDENTS64 -#define __ARCH_WANT_COMPAT_STAT64 #define __ARCH_WANT_SYS_GETHOSTNAME #define __ARCH_WANT_SYS_PAUSE #define __ARCH_WANT_SYS_GETPGRP @@ -42,6 +41,7 @@ #define __NR_compat_sigreturn 119 #define __NR_compat_rt_sigreturn 173 +#define __ARCH_WANT_COMPAT_STAT64 #define __ARCH_WANT_SYS_LLSEEK /*