Skip to content

Commit 82b355d

Browse files
committed
y2038: Remove newstat family from default syscall set
We have four generations of stat() syscalls: - the oldstat syscalls that are only used on the older architectures - the newstat family that is used on all 64-bit architectures but lacked support for large files on 32-bit architectures. - the stat64 family that is used mostly on 32-bit architectures to replace newstat - statx() to replace all of the above, adding 64-bit timestamps among other things. We already compile stat64 only on those architectures that need it, but newstat is always built, including on those that don't reference it. This adds a new __ARCH_WANT_NEW_STAT symbol along the lines of __ARCH_WANT_OLD_STAT and __ARCH_WANT_STAT64 to control compilation of newstat. All architectures that need it use an explict define, the others now get a little bit smaller, and future architecture (including 64-bit targets) won't ever see it. Acked-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 743f5cd commit 82b355d

File tree

15 files changed

+18
-0
lines changed

15 files changed

+18
-0
lines changed

arch/alpha/include/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#define NR_SYSCALLS 523
88

9+
#define __ARCH_WANT_NEW_STAT
910
#define __ARCH_WANT_OLD_READDIR
1011
#define __ARCH_WANT_STAT64
1112
#define __ARCH_WANT_SYS_GETHOSTNAME

arch/arm/include/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <uapi/asm/unistd.h>
1717
#include <asm/unistd-nr.h>
1818

19+
#define __ARCH_WANT_NEW_STAT
1920
#define __ARCH_WANT_STAT64
2021
#define __ARCH_WANT_SYS_GETHOSTNAME
2122
#define __ARCH_WANT_SYS_PAUSE

arch/arm64/include/uapi/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
*/
1717

1818
#define __ARCH_WANT_RENAMEAT
19+
#define __ARCH_WANT_NEW_STAT
1920

2021
#include <asm-generic/unistd.h>

arch/ia64/include/asm/unistd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#define __IGNORE_vfork /* clone() */
2929
#define __IGNORE_umount2 /* umount() */
3030

31+
#define __ARCH_WANT_NEW_STAT
32+
3133
#if !defined(__ASSEMBLY__) && !defined(ASSEMBLER)
3234

3335
#include <linux/types.h>

arch/m68k/include/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#define NR_syscalls 380
99

10+
#define __ARCH_WANT_NEW_STAT
1011
#define __ARCH_WANT_OLD_READDIR
1112
#define __ARCH_WANT_OLD_STAT
1213
#define __ARCH_WANT_STAT64

arch/microblaze/include/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
/* #define __ARCH_WANT_OLD_READDIR */
1717
/* #define __ARCH_WANT_OLD_STAT */
18+
#define __ARCH_WANT_NEW_STAT
1819
#define __ARCH_WANT_STAT64
1920
#define __ARCH_WANT_SYS_ALARM
2021
#define __ARCH_WANT_SYS_GETHOSTNAME

arch/mips/include/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#ifndef __ASSEMBLY__
2626

27+
#define __ARCH_WANT_NEW_STAT
2728
#define __ARCH_WANT_OLD_READDIR
2829
#define __ARCH_WANT_SYS_ALARM
2930
#define __ARCH_WANT_SYS_GETHOSTNAME

arch/parisc/include/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
141141
return K_INLINE_SYSCALL(name, 5, arg1, arg2, arg3, arg4, arg5); \
142142
}
143143

144+
#define __ARCH_WANT_NEW_STAT
144145
#define __ARCH_WANT_OLD_READDIR
145146
#define __ARCH_WANT_STAT64
146147
#define __ARCH_WANT_SYS_ALARM

arch/powerpc/include/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <linux/compiler.h>
2323
#include <linux/linkage.h>
2424

25+
#define __ARCH_WANT_NEW_STAT
2526
#define __ARCH_WANT_OLD_READDIR
2627
#define __ARCH_WANT_STAT64
2728
#define __ARCH_WANT_SYS_ALARM

arch/s390/include/asm/unistd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#define __IGNORE_pkey_alloc
1616
#define __IGNORE_pkey_free
1717

18+
#define __ARCH_WANT_NEW_STAT
1819
#define __ARCH_WANT_OLD_READDIR
1920
#define __ARCH_WANT_SYS_ALARM
2021
#define __ARCH_WANT_SYS_GETHOSTNAME

0 commit comments

Comments
 (0)