y2038: Remove stat64 family from default syscall set
New architectures should no longer need stat64, which is not y2038 safe and has been replaced by statx(). This removes the 'select __ARCH_WANT_STAT64' statement from asm-generic/unistd.h and instead moves it into the respective asm/unistd.h UAPI header files for each architecture that uses it today. In the generic file, the system call number and entry points are now made conditional, so newly added architectures (e.g. riscv32 or csky) will never need to carry backwards compatiblity for it. arm64 is the only 64-bit architecture using the asm-generic/unistd.h file, and it already sets __ARCH_WANT_NEW_STAT in its headers, and I use the same #ifdef here: future 64-bit architectures therefore won't see newstat or stat64 any more. They don't suffer from the y2038 time_t overflow, but for consistency it seems best to also let them use statx(). Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
82b355d161
commit
bf4b6a7d37
|
@ -17,6 +17,7 @@
|
|||
#define _UAPI_ASM_ARC_UNISTD_H
|
||||
|
||||
#define __ARCH_WANT_RENAMEAT
|
||||
#define __ARCH_WANT_STAT64
|
||||
#define __ARCH_WANT_SYS_EXECVE
|
||||
#define __ARCH_WANT_SYS_CLONE
|
||||
#define __ARCH_WANT_SYS_VFORK
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#define __ARCH_WANT_RENAMEAT
|
||||
#define __ARCH_WANT_STAT64
|
||||
#define __ARCH_WANT_SYS_CLONE
|
||||
|
||||
/* Use the standard ABI for syscalls. */
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#define __ARCH_NOMMU
|
||||
|
||||
#define __ARCH_WANT_RENAMEAT
|
||||
#define __ARCH_WANT_STAT64
|
||||
|
||||
#include <asm-generic/unistd.h>
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#define sys_mmap2 sys_mmap_pgoff
|
||||
#define __ARCH_WANT_RENAMEAT
|
||||
#define __ARCH_WANT_STAT64
|
||||
#define __ARCH_WANT_SYS_EXECVE
|
||||
#define __ARCH_WANT_SYS_CLONE
|
||||
#define __ARCH_WANT_SYS_VFORK
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
// Copyright (C) 2005-2017 Andes Technology Corporation
|
||||
|
||||
#define __ARCH_WANT_STAT64
|
||||
#define __ARCH_WANT_SYNC_FILE_RANGE2
|
||||
|
||||
/* Use the standard ABI for syscalls */
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#define sys_mmap2 sys_mmap_pgoff
|
||||
|
||||
#define __ARCH_WANT_RENAMEAT
|
||||
#define __ARCH_WANT_STAT64
|
||||
|
||||
/* Use the standard ABI for syscalls */
|
||||
#include <asm-generic/unistd.h>
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#define sys_mmap2 sys_mmap_pgoff
|
||||
|
||||
#define __ARCH_WANT_RENAMEAT
|
||||
#define __ARCH_WANT_STAT64
|
||||
#define __ARCH_WANT_SYS_FORK
|
||||
#define __ARCH_WANT_SYS_CLONE
|
||||
|
||||
|
|
|
@ -15,4 +15,5 @@
|
|||
|
||||
/* Use the standard ABI for syscalls. */
|
||||
#include <asm-generic/unistd.h>
|
||||
#define __ARCH_WANT_STAT64
|
||||
#define __ARCH_WANT_SYS_CLONE
|
||||
|
|
|
@ -8,6 +8,5 @@
|
|||
* be selected by default.
|
||||
*/
|
||||
#if __BITS_PER_LONG == 32
|
||||
#define __ARCH_WANT_STAT64
|
||||
#define __ARCH_WANT_SYS_LLSEEK
|
||||
#endif
|
||||
|
|
|
@ -242,10 +242,12 @@ __SYSCALL(__NR_tee, sys_tee)
|
|||
/* fs/stat.c */
|
||||
#define __NR_readlinkat 78
|
||||
__SYSCALL(__NR_readlinkat, sys_readlinkat)
|
||||
#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64)
|
||||
#define __NR3264_fstatat 79
|
||||
__SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat)
|
||||
#define __NR3264_fstat 80
|
||||
__SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat)
|
||||
#endif
|
||||
|
||||
/* fs/sync.c */
|
||||
#define __NR_sync 81
|
||||
|
|
Loading…
Reference in a new issue