History

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().

Arnd Bergmann committed 8 years ago

Commit bf4b6a71 parent 82b355d10 files · +10 −1Browse files

Showing the changes to include/uapi (1 of 10 files). Show all

Unified · Split

include/uapi/asm-generic/unistd.h+2−0
@@ -242,10 +242,12 @@ __SYSCALL(__NR_tee, sys_tee) · 241 unmodified lines
242/* fs/stat.c */242/* fs/stat.c */
243#define __NR_readlinkat 78243#define __NR_readlinkat 78
244__SYSCALL(__NR_readlinkat, sys_readlinkat)244__SYSCALL(__NR_readlinkat, sys_readlinkat)
245#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64)
245#define __NR3264_fstatat 79246#define __NR3264_fstatat 79
246__SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat)247__SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat)
247#define __NR3264_fstat 80248#define __NR3264_fstat 80
248__SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat)249__SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat)
250#endif
249 251
250/* fs/sync.c */252/* fs/sync.c */
251#define __NR_sync 81253#define __NR_sync 81

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t