y2038: remove time32 ABI on rv32 and csky
Subsystems (21)
Arnd Bergmann
maintainercover y2038: remove time32 ABI on rv32 and csky
This is a follow-up to the y2038 syscall patches that Thomas already merged. Both the csky and riscv maintainers have requested that the time_t syscall ABI should be completely converted before an official glibc port is merged.
The series achieves this in a few steps:
- A couple of bug fixes for minor regressions I introduced in the original series
- A couple of older patches from Yury Norov that I had never merged in the past, these fix up the openat/open_by_handle_at and getrlimit/setrlimit syscalls to disallow the old versions of off_t and rlimit.
- Hiding the deprecated system calls behind an #ifdef in include/uapi/asm-generic/unistd.h
- Changing the two architectures to use the new style syscall ABI for all three types: loff_t, rusage, and time_t.
Arnd Bergmann (5):
asm-generic: Make time32 syscall numbers optional
unicore32: Fix __ARCH_WANT_STAT64 definition
checksyscalls: fix up mq_timedreceive and stat exceptions
csky: Use latest system call ABI
riscv: Use latest system call ABI
Yury Norov (3):
compat ABI: use non-compat openat and open_by_handle_at variants 32-bit userspace ABI: introduce ARCH_32BIT_OFF_T config option
asm-generic: Drop getrlimit and setrlimit syscalls from default list
arch/Kconfig | 15 ++++++++ arch/arc/Kconfig | 1 + arch/arc/include/uapi/asm/unistd.h | 2 ++ arch/arm/Kconfig | 1 + arch/arm64/include/uapi/asm/unistd.h | 2 ++ arch/c6x/Kconfig | 1 + arch/c6x/include/uapi/asm/unistd.h | 2 ++ arch/h8300/Kconfig | 1 + arch/h8300/include/uapi/asm/unistd.h | 2 ++ arch/hexagon/Kconfig | 1 + arch/hexagon/include/uapi/asm/unistd.h | 2 ++ arch/m68k/Kconfig | 1 + arch/microblaze/Kconfig | 1 + arch/mips/Kconfig | 1 + arch/nds32/Kconfig | 1 + arch/nds32/include/uapi/asm/unistd.h | 2 ++ arch/nios2/Kconfig | 1 + arch/nios2/include/uapi/asm/unistd.h | 2 ++ arch/openrisc/Kconfig | 1 + arch/openrisc/include/uapi/asm/unistd.h | 2 ++ arch/parisc/Kconfig | 1 + arch/powerpc/Kconfig | 1 + arch/riscv/include/uapi/asm/unistd.h | 1 + arch/riscv/kernel/vdso/Makefile | 2 ++ arch/sh/Kconfig | 1 + arch/sparc/Kconfig | 1 + arch/unicore32/Kconfig | 1 + arch/unicore32/include/uapi/asm/unistd.h | 4 ++- arch/x86/Kconfig | 1 + arch/x86/um/Kconfig | 1 + arch/xtensa/Kconfig | 1 + include/linux/fcntl.h | 2 +- include/uapi/asm-generic/unistd.h | 46 ++++++++++++++++++++++-- scripts/checksyscalls.sh | 15 ++++++-- 34 files changed, 112 insertions(+), 8 deletions(-)
Signature · 1 line
2.20.0
Arnd Bergmann
maintainerPATCH 1/8 compat ABI: use non-compat openat and open_by_handle_at variants
From: Yury Norov <[email protected]>
The only difference between native and compat openat and open_by_handle_at is that non-compat version forces O_LARGEFILE, and it should be the default behaviour for all architectures, as we are going to drop the support of 32-bit userspace off_t.
--- include/uapi/asm-generic/unistd.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
include/uapi/asm-generic/unistd.h +2 -3
@@ -179,7 +179,7 @@ __SYSCALL(__NR_fchownat, sys_fchownat)#define __NR_fchown 55 __SYSCALL(__NR_fchown, sys_fchown)#define __NR_openat 56 -__SC_COMP(__NR_openat, sys_openat, compat_sys_openat) +__SYSCALL(__NR_openat, sys_openat)#define __NR_close 57 __SYSCALL(__NR_close, sys_close)#define __NR_vhangup 58
@@ -678,8 +678,7 @@ __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark)#define __NR_name_to_handle_at 264 __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at)#define __NR_open_by_handle_at 265 -__SC_COMP (__NR_open_by_handle_at, sys_open_by_handle_at, \ - compat_sys_open_by_handle_at) +__SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at)#define __NR_clock_adjtime 266 __SC_3264(__NR_clock_adjtime, sys_clock_adjtime32, sys_clock_adjtime)#define __NR_syncfs 267
Signature · 1 line
2.20.0
Arnd Bergmann
maintainerPATCH 2/8 32-bit userspace ABI: introduce ARCH_32BIT_OFF_T config option
In reply to Arnd BergmannFrom: Yury Norov <[email protected]>
All new 32-bit architectures should have 64-bit userspace off_t type, but existing architectures has 32-bit ones.
To enforce the rule, new config option is added to arch/Kconfig that defaults ARCH_32BIT_OFF_T to be disabled for new 32-bit architectures. All existing 32-bit architectures enable it explicitly.
New option affects force_o_largefile() behaviour. Namely, if userspace off_t is 64-bits long, we have no reason to reject user to open big files.
Note that even if architectures has only 64-bit off_t in the kernel (arc, c6x, h8300, hexagon, nios2, openrisc, and unicore32), a libc may use 32-bit off_t, and therefore want to limit the file size to 4GB unless specified differently in the open flags.
--- arch/Kconfig | 15 +++++++++++++++ arch/arc/Kconfig | 1 + arch/arm/Kconfig | 1 + arch/c6x/Kconfig | 1 + arch/csky/Kconfig | 1 + arch/h8300/Kconfig | 1 + arch/hexagon/Kconfig | 1 + arch/m68k/Kconfig | 1 + arch/microblaze/Kconfig | 1 + arch/mips/Kconfig | 1 + arch/nds32/Kconfig | 1 + arch/nios2/Kconfig | 1 + arch/openrisc/Kconfig | 1 + arch/parisc/Kconfig | 1 + arch/powerpc/Kconfig | 1 + arch/riscv/Kconfig | 1 + arch/sh/Kconfig | 1 + arch/sparc/Kconfig | 1 + arch/unicore32/Kconfig | 1 + arch/x86/Kconfig | 1 + arch/x86/um/Kconfig | 1 + arch/xtensa/Kconfig | 1 + include/linux/fcntl.h | 2 +- 23 files changed, 37 insertions(+), 1 deletion(-)
arch/Kconfig +15 -0
@@ -276,6 +276,21 @@ config ARCH_THREAD_STACK_ALLOCATOR config ARCH_WANTS_DYNAMIC_TASK_STRUCT bool +config ARCH_32BIT_OFF_T + bool + depends on !64BIT + help + All new 32-bit architectures should have 64-bit off_t type on + userspace side which corresponds to the loff_t kernel type. This + is the requirement for modern ABIs. Some existing architectures + already have 32-bit off_t. This option is enabled for all such + architectures explicitly. Namely: arc, arm, blackfin, cris, frv, + h8300, hexagon, m32r, m68k, metag, microblaze, mips32, mn10300, + nios2, openrisc, parisc32, powerpc32, score, sh, sparc, tile32, + unicore32, x86_32 and xtensa. This is the complete list. Any + new 32-bit architecture should declare 64-bit off_t type on user + side and so should not enable this option. + config HAVE_REGS_AND_STACK_ACCESS_API bool help
arch/arc/Kconfig +1 -0
@@ -14,6 +14,7 @@ config ARC select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC + select ARCH_32BIT_OFF_T select BUILDTIME_EXTABLE_SORT select CLONE_BACKWARDS select COMMON_CLK
arch/arm/Kconfig +1 -0
@@ -2,6 +2,7 @@ config ARM bool default y + select ARCH_32BIT_OFF_T select ARCH_CLOCKSOURCE_DATA select ARCH_DISCARD_MEMBLOCK if !HAVE_ARCH_PFN_VALID && !KEXEC select ARCH_HAS_DEBUG_VIRTUAL if MMU
arch/c6x/Kconfig +1 -0
@@ -6,6 +6,7 @@ config C6X def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE select CLKDEV_LOOKUP
arch/csky/Kconfig +1 -0
@@ -1,5 +1,6 @@ config CSKY def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_USE_BUILTIN_BSWAP
arch/h8300/Kconfig +1 -0
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 config H8300 def_bool y + select ARCH_32BIT_OFF_T select GENERIC_ATOMIC64 select HAVE_UID16 select VIRT_TO_BUS
arch/hexagon/Kconfig +1 -0
@@ -4,6 +4,7 @@ comment "Linux Kernel Configuration for Hexagon" config HEXAGON def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_NO_PREEMPT select HAVE_OPROFILE
arch/m68k/Kconfig +1 -0
@@ -2,6 +2,7 @@ config M68K bool default y + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_DEVICE if HAS_DMA select ARCH_MIGHT_HAVE_PC_PARPORT if ISA select ARCH_NO_COHERENT_DMA_MMAP if !MMU
arch/microblaze/Kconfig +1 -0
@@ -1,5 +1,6 @@ config MICROBLAZE def_bool y + select ARCH_32BIT_OFF_T select ARCH_NO_SWAP select ARCH_HAS_DMA_COHERENT_TO_PFN if MMU select ARCH_HAS_GCOV_PROFILE_ALL
arch/mips/Kconfig +1 -0
@@ -2,6 +2,7 @@ config MIPS bool default y + select ARCH_32BIT_OFF_T if !64BIT select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT select ARCH_CLOCKSOURCE_DATA select ARCH_DISCARD_MEMBLOCK
arch/nds32/Kconfig +1 -0
@@ -5,6 +5,7 @@ config NDS32 def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_WANT_FRAME_POINTERS if FTRACE
arch/nios2/Kconfig +1 -0
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 config NIOS2 def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_NO_SWAP
arch/openrisc/Kconfig +1 -0
@@ -6,6 +6,7 @@ config OPENRISC def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_DEVICE select OF select OF_EARLY_FLATTREE
arch/parisc/Kconfig +1 -0
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 config PARISC def_bool y + select ARCH_32BIT_OFF_T if !64BIT select ARCH_MIGHT_HAVE_PC_PARPORT select HAVE_IDE select HAVE_OPROFILE
arch/powerpc/Kconfig +1 -0
@@ -128,6 +128,7 @@ config PPC # # Please keep this list sorted alphabetically. # + select ARCH_32BIT_OFF_T if PPC32 select ARCH_HAS_DEBUG_VIRTUAL select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAS_DMA_SET_COHERENT_MASK
arch/riscv/Kconfig +1 -0
@@ -11,6 +11,7 @@ config 32BIT config RISCV def_bool y + select ARCH_32BIT_OFF_T if !64BIT # even on 32-bit, physical (and DMA) addresses are > 32-bits select PHYS_ADDR_T_64BIT select OF
arch/sh/Kconfig +1 -0
@@ -62,6 +62,7 @@ config SUPERH config SUPERH32 def_bool "$(ARCH)" = "sh" + select ARCH_32BIT_OFF_T select HAVE_KPROBES select HAVE_KRETPROBES select HAVE_IOREMAP_PROT if MMU && !X2TLB
arch/sparc/Kconfig +1 -0
@@ -49,6 +49,7 @@ config SPARC config SPARC32 def_bool !64BIT + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_CPU select GENERIC_ATOMIC64 select CLZ_TAB
arch/unicore32/Kconfig +1 -0
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 config UNICORE32 def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_MIGHT_HAVE_PC_SERIO
arch/x86/Kconfig +1 -0
@@ -47,6 +47,7 @@ config X86 select ACPI_LEGACY_TABLES_LOOKUP if ACPI select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI select ANON_INODES + select ARCH_32BIT_OFF_T if X86_32 select ARCH_CLOCKSOURCE_DATA select ARCH_CLOCKSOURCE_INIT select ARCH_DISCARD_MEMBLOCK
arch/x86/um/Kconfig +1 -0
@@ -17,6 +17,7 @@ config 64BIT config X86_32 def_bool !64BIT select HAVE_AOUT + select ARCH_32BIT_OFF_T select ARCH_WANT_IPC_PARSE_VERSION select MODULES_USE_ELF_REL select CLONE_BACKWARDS
arch/xtensa/Kconfig +1 -0
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 config XTENSA def_bool y + select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_NO_COHERENT_DMA_MMAP if !MMU
include/linux/fcntl.h +1 -1
@@ -12,7 +12,7 @@ O_NOATIME | O_CLOEXEC | O_PATH | __O_TMPFILE)#ifndef force_o_largefile -#define force_o_largefile () (BITS_PER_LONG != 32) +#define force_o_largefile () (!IS_ENABLED(CONFIG_ARCH_32BIT_OFF_T))#endif #if BITS_PER_LONG ==32
Signature · 1 line
2.20.0
Re: [PATCH 2/8] 32-bit userspace ABI: introduce ARCH_32BIT_OFF_T config option
Hi Arnd, Yuri,
Quoted 17 lines · Arnd Bergmann
From: Yury Norov <[email protected]>
All new 32-bit architectures should have 64-bit userspace
off_ttype, but existing architectures has 32-bit ones.To enforce the rule, new config option is added to
arch/Kconfigthat defaultsARCH_32BIT_OFF_Tto be disabled for new 32-bit architectures. All existing 32-bit architectures enable it explicitly.New option affects
force_o_largefile()behaviour. Namely, if userspaceoff_tis 64-bits long, we have no reason to reject user to open big files.Note that even if architectures has only 64-bit
off_tin the kernel (arc, c6x, h8300, hexagon, nios2, openrisc, and unicore32), a libc may use 32-bitoff_t, and therefore want to limit the file size to 4GB unless specified differently in the open flags.
Quoted 6 lines
Signed-off-by Yury Norov <[email protected]>Acked-by Arnd Bergmann <[email protected]>Signed-off-by Yury Norov <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>arch/m68k/Kconfig | 1 +
For m68k:
Quoted 4 lines
arch/Kconfig +0
-0@@ -276,6 +276,21 @@ config ARCH_THREAD_STACK_ALLOCATOR config ARCH_WANTS_DYNAMIC_TASK_STRUCT
arch/Kconfig config ARCH_THREAD_STACK_ALLOCATOR · line 286
Quoted 10 lines
arch/Kconfig +8
-0bool +config ARCH_32BIT_OFF_T + bool + depends on !64BIT + help + All new 32-bit architectures should have 64-bit off_t type on + userspace side which corresponds to the loff_t kernel type. This + is the requirement for modern ABIs. Some existing architectures + already have 32-bit off_t. This option is enabled for all such
s/already/still/
arch/Kconfig config ARCH_THREAD_STACK_ALLOCATOR · line 290
Quoted 4 lines
arch/Kconfig +4
-0+ architectures explicitly. Namely: arc, arm, blackfin, cris, frv, + h8300, hexagon, m32r, m68k, metag, microblaze, mips32, mn10300, + nios2, openrisc, parisc32, powerpc32, score, sh, sparc, tile32, + unicore32, x86_32 and xtensa. This is the complete list. Any
Do we really need this list here? It's intended to shrink only. It includes removed architectures (blackfin, cris, frv, m32r, metag, mn10300, score, tile32), but lacks several new ones affected by this patch (c6x, csky, nds32, riscv).
arch/Kconfig config ARCH_THREAD_STACK_ALLOCATOR · line 296
Quoted 6 lines
arch/Kconfig +3
-0+ new 32-bit architecture should declare 64-bit off_t type on user + side and so should not enable this option. + config HAVE_REGS_AND_STACK_ACCESS_API bool help
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Arnd Bergmann
maintainerRe: [PATCH 2/8] 32-bit userspace ABI: introduce ARCH_32BIT_OFF_T config option
Quoted 26 lines · Geert Uytterhoeven
Hi Arnd, Yuri,
Quoted 21 lines · Arnd Bergmann
From: Yury Norov <[email protected]>
All new 32-bit architectures should have 64-bit userspace
off_ttype, but existing architectures has 32-bit ones.To enforce the rule, new config option is added to
arch/Kconfigthat defaultsARCH_32BIT_OFF_Tto be disabled for new 32-bit architectures. All existing 32-bit architectures enable it explicitly.New option affects
force_o_largefile()behaviour. Namely, if userspaceoff_tis 64-bits long, we have no reason to reject user to open big files.Note that even if architectures has only 64-bit
off_tin the kernel (arc, c6x, h8300, hexagon, nios2, openrisc, and unicore32), a libc may use 32-bitoff_t, and therefore want to limit the file size to 4GB unless specified differently in the open flags.Signed-off-by Yury Norov <[email protected]>Acked-by Arnd Bergmann <[email protected]>Signed-off-by Yury Norov <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>
Quoted 4 lines
Quoted 1 line
arch/m68k/Kconfig | 1 +For m68k:
Thanks!
Quoted 22 lines
Quoted 4 lines
arch/Kconfig +0
-0@@ -276,6 +276,21 @@ config ARCH_THREAD_STACK_ALLOCATOR config ARCH_WANTS_DYNAMIC_TASK_STRUCTarch/Kconfig config ARCH_THREAD_STACK_ALLOCATOR · line 286
Quoted 10 lines
arch/Kconfig +8
-0bool +config ARCH_32BIT_OFF_T + bool + depends on !64BIT + help + All new 32-bit architectures should have 64-bit off_t type on + userspace side which corresponds to the loff_t kernel type. This + is the requirement for modern ABIs. Some existing architectures + already have 32-bit off_t. This option is enabled for all suchs/already/still/
arch/Kconfig config ARCH_THREAD_STACK_ALLOCATOR · line 290
Quoted 4 lines
arch/Kconfig +4
-0+ architectures explicitly. Namely: arc, arm, blackfin, cris, frv, + h8300, hexagon, m32r, m68k, metag, microblaze, mips32, mn10300, + nios2, openrisc, parisc32, powerpc32, score, sh, sparc, tile32, + unicore32, x86_32 and xtensa. This is the complete list. Any
Quoted 4 lines
Do we really need this list here? It's intended to shrink only. It includes removed architectures (blackfin, cris, frv, m32r, metag, mn10300, score, tile32), but lacks several new ones affected by this patch (c6x, csky, nds32, riscv).
Right, I (finally) took Yury's patch that was already several years old without checking this text (I did make sure all architectures are changed correctly).
I'll just remove the list here.
Arnd
Arnd Bergmann
maintainerPATCH 3/8 asm-generic: Drop getrlimit and setrlimit syscalls from default list
In reply to Arnd BergmannFrom: Yury Norov <[email protected]>
The newer prlimit64 syscall provides all the functionality of getrlimit and setrlimit syscalls and adds the pid of target process, so future architectures won't need to include getrlimit and setrlimit.
Therefore drop getrlimit and setrlimit syscalls from the generic syscall list unless __ARCH_WANT_SET_GET_RLIMIT is defined by the architecture's unistd.h prior to including asm-generic/unistd.h, and adjust all architectures using the generic syscall list to define it so that no in-tree architectures are affected.
--- arch/arc/include/uapi/asm/unistd.h | 1 + arch/arm64/include/uapi/asm/unistd.h | 1 + arch/c6x/include/uapi/asm/unistd.h | 1 + arch/csky/include/uapi/asm/unistd.h | 1 + arch/h8300/include/uapi/asm/unistd.h | 1 + arch/hexagon/include/uapi/asm/unistd.h | 1 + arch/nds32/include/uapi/asm/unistd.h | 1 + arch/nios2/include/uapi/asm/unistd.h | 1 + arch/openrisc/include/uapi/asm/unistd.h | 1 + arch/riscv/include/uapi/asm/unistd.h | 1 + arch/unicore32/include/uapi/asm/unistd.h | 1 + include/uapi/asm-generic/unistd.h | 5 +++++ scripts/checksyscalls.sh | 5 +++++ 13 files changed, 21 insertions(+)
arch/arc/include/uapi/asm/unistd.h +1 -0
@@ -18,6 +18,7 @@#define __ARCH_WANT_RENAMEAT#define __ARCH_WANT_STAT64 +#define __ARCH_WANT_SET_GET_RLIMIT#define __ARCH_WANT_SYS_EXECVE#define __ARCH_WANT_SYS_CLONE#define __ARCH_WANT_SYS_VFORK
arch/arm64/include/uapi/asm/unistd.h +1 -0
@@ -17,5 +17,6 @@#define __ARCH_WANT_RENAMEAT#define __ARCH_WANT_NEW_STAT +#define __ARCH_WANT_SET_GET_RLIMIT#include <asm-generic/unistd.h>
arch/c6x/include/uapi/asm/unistd.h +1 -0
@@ -17,6 +17,7 @@#define __ARCH_WANT_RENAMEAT#define __ARCH_WANT_STAT64 +#define __ARCH_WANT_SET_GET_RLIMIT#define __ARCH_WANT_SYS_CLONE/* Use the standard ABI for syscalls. */
arch/csky/include/uapi/asm/unistd.h +1 -0
@@ -2,6 +2,7 @@// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. #define __ARCH_WANT_SYS_CLONE +#define __ARCH_WANT_SET_GET_RLIMIT#include <asm-generic/unistd.h> #define __NR_set_thread_area (__NR_arch_specific_syscall + 0)
arch/h8300/include/uapi/asm/unistd.h +1 -0
@@ -2,5 +2,6 @@#define __ARCH_WANT_RENAMEAT#define __ARCH_WANT_STAT64 +#define __ARCH_WANT_SET_GET_RLIMIT#include <asm-generic/unistd.h>
arch/hexagon/include/uapi/asm/unistd.h +1 -0
@@ -30,6 +30,7 @@#define sys_mmap2 sys_mmap_pgoff#define __ARCH_WANT_RENAMEAT#define __ARCH_WANT_STAT64 +#define __ARCH_WANT_SET_GET_RLIMIT#define __ARCH_WANT_SYS_EXECVE#define __ARCH_WANT_SYS_CLONE#define __ARCH_WANT_SYS_VFORK
arch/nds32/include/uapi/asm/unistd.h +1 -0
@@ -3,6 +3,7 @@#define __ARCH_WANT_STAT64#define __ARCH_WANT_SYNC_FILE_RANGE2 +#define __ARCH_WANT_SET_GET_RLIMIT/* Use the standard ABI for syscalls */ #include <asm-generic/unistd.h>
arch/nios2/include/uapi/asm/unistd.h +1 -0
@@ -20,6 +20,7 @@#define __ARCH_WANT_RENAMEAT#define __ARCH_WANT_STAT64 +#define __ARCH_WANT_SET_GET_RLIMIT/* Use the standard ABI for syscalls */ #include <asm-generic/unistd.h>
arch/openrisc/include/uapi/asm/unistd.h +1 -0
@@ -21,6 +21,7 @@#define __ARCH_WANT_RENAMEAT#define __ARCH_WANT_STAT64 +#define __ARCH_WANT_SET_GET_RLIMIT#define __ARCH_WANT_SYS_FORK#define __ARCH_WANT_SYS_CLONE
arch/riscv/include/uapi/asm/unistd.h +1 -0
@@ -18,6 +18,7 @@#ifdef __LP64__#define __ARCH_WANT_NEW_STAT#endif /* __LP64__ */ +#define __ARCH_WANT_SET_GET_RLIMIT#include <asm-generic/unistd.h>
arch/unicore32/include/uapi/asm/unistd.h +1 -0
@@ -12,6 +12,7 @@*/ #define __ARCH_WANT_RENAMEAT +#define __ARCH_WANT_SET_GET_RLIMIT/* Use the standard ABI for syscalls. */ #include <asm-generic/unistd.h>
include/uapi/asm-generic/unistd.h +5 -0
@@ -467,10 +467,15 @@ __SYSCALL(__NR_uname, sys_newuname) __SYSCALL(__NR_sethostname, sys_sethostname)#define __NR_setdomainname 162 __SYSCALL(__NR_setdomainname, sys_setdomainname) + +#ifdef __ARCH_WANT_SET_GET_RLIMIT +/* getrlimit and setrlimit are superseded with prlimit64 */ #define __NR_getrlimit 163 __SC_COMP(__NR_getrlimit, sys_getrlimit, compat_sys_getrlimit)#define __NR_setrlimit 164 __SC_COMP(__NR_setrlimit, sys_setrlimit, compat_sys_setrlimit) +#endif +#define __NR_getrusage 165 __SC_COMP(__NR_getrusage, sys_getrusage, compat_sys_getrusage)#define __NR_umask 166
scripts/checksyscalls.sh +5 -0
@@ -38,6 +38,11 @@ cat << EOF #define __IGNORE_lstat64 /* fstatat64 */ #endif +#ifndef __ARCH_WANT_SET_GET_RLIMIT +#define __IGNORE_getrlimit /* getrlimit */ +#define __IGNORE_setrlimit /* setrlimit */ +#endif + /* Missing flags argument */ #define __IGNORE_renameat /* renameat2 */
Signature · 1 line
2.20.0
Arnd Bergmann
maintainerPATCH 4/8 asm-generic: Make time32 syscall numbers optional
In reply to Arnd BergmannWe don't want new architectures to even provide the old 32-bit time_t based system calls any more, or define the syscall number macros.
Add a new __ARCH_WANT_TIME32_SYSCALLS macro that gets enabled for all existing 32-bit architectures so we don't change any current behavior. Since this symbol is evaluated in user space as well, we cannot use a Kconfig CONFIG_* macro but have to define it in uapi/asm/unistd.h.
On 64-bit architectures, the same system call numbers mostly refer to the system calls we want to keep, as they already pass 64-bit time_t.
As new architectures no longer provide these, we need new exceptions in checksyscalls.sh.
--- arch/arc/include/uapi/asm/unistd.h | 1 + arch/arm64/include/uapi/asm/unistd.h | 1 + arch/c6x/include/uapi/asm/unistd.h | 1 + arch/csky/include/uapi/asm/unistd.h | 1 + arch/h8300/include/uapi/asm/unistd.h | 1 + arch/hexagon/include/uapi/asm/unistd.h | 1 + arch/nds32/include/uapi/asm/unistd.h | 1 + arch/nios2/include/uapi/asm/unistd.h | 1 + arch/openrisc/include/uapi/asm/unistd.h | 1 + arch/riscv/include/uapi/asm/unistd.h | 3 ++ arch/unicore32/include/uapi/asm/unistd.h | 1 + include/uapi/asm-generic/unistd.h | 36 ++++++++++++++++++++++++ scripts/checksyscalls.sh | 7 +++++ 13 files changed, 56 insertions(+)
arch/arc/include/uapi/asm/unistd.h +1 -0
@@ -23,6 +23,7 @@#define __ARCH_WANT_SYS_CLONE#define __ARCH_WANT_SYS_VFORK#define __ARCH_WANT_SYS_FORK +#define __ARCH_WANT_TIME32_SYSCALLS#define sys_mmap2 sys_mmap_pgoff
arch/arm64/include/uapi/asm/unistd.h +1 -0
@@ -18,5 +18,6 @@#define __ARCH_WANT_RENAMEAT#define __ARCH_WANT_NEW_STAT#define __ARCH_WANT_SET_GET_RLIMIT +#define __ARCH_WANT_TIME32_SYSCALLS#include <asm-generic/unistd.h>
arch/c6x/include/uapi/asm/unistd.h +1 -0
@@ -19,6 +19,7 @@#define __ARCH_WANT_STAT64#define __ARCH_WANT_SET_GET_RLIMIT#define __ARCH_WANT_SYS_CLONE +#define __ARCH_WANT_TIME32_SYSCALLS/* Use the standard ABI for syscalls. */ #include <asm-generic/unistd.h>
arch/csky/include/uapi/asm/unistd.h +1 -0
@@ -3,6 +3,7 @@#define __ARCH_WANT_SYS_CLONE#define __ARCH_WANT_SET_GET_RLIMIT +#define __ARCH_WANT_TIME32_SYSCALLS#include <asm-generic/unistd.h> #define __NR_set_thread_area (__NR_arch_specific_syscall + 0)
arch/h8300/include/uapi/asm/unistd.h +1 -0
@@ -3,5 +3,6 @@#define __ARCH_WANT_RENAMEAT#define __ARCH_WANT_STAT64#define __ARCH_WANT_SET_GET_RLIMIT +#define __ARCH_WANT_TIME32_SYSCALLS#include <asm-generic/unistd.h>
arch/hexagon/include/uapi/asm/unistd.h +1 -0
@@ -35,5 +35,6 @@#define __ARCH_WANT_SYS_CLONE#define __ARCH_WANT_SYS_VFORK#define __ARCH_WANT_SYS_FORK +#define __ARCH_WANT_TIME32_SYSCALLS#include <asm-generic/unistd.h>
arch/nds32/include/uapi/asm/unistd.h +1 -0
@@ -4,6 +4,7 @@#define __ARCH_WANT_STAT64#define __ARCH_WANT_SYNC_FILE_RANGE2#define __ARCH_WANT_SET_GET_RLIMIT +#define __ARCH_WANT_TIME32_SYSCALLS/* Use the standard ABI for syscalls */ #include <asm-generic/unistd.h>
arch/nios2/include/uapi/asm/unistd.h +1 -0
@@ -21,6 +21,7 @@#define __ARCH_WANT_RENAMEAT#define __ARCH_WANT_STAT64#define __ARCH_WANT_SET_GET_RLIMIT +#define __ARCH_WANT_TIME32_SYSCALLS/* Use the standard ABI for syscalls */ #include <asm-generic/unistd.h>
arch/openrisc/include/uapi/asm/unistd.h +1 -0
@@ -24,6 +24,7 @@#define __ARCH_WANT_SET_GET_RLIMIT#define __ARCH_WANT_SYS_FORK#define __ARCH_WANT_SYS_CLONE +#define __ARCH_WANT_TIME32_SYSCALLS#include <asm-generic/unistd.h>
arch/riscv/include/uapi/asm/unistd.h +3 -0
@@ -19,6 +19,9 @@#define __ARCH_WANT_NEW_STAT#endif /* __LP64__ */ #define __ARCH_WANT_SET_GET_RLIMIT +#ifndef __LP64__ +#define __ARCH_WANT_TIME32_SYSCALLS +#endif #include <asm-generic/unistd.h>
arch/unicore32/include/uapi/asm/unistd.h +1 -0
@@ -13,6 +13,7 @@#define __ARCH_WANT_RENAMEAT#define __ARCH_WANT_SET_GET_RLIMIT +#define __ARCH_WANT_TIME32_SYSCALLS/* Use the standard ABI for syscalls. */ #include <asm-generic/unistd.h>
include/uapi/asm-generic/unistd.h +36 -0
@@ -38,8 +38,10 @@ __SYSCALL(__NR_io_destroy, sys_io_destroy) __SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit)#define __NR_io_cancel 3 __SYSCALL(__NR_io_cancel, sys_io_cancel) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_io_getevents 4 __SC_3264(__NR_io_getevents, sys_io_getevents_time32, sys_io_getevents) +#endif /* fs/xattr.c */ #define __NR_setxattr 5
@@ -222,10 +224,12 @@ __SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev)__SYSCALL (__NR3264_sendfile, sys_sendfile64) /* fs/select.c */ +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_pselect6 72 __SC_COMP_3264(__NR_pselect6, sys_pselect6_time32, sys_pselect6, compat_sys_pselect6_time32)#define __NR_ppoll 73 __SC_COMP_3264(__NR_ppoll, sys_ppoll_time32, sys_ppoll, compat_sys_ppoll_time32) +#endif /* fs/signalfd.c */ #define __NR_signalfd4 74
@@ -269,16 +273,20 @@ __SC_COMP(__NR_sync_file_range, sys_sync_file_range, \/* fs/timerfd.c */ #define __NR_timerfd_create 85 __SYSCALL(__NR_timerfd_create, sys_timerfd_create) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_timerfd_settime 86__SC_3264 (__NR_timerfd_settime, sys_timerfd_settime32, \ sys_timerfd_settime)#define __NR_timerfd_gettime 87__SC_3264 (__NR_timerfd_gettime, sys_timerfd_gettime32, \ sys_timerfd_gettime) +#endif /* fs/utimes.c */ +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_utimensat 88 __SC_3264(__NR_utimensat, sys_utimensat_time32, sys_utimensat) +#endif /* kernel/acct.c */ #define __NR_acct 89
@@ -309,8 +317,10 @@ __SYSCALL(__NR_set_tid_address, sys_set_tid_address)__SYSCALL (__NR_unshare, sys_unshare) /* kernel/futex.c */ +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_futex 98 __SC_3264(__NR_futex, sys_futex_time32, sys_futex) +#endif #define __NR_set_robust_list 99__SC_COMP (__NR_set_robust_list, sys_set_robust_list, \ compat_sys_set_robust_list)
@@ -319,8 +329,10 @@ __SC_COMP(__NR_get_robust_list, sys_get_robust_list, \ compat_sys_get_robust_list)/* kernel/hrtimer.c */ +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_nanosleep 101 __SC_3264(__NR_nanosleep, sys_nanosleep_time32, sys_nanosleep) +#endif /* kernel/itimer.c */ #define __NR_getitimer 102
@@ -341,14 +353,19 @@ __SYSCALL(__NR_delete_module, sys_delete_module)/* kernel/posix-timers.c */ #define __NR_timer_create 107 __SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_timer_gettime 108 __SC_3264(__NR_timer_gettime, sys_timer_gettime32, sys_timer_gettime) +#endif #define __NR_timer_getoverrun 109 __SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_timer_settime 110 __SC_3264(__NR_timer_settime, sys_timer_settime32, sys_timer_settime) +#endif #define __NR_timer_delete 111 __SYSCALL(__NR_timer_delete, sys_timer_delete) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_clock_settime 112 __SC_3264(__NR_clock_settime, sys_clock_settime32, sys_clock_settime)#define __NR_clock_gettime 113
@@ -358,6 +375,7 @@ __SC_3264(__NR_clock_getres, sys_clock_getres_time32, sys_clock_getres)#define __NR_clock_nanosleep 115__SC_3264 (__NR_clock_nanosleep, sys_clock_nanosleep_time32, \ sys_clock_nanosleep) +#endif /* kernel/printk.c */ #define __NR_syslog 116
@@ -388,9 +406,11 @@ __SYSCALL(__NR_sched_yield, sys_sched_yield) __SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max)#define __NR_sched_get_priority_min 126 __SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_sched_rr_get_interval 127__SC_3264 (__NR_sched_rr_get_interval, sys_sched_rr_get_interval_time32, \ sys_sched_rr_get_interval) +#endif /* kernel/signal.c */ #define __NR_restart_syscall 128
@@ -411,9 +431,11 @@ __SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction) __SC_COMP(__NR_rt_sigprocmask, sys_rt_sigprocmask, compat_sys_rt_sigprocmask)#define __NR_rt_sigpending 136 __SC_COMP(__NR_rt_sigpending, sys_rt_sigpending, compat_sys_rt_sigpending) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_rt_sigtimedwait 137__SC_COMP_3264 (__NR_rt_sigtimedwait, sys_rt_sigtimedwait_time32, \ sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time32) +#endif #define __NR_rt_sigqueueinfo 138__SC_COMP (__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \ compat_sys_rt_sigqueueinfo)
@@ -486,12 +508,14 @@ __SYSCALL(__NR_prctl, sys_prctl)__SYSCALL (__NR_getcpu, sys_getcpu) /* kernel/time.c */ +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_gettimeofday 169 __SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday)#define __NR_settimeofday 170 __SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday)#define __NR_adjtimex 171 __SC_3264(__NR_adjtimex, sys_adjtimex_time32, sys_adjtimex) +#endif /* kernel/timer.c */ #define __NR_getpid 172
@@ -516,11 +540,13 @@ __SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo) __SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open)#define __NR_mq_unlink 181 __SYSCALL(__NR_mq_unlink, sys_mq_unlink) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_mq_timedsend 182 __SC_3264(__NR_mq_timedsend, sys_mq_timedsend_time32, sys_mq_timedsend)#define __NR_mq_timedreceive 183__SC_3264 (__NR_mq_timedreceive, sys_mq_timedreceive_time32, \ sys_mq_timedreceive) +#endif #define __NR_mq_notify 184 __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify)#define __NR_mq_getsetattr 185
@@ -541,8 +567,10 @@ __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) __SYSCALL(__NR_semget, sys_semget)#define __NR_semctl 191 __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_semtimedop 192 __SC_COMP(__NR_semtimedop, sys_semtimedop, sys_semtimedop_time32) +#endif #define __NR_semop 193__SYSCALL (__NR_semop, sys_semop)
@@ -663,8 +691,10 @@ __SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \ __SYSCALL(__NR_perf_event_open, sys_perf_event_open)#define __NR_accept4 242 __SYSCALL(__NR_accept4, sys_accept4) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_recvmmsg 243 __SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg, compat_sys_recvmmsg_time32) +#endif /* * Architectures may provide up to 16 syscalls of their own
@@ -672,8 +702,10 @@ __SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg, compat_sys_recv*/ #define __NR_arch_specific_syscall 244 +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_wait4 260 __SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4) +#endif #define __NR_prlimit64 261 __SYSCALL(__NR_prlimit64, sys_prlimit64)#define __NR_fanotify_init 262
@@ -684,8 +716,10 @@ __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at)#define __NR_open_by_handle_at 265 __SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_clock_adjtime 266 __SC_3264(__NR_clock_adjtime, sys_clock_adjtime32, sys_clock_adjtime) +#endif #define __NR_syncfs 267 __SYSCALL(__NR_syncfs, sys_syncfs)#define __NR_setns 268
@@ -738,8 +772,10 @@ __SYSCALL(__NR_pkey_alloc, sys_pkey_alloc) __SYSCALL(__NR_pkey_free, sys_pkey_free)#define __NR_statx 291 __SYSCALL(__NR_statx, sys_statx) +#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG !=32 #define __NR_io_pgetevents 292 __SC_COMP_3264(__NR_io_pgetevents, sys_io_pgetevents_time32, sys_io_pgetevents, compat_sys_io_pgetevents) +#endif #define __NR_rseq 293 __SYSCALL(__NR_rseq, sys_rseq)#define __NR_kexec_file_load 294
scripts/checksyscalls.sh +7 -0
@@ -143,6 +143,13 @@ cat << EOF #define __IGNORE_rt_sigtimedwait #define __IGNORE_futex #define __IGNORE_sched_rr_get_interval +#define __IGNORE_gettimeofday +#define __IGNORE_settimeofday +#define __IGNORE_wait4 +#define __IGNORE_adjtimex +#define __IGNORE_nanosleep +#define __IGNORE_io_getevents +#define __IGNORE_recvmmsg #endif /* i386-specific or historical system calls */
Signature · 1 line
2.20.0
Geert Uytterhoeven
maintainerRe: [PATCH 4/8] asm-generic: Make time32 syscall numbers optional
Hi Arnd,
Quoted 5 lines · Arnd Bergmann
We don't want new architectures to even provide the old 32-bit
time_tbased system calls any more, or define the syscall number macros.Add a new
__ARCH_WANT_TIME32_SYSCALLSmacro that gets enabled for all existing 32-bit architectures so we don't change any current behavior.
... (only) 32-bit architectures using the generic syscall list, right?
Quoted 10 lines
Since this symbol is evaluated in user space as well, we cannot use a
KconfigCONFIG_* macro but have to define it inuapi/asm/unistd.h.On 64-bit architectures, the same system call numbers mostly refer to the system calls we want to keep, as they already pass 64-bit
time_t.As new architectures no longer provide these, we need new exceptions in
checksyscalls.sh.Signed-off-by Arnd Bergmann <[email protected]>
Quoted 15 lines
--- arch/arc/include/uapi/asm/unistd.h | 1 + arch/arm64/include/uapi/asm/unistd.h | 1 + arch/c6x/include/uapi/asm/unistd.h | 1 + arch/csky/include/uapi/asm/unistd.h | 1 + arch/h8300/include/uapi/asm/unistd.h | 1 + arch/hexagon/include/uapi/asm/unistd.h | 1 + arch/nds32/include/uapi/asm/unistd.h | 1 + arch/nios2/include/uapi/asm/unistd.h | 1 + arch/openrisc/include/uapi/asm/unistd.h | 1 + arch/riscv/include/uapi/asm/unistd.h | 3 ++ arch/unicore32/include/uapi/asm/unistd.h | 1 + include/uapi/asm-generic/unistd.h | 36 ++++++++++++++++++++++++ scripts/checksyscalls.sh | 7 +++++ 13 files changed, 56 insertions(+)
Gr{oetje,eeting}s,
Geert
Signature · 9 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ Y2038 mailing list [email protected] https://lists.linaro.org/mailman/listinfo/y2038
Arnd Bergmann
maintainerRe: [PATCH 4/8] asm-generic: Make time32 syscall numbers optional
Quoted 11 lines · Geert Uytterhoeven
Hi Arnd,
Quoted 5 lines · Arnd Bergmann
We don't want new architectures to even provide the old 32-bit
time_tbased system calls any more, or define the syscall number macros.Add a new
__ARCH_WANT_TIME32_SYSCALLSmacro that gets enabled for all existing 32-bit architectures so we don't change any current behavior.... (only) 32-bit architectures using the generic syscall list, right?
Correct, I've added a clarification in the commit text in my git tree now, thanks for the proofreading!
Arnd
Arnd Bergmann
maintainerPATCH 5/8 unicore32: Fix __ARCH_WANT_STAT64 definition
In reply to Arnd BergmannThe __ARCH_WANT_STAT64 macro must be defined before including asm-generic/unistd.h. I got this right for everything except unicore32.
--- arch/unicore32/include/uapi/asm/unistd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/unicore32/include/uapi/asm/unistd.h +1 -1
@@ -13,9 +13,9 @@#define __ARCH_WANT_RENAMEAT#define __ARCH_WANT_SET_GET_RLIMIT +#define __ARCH_WANT_STAT64#define __ARCH_WANT_TIME32_SYSCALLS/* Use the standard ABI for syscalls. */ #include <asm-generic/unistd.h> -#define __ARCH_WANT_STAT64#define __ARCH_WANT_SYS_CLONE
Signature · 1 line
2.20.0
Arnd Bergmann
maintainerPATCH 6/8 checksyscalls: fix up mq_timedreceive and stat exceptions
In reply to Arnd Bergmannmq_timedreceive was spelled incorrectly, and we need exceptions for new architectures that leave out newstat or stat64, implementing only statx() now.
--- scripts/checksyscalls.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
scripts/checksyscalls.sh +1 -4
@@ -30,13 +30,10 @@ cat << EOF #define __IGNORE_readlink /* readlinkat */ #define __IGNORE_symlink /* symlinkat */ #define __IGNORE_utimes /* futimesat */ -#if BITS_PER_LONG == 64 #define __IGNORE_stat /* fstatat */ #define __IGNORE_lstat /* fstatat */ -#else #define __IGNORE_stat64 /* fstatat64 */ #define __IGNORE_lstat64 /* fstatat64 */ -#endif #ifndef __ARCH_WANT_SET_GET_RLIMIT #define __IGNORE_getrlimit /* getrlimit */
@@ -138,7 +135,7 @@ cat << EOF #define __IGNORE_io_pgetevents #define __IGNORE_recvmmsg #define __IGNORE_mq_timedsend -#define __IGNORE_mq_timedreceiv +#define __IGNORE_mq_timedreceive #define __IGNORE_semtimedop #define __IGNORE_rt_sigtimedwait #define __IGNORE_futex
Signature · 1 line
2.20.0
Arnd Bergmann
maintainerPATCH 7/8 csky: Use latest system call ABI
In reply to Arnd BergmannWe don't yet have an upstream glibc port for csky, so there is no user space for the existing ABI, and we can remove the definitions for 32-bit time_t, off_t and struct resource.
--- arch/csky/Kconfig | 1 - arch/csky/include/uapi/asm/unistd.h | 2 -- 2 files changed, 3 deletions(-)
arch/csky/Kconfig +0 -1
@@ -1,6 +1,5 @@ config CSKY def_bool y - select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_USE_BUILTIN_BSWAP
arch/csky/include/uapi/asm/unistd.h +0 -2
@@ -2,8 +2,6 @@// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. #define __ARCH_WANT_SYS_CLONE -#define __ARCH_WANT_SET_GET_RLIMIT -#define __ARCH_WANT_TIME32_SYSCALLS#include <asm-generic/unistd.h> #define __NR_set_thread_area (__NR_arch_specific_syscall + 0)
Signature · 1 line
2.20.0
Re: [PATCH 7/8] csky: Use latest system call ABI
Quoted 1 line · Arnd Bergmann
We don't yet have an upstream glibc port for csky, so there is no user
We do. It's in 2.29.
Signature · 2 lines
Joseph S. Myers [email protected]
Guo Ren
maintainerRe: [PATCH 7/8] csky: Use latest system call ABI
In reply to Arnd BergmannMao Han has merged csky port into glibc 2.29, so we should keep the __ARCH_WANT_TIME32_SYSCALLS.
F.Y.I:
[email protected]
Quoted 26 lines · Arnd Bergmann
We don't yet have an upstream glibc port for csky, so there is no user space for the existing ABI, and we can remove the definitions for 32-bit
time_t,off_tand struct resource.Signed-off-by Arnd Bergmann <[email protected]>--- arch/csky/Kconfig | 1 - arch/csky/include/uapi/asm/unistd.h | 2 -- 2 files changed, 3 deletions(-)arch/csky/Kconfig +0
-1@@ -1,6 +1,5 @@ config CSKY def_bool y - select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_USE_BUILTIN_BSWAParch/csky/include/uapi/asm/unistd.h +0
-0
arch/csky/include/uapi/asm/unistd.h line 5
Quoted 4 lines
arch/csky/include/uapi/asm/unistd.h +0
-1@@ -2,8 +2,6 @@// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. #define __ARCH_WANT_SYS_CLONE -#define __ARCH_WANT_SET_GET_RLIMIT
Seems it's not related to y2038 issue. Is __ARCH_WANT_SET_GET_RLIMIT no use ?
arch/csky/include/uapi/asm/unistd.h line 6
Quoted 1 line
arch/csky/include/uapi/asm/unistd.h +0
-1-#define __ARCH_WANT_TIME32_SYSCALLS
Best Regards
Guo Ren
Arnd Bergmann
maintainerRe: [PATCH 7/8] csky: Use latest system call ABI
Quoted 6 lines · Joseph Myers
Quoted 1 line · Arnd Bergmann
We don't yet have an upstream glibc port for csky, so there is no user
We do. It's in 2.29.
...
Quoted 3 lines · Guo Ren
Mao Han has merged csky port into glibc 2.29, so we should keep the
__ARCH_WANT_TIME32_SYSCALLS.
My mistake. I've dropped patch 7/8 from this series now.
Quoted 18 lines
Quoted 18 lines
arch/csky/Kconfig +0
-1@@ -1,6 +1,5 @@ config CSKY def_bool y - select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_USE_BUILTIN_BSWAParch/csky/include/uapi/asm/unistd.h +0
-0@@ -2,8 +2,6 @@// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
Quoted 4 lines
arch/csky/include/uapi/asm/unistd.h line 5
Quoted 2 lines
arch/csky/include/uapi/asm/unistd.h +0
-1#define __ARCH_WANT_SYS_CLONE -#define __ARCH_WANT_SET_GET_RLIMITSeems it's not related to y2038 issue. Is
__ARCH_WANT_SET_GET_RLIMITno use ?
In new architectures, we do not need to set CONFIG_ARCH_32BIT_OFF_T or __ARCH_WANT_SET_GET_RLIMIT, since we can assume that user space always uses a 64-bit off_t and a 'struct rlimit' matching the kernel's rlimit64, with the prlimit64() system call replacing both getrlimit and setrlimit on the kernel/user ABI side.
I don't know if glibc still uses the 32-bit off_t behavior or the old getrlimit/setrlimit, but if we're not also changing the time32 interfaces, the safest option seems to be to leave all three in place.
Arnd
Arnd Bergmann
maintainerPATCH 8/8 riscv: Use latest system call ABI
In reply to Arnd BergmannWe don't yet have an upstream glibc port for riscv, so there is no user space for the existing ABI, and we can remove the definitions for 32-bit time_t, off_t and struct resource and system calls based on them, including the vdso.
--- arch/riscv/Kconfig | 1 - arch/riscv/include/uapi/asm/unistd.h | 5 +---- arch/riscv/kernel/vdso/Makefile | 2 ++ 3 files changed, 3 insertions(+), 5 deletions(-)
arch/riscv/Kconfig +0 -1
@@ -11,7 +11,6 @@ config 32BIT config RISCV def_bool y - select ARCH_32BIT_OFF_T if !64BIT # even on 32-bit, physical (and DMA) addresses are > 32-bits select PHYS_ADDR_T_64BIT select OF
arch/riscv/include/uapi/asm/unistd.h +1 -4
@@ -17,11 +17,8 @@#ifdef __LP64__#define __ARCH_WANT_NEW_STAT -#endif /* __LP64__ */ #define __ARCH_WANT_SET_GET_RLIMIT -#ifndef __LP64__ -#define __ARCH_WANT_TIME32_SYSCALLS -#endif +#endif /* __LP64__ */ #include <asm-generic/unistd.h>
arch/riscv/kernel/vdso/Makefile +2 -0
@@ -2,9 +2,11 @@ # Symbols present in the vdso vdso-syms = rt_sigreturn +ifdef CONFIG_64BIT vdso-syms += gettimeofday vdso-syms += clock_gettime vdso-syms += clock_getres +endif vdso-syms += getcpu vdso-syms += flush_icache
Signature · 1 line
2.20.0
Re: [PATCH 8/8] riscv: Use latest system call ABI
Quoted 60 lines · Arnd Bergmann
We don't yet have an upstream glibc port for riscv, so there is no user space for the existing ABI, and we can remove the definitions for 32-bit
time_t,off_tand struct resource and system calls based on them, including the vdso.Signed-off-by Arnd Bergmann <[email protected]>--- arch/riscv/Kconfig | 1 - arch/riscv/include/uapi/asm/unistd.h | 5 +---- arch/riscv/kernel/vdso/Makefile | 2 ++ 3 files changed, 3 insertions(+), 5 deletions(-)arch/riscv/Kconfig +0
-1@@ -11,7 +11,6 @@ config 32BIT config RISCV def_bool y - select ARCH_32BIT_OFF_T if !64BIT # even on 32-bit, physical (and DMA) addresses are > 32-bits select PHYS_ADDR_T_64BIT select OFarch/riscv/include/uapi/asm/unistd.h +1
-4@@ -17,11 +17,8 @@#ifdef __LP64__#define __ARCH_WANT_NEW_STAT -#endif /* __LP64__ */ #define __ARCH_WANT_SET_GET_RLIMIT -#ifndef __LP64__ -#define __ARCH_WANT_TIME32_SYSCALLS -#endif +#endif /* __LP64__ */ #include <asm-generic/unistd.h> arch/riscv/kernel/vdso/Makefile +2
-1@@ -2,9 +2,11 @@ # Symbols present in the vdso vdso-syms = rt_sigreturn +ifdef CONFIG_64BIT vdso-syms += gettimeofday vdso-syms += clock_gettime vdso-syms += clock_getres +endif vdso-syms += getcpu vdso-syms += flush_icache --
Quoted 2 lines
2.20.0
_______________________________________________
Y2038 mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/y2038