linux/arch/powerpc/kernel
Thomas Gleixner 41ea39101d y2038: Add time64 system calls
This series finally gets us to the point of having system calls with
 64-bit time_t on all architectures, after a long time of incremental
 preparation patches.
 
 There was actually one conversion that I missed during the summer,
 i.e. Deepa's timex series, which I now updated based the 5.0-rc1 changes
 and review comments.
 
 The following system calls are now added on all 32-bit architectures
 using the same system call numbers:
 
 403 clock_gettime64
 404 clock_settime64
 405 clock_adjtime64
 406 clock_getres_time64
 407 clock_nanosleep_time64
 408 timer_gettime64
 409 timer_settime64
 410 timerfd_gettime64
 411 timerfd_settime64
 412 utimensat_time64
 413 pselect6_time64
 414 ppoll_time64
 416 io_pgetevents_time64
 417 recvmmsg_time64
 418 mq_timedsend_time64
 419 mq_timedreceiv_time64
 420 semtimedop_time64
 421 rt_sigtimedwait_time64
 422 futex_time64
 423 sched_rr_get_interval_time64
 
 Each one of these corresponds directly to an existing system call
 that includes a 'struct timespec' argument, or a structure containing
 a timespec or (in case of clock_adjtime) timeval. Not included here
 are new versions of getitimer/setitimer and getrusage/waitid, which
 are planned for the future but only needed to make a consistent API
 rather than for correct operation beyond y2038. These four system
 calls are based on 'timeval', and it has not been finally decided
 what the replacement kernel interface will use instead.
 
 So far, I have done a lot of build testing across most architectures,
 which has found a number of bugs. Runtime testing so far included
 testing LTP on 32-bit ARM with the existing system calls, to ensure
 we do not regress for existing binaries, and a test with a 32-bit
 x86 build of LTP against a modified version of the musl C library
 that has been adapted to the new system call interface [3].
 This library can be used for testing on all architectures supported
 by musl-1.1.21, but it is not how the support is getting integrated
 into the official musl release. Official musl support is planned
 but will require more invasive changes to the library.
 
 Link: https://lore.kernel.org/lkml/20190110162435.309262-1-arnd@arndb.de/T/
 Link: https://lore.kernel.org/lkml/20190118161835.2259170-1-arnd@arndb.de/
 Link: https://git.linaro.org/people/arnd/musl-y2038.git/ [2]
 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJcXf7/AAoJEGCrR//JCVInPSUP/RhsQSCKMGtONB/vVICQhwep
 PybhzBSpHWFxszzTi6BEPN1zS9B069G9mDollRBYZCckyPqL/Bv6sI/vzQZdNk01
 Q6Nw92OnNE1QP8owZ5TjrZhpbtopWdqIXjsbGZlloUemvuJP2JwvKovQUcn5CPTQ
 jbnqU04CVyFFJYVxAnGJ+VSeWNrjW/cm/m+rhLFjUcwW7Y3aodxsPqPP6+K9hY9P
 yIWfcH42WBeEWGm1RSBOZOScQl4SGCPUAhFydl/TqyEQagyegJMIyMOv9wZ5AuTT
 xK644bDVmNsrtJDZDpx+J8hytXCk1LrnKzkHR/uK80iUIraF/8D7PlaPgTmEEjko
 XcrywEkvkXTVU3owCm2/sbV+8fyFKzSPipnNfN1JNxEX71A98kvMRtPjDueQq/GA
 Yh81rr2YLF2sUiArkc2fNpENT7EGhrh1q6gviK3FB8YDgj1kSgPK5wC/X0uolC35
 E7iC2kg4NaNEIjhKP/WKluCaTvjRbvV+0IrlJLlhLTnsqbA57ZKCCteiBrlm7wQN
 4csUtCyxchR9Ac2o/lj+Mf53z68Zv74haIROp18K2dL7ZpVcOPnA3XHeauSAdoyp
 wy2Ek6ilNvlNB+4x+mRntPoOsyuOUGv7JXzB9JvweLWUd9G7tvYeDJQp/0YpDppb
 K4UWcKnhtEom0DgK08vY
 =IZVb
 -----END PGP SIGNATURE-----

Merge tag 'y2038-new-syscalls' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground into timers/2038

Pull y2038 - time64 system calls from Arnd Bergmann:

This series finally gets us to the point of having system calls with 64-bit
time_t on all architectures, after a long time of incremental preparation
patches.

There was actually one conversion that I missed during the summer,
i.e. Deepa's timex series, which I now updated based the 5.0-rc1 changes
and review comments.

The following system calls are now added on all 32-bit architectures using
the same system call numbers:

403 clock_gettime64
404 clock_settime64
405 clock_adjtime64
406 clock_getres_time64
407 clock_nanosleep_time64
408 timer_gettime64
409 timer_settime64
410 timerfd_gettime64
411 timerfd_settime64
412 utimensat_time64
413 pselect6_time64
414 ppoll_time64
416 io_pgetevents_time64
417 recvmmsg_time64
418 mq_timedsend_time64
419 mq_timedreceiv_time64
420 semtimedop_time64
421 rt_sigtimedwait_time64
422 futex_time64
423 sched_rr_get_interval_time64

Each one of these corresponds directly to an existing system call that
includes a 'struct timespec' argument, or a structure containing a timespec
or (in case of clock_adjtime) timeval. Not included here are new versions
of getitimer/setitimer and getrusage/waitid, which are planned for the
future but only needed to make a consistent API rather than for correct
operation beyond y2038. These four system calls are based on 'timeval', and
it has not been finally decided what the replacement kernel interface will
use instead.

So far, I have done a lot of build testing across most architectures, which
has found a number of bugs. Runtime testing so far included testing LTP on
32-bit ARM with the existing system calls, to ensure we do not regress for
existing binaries, and a test with a 32-bit x86 build of LTP against a
modified version of the musl C library that has been adapted to the new
system call interface [3].  This library can be used for testing on all
architectures supported by musl-1.1.21, but it is not how the support is
getting integrated into the official musl release. Official musl support is
planned but will require more invasive changes to the library.

Link: https://lore.kernel.org/lkml/20190110162435.309262-1-arnd@arndb.de/T/
Link: https://lore.kernel.org/lkml/20190118161835.2259170-1-arnd@arndb.de/
Link: https://git.linaro.org/people/arnd/musl-y2038.git/ [2]
2019-02-10 21:24:43 +01:00
..
syscalls y2038: add 64-bit time_t syscalls to all 32-bit architectures 2019-02-07 00:13:28 +01:00
trace powerpc/syscalls: Fix syscall tracing 2019-01-15 21:32:25 +11:00
vdso32 powerpc/vdso: Correct call frame information 2018-09-14 13:47:31 +10:00
vdso64 powerpc/vdso: Correct call frame information 2018-09-14 13:47:31 +10:00
.gitignore
Makefile powerpc: generate uapi header and system call table files 2018-12-21 14:46:50 +11:00
align.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
asm-offsets.c powerpc updates for 4.20 2018-10-26 14:36:21 -07:00
audit.c
btext.c powerpc: Rework btext_find_display to use of_stdout and device_type helpers 2018-11-26 22:33:37 +11:00
cacheinfo.c powerpc: Use device_type helpers to access the node type 2018-11-26 22:33:37 +11:00
cacheinfo.h
compat_audit.c
cpu_setup_6xx.S powerpc: change CONFIG_6xx to CONFIG_PPC_BOOK3S_32 2018-11-26 22:33:37 +11:00
cpu_setup_44x.S
cpu_setup_fsl_booke.S powerpc/mm: move platform specific mmu-xxx.h in platform directories 2018-12-04 19:45:01 +11:00
cpu_setup_pa6t.S
cpu_setup_power.S powerpc: Turn off CPU_FTR_P9_TM_HV_ASSIST in non-hypervisor mode 2018-10-09 16:04:27 +11:00
cpu_setup_ppc970.S
cputable.c powerpc/83xx: handle machine check caused by watchdog timer 2018-12-21 20:56:41 -06:00
crash.c powerpc: remove kdump.h from page.h 2018-07-30 22:47:53 +10:00
crash_dump.c powerpc: don't use ioremap_prot() nor __ioremap() unless really needed. 2018-10-14 18:04:09 +11:00
dbell.c
dma-iommu.c DMA mapping updates for Linux 4.21 2018-12-28 14:12:21 -08:00
dma-swiotlb.c DMA mapping updates for Linux 4.21 2018-12-28 14:12:21 -08:00
dma.c powerpc: use mm zones more sensibly 2018-12-20 22:21:20 +11:00
dt_cpu_ftrs.c memblock: rename memblock_alloc{_nid,_try_nid} to memblock_phys_alloc* 2018-10-31 08:54:15 -07:00
eeh.c IOMMU Updates for Linux v4.21 2019-01-01 15:55:29 -08:00
eeh_cache.c
eeh_dev.c powerpc/eeh: Cleanup list_head field names 2018-10-13 22:21:25 +11:00
eeh_driver.c powerpc/eeh: Declare pci_ers_result_name() as static 2018-11-25 17:11:21 +11:00
eeh_event.c powerpc: eeh_event: convert semaphore to completion 2018-12-20 22:21:20 +11:00
eeh_pe.c powerpc/eeh: Cleanup eeh_ops.wait_state() 2018-10-13 22:21:25 +11:00
eeh_sysfs.c
entry_32.S powerpc: change CONFIG_6xx to CONFIG_PPC_BOOK3S_32 2018-11-26 22:33:37 +11:00
entry_64.S powerpc: split compat syscall table out from native table 2018-12-21 14:46:50 +11:00
epapr_hcalls.S
epapr_paravirt.c
exceptions-64e.S powerpc/fsl: Flush the branch predictor at each kernel entry (64bit) 2018-12-20 22:59:03 +11:00
exceptions-64s.S powerpc updates for 4.21 2018-12-27 10:43:24 -08:00
fadump.c powerpc/fadump: Do not allow hot-remove memory from fadump reserved area. 2018-12-21 11:32:49 +11:00
firmware.c
fpu.S powerpc: clean inclusions of asm/feature-fixups.h 2018-07-30 22:48:17 +10:00
fsl_booke_entry_mapping.S
head_8xx.S powerpc/8xx: fix setting of pagetable for Abatron BDI debug tool. 2019-01-11 23:45:00 +11:00
head_32.S powerpc/mm: add exec protection on powerpc 603 2018-12-19 18:56:32 +11:00
head_40x.S powerpc/405: move PPC405_ERR77 in asm-405.h 2018-07-30 22:48:13 +10:00
head_44x.S powerpc/44x: use patch_sites for TLB handlers patching 2018-12-19 18:56:32 +11:00
head_64.S powerpc: clean inclusions of asm/feature-fixups.h 2018-07-30 22:48:17 +10:00
head_booke.h powerpc/fsl: Fixed warning: orphan section `__btb_flush_fixup' 2018-12-30 14:00:47 +11:00
head_fsl_booke.S powerpc/fsl: Flush the branch predictor at each kernel entry (32 bit) 2018-12-20 22:59:03 +11:00
hw_breakpoint.c perf/arch/powerpc: Implement hw_breakpoint_arch_parse() 2018-06-26 09:07:55 +02:00
idle.c
idle_6xx.S powerpc: clean inclusions of asm/feature-fixups.h 2018-07-30 22:48:17 +10:00
idle_book3e.S powerpc/64s: make PACA_IRQ_HARD_DIS track MSR[EE] closely 2018-07-24 22:03:14 +10:00
idle_book3s.S Merge branch 'fixes' into next 2018-08-13 15:59:06 +10:00
idle_e500.S powerpc: clean inclusions of asm/feature-fixups.h 2018-07-30 22:48:17 +10:00
idle_power4.S powerpc/64s: Fix PACA_IRQ_HARD_DIS accounting in idle_power4() 2018-08-14 15:36:02 +10:00
ima_kexec.c
io-workarounds.c powerpc: handover page flags with a pgprot_t parameter 2018-10-14 18:04:09 +11:00
io.c
iomap.c
iommu.c IOMMU Updates for Linux v4.21 2019-01-01 15:55:29 -08:00
irq.c powerpc/64: Disable irq restore warning for now 2018-08-07 21:49:24 +10:00
isa-bridge.c powerpc: Use device_type helpers to access the node type 2018-11-26 22:33:37 +11:00
jump_label.c jump_label: move 'asm goto' support test to Kconfig 2019-01-06 09:46:51 +09:00
kexec_elf_64.c
kgdb.c kgdb/treewide: constify struct kgdb_arch arch_kgdb_ops 2018-12-30 08:33:06 +00:00
kprobes-ftrace.c bpf/error-inject/kprobes: Clear current_kprobe and enable preempt in kprobe 2018-06-21 12:33:19 +02:00
kprobes.c bpf/error-inject/kprobes: Clear current_kprobe and enable preempt in kprobe 2018-06-21 12:33:19 +02:00
kvm.c
kvm_emul.S powerpc: move ASM_CONST and stringify_in_c() into asm-const.h 2018-07-30 22:48:16 +10:00
l2cr_6xx.S powerpc: clean inclusions of asm/feature-fixups.h 2018-07-30 22:48:17 +10:00
legacy_serial.c powerpc: Use of_node_name_eq for node name comparisons 2018-12-22 21:29:50 +11:00
machine_kexec.c powerpc: remove kdump.h from page.h 2018-07-30 22:47:53 +10:00
machine_kexec_32.c
machine_kexec_64.c
machine_kexec_file_64.c powerpc, kexec_file: factor out memblock-based arch_kexec_walk_mem() 2018-12-06 14:38:50 +00:00
mce.c powerpc/pseries: Flush SLB contents on SLB MCE errors. 2018-09-19 21:59:22 +10:00
mce_power.c powerpc/64s/hash: Do not use PPC_INVALIDATE_ERAT on CPUs before POWER9 2018-10-04 23:16:53 +10:00
misc.S powerpc/misc: merge reloc_offset() and add_reloc_offset() 2018-06-04 00:39:17 +10:00
misc_32.S powerpc: change CONFIG_6xx to CONFIG_PPC_BOOK3S_32 2018-11-26 22:33:37 +11:00
misc_64.S powerpc: clean inclusions of asm/feature-fixups.h 2018-07-30 22:48:17 +10:00
module.c powerpc64/module elfv1: Set opd addresses after module relocation 2018-10-20 13:26:47 +11:00
module.lds
module_32.c
module_64.c powerpc/64/module: REL32 relocation range check 2018-10-20 13:26:47 +11:00
msi.c powerpc/msi: Fix NULL pointer access in teardown code 2018-11-29 23:49:11 +11:00
nvram_64.c pstore improvements and refactorings 2018-12-27 11:15:21 -08:00
of_platform.c
optprobes.c
optprobes_head.S
paca.c memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
pci-common.c powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
pci-hotplug.c
pci_32.c memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
pci_64.c powerpc: handover page flags with a pgprot_t parameter 2018-10-14 18:04:09 +11:00
pci_dn.c
pci_of_scan.c powerpc: Use device_type helpers to access the node type 2018-11-26 22:33:37 +11:00
pmc.c powerpc: change CONFIG_6xx to CONFIG_PPC_BOOK3S_32 2018-11-26 22:33:37 +11:00
ppc32.h
ppc_save_regs.S powerpc: move ASM_CONST and stringify_in_c() into asm-const.h 2018-07-30 22:48:16 +10:00
proc_powerpc.c
process.c powerpc/frace: Use ftrace_graph_get_ret_stack() instead of curr_ret_stack 2018-12-22 08:20:45 -05:00
prom.c powerpc/prom: move the device tree if not in declared memory. 2018-12-20 22:21:20 +11:00
prom_init.c powerpc/prom_init: Generate "phandle" instead of "linux, phandle" 2018-10-19 00:56:17 +11:00
prom_init_check.sh powerpc: Check prom_init for disallowed sections 2018-10-19 00:56:17 +11:00
prom_parse.c
ptrace.c powerpc/ptrace: Combine SYSCALL_EMU & SYSCALL_TRACE handling 2018-12-20 22:21:20 +11:00
ptrace32.c
reloc_32.S
reloc_64.S
rtas-proc.c powerpc updates for 4.18 2018-06-07 10:23:33 -07:00
rtas-rtc.c powerpc: use time64_t in read_persistent_clock 2018-06-03 20:43:33 +10:00
rtas.c powerpc/rtas: Fix a potential race between CPU-Offline & Migration 2018-10-13 22:21:25 +11:00
rtas_flash.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
rtas_pci.c
rtasd.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
security.c powerpc/fsl: Update Spectre v2 reporting 2018-12-20 22:59:03 +11:00
setup-common.c powerpc/fsl: Enable runtime patching if nospectre_v2 boot arg is used 2018-12-20 22:59:03 +11:00
setup.h
setup_32.c powerpc/dma: remove the unused ISA_DMA_THRESHOLD export 2018-12-20 22:21:20 +11:00
setup_64.c powerpc/64: Fix kernel stack 16-byte alignment 2018-11-15 14:48:43 +11:00
signal.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
signal.h
signal_32.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
signal_64.c powerpc/tm: Limit TM code inside PPC_TRANSACTIONAL_MEM 2019-01-11 23:45:00 +11:00
smp-tbsync.c
smp.c powerpc: Fix stack protector crashes on CPU hotplug 2018-10-21 19:32:00 +11:00
stacktrace.c powerpc/64s: Fix build failures with CONFIG_NMI_IPI=n 2018-06-19 23:03:50 +10:00
suspend.c
swsusp.c
swsusp_32.S powerpc: clean inclusions of asm/feature-fixups.h 2018-07-30 22:48:17 +10:00
swsusp_64.c
swsusp_asm64.S powerpc/64s/hash: Simplify slb_flush_and_rebolt() 2018-10-14 18:04:09 +11:00
swsusp_booke.S
sys_ppc32.c
syscalls.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
sysfs.c powerpc: change CONFIG_6xx to CONFIG_PPC_BOOK3S_32 2018-11-26 22:33:37 +11:00
systbl.S powerpc: generate uapi header and system call table files 2018-12-21 14:46:50 +11:00
systbl_chk.sh
tau_6xx.c
time.c powerpc/time: no steal_time when CONFIG_PPC_SPLPAR is not selected 2018-10-20 13:26:47 +11:00
tm.S Merge branch 'fixes' into next 2018-10-09 16:51:05 +11:00
traps.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
udbg.c
udbg_16550.c
uprobes.c
vdso.c powerpc: split compat syscall table out from native table 2018-12-21 14:46:50 +11:00
vecemu.c
vector.S powerpc: move ASM_CONST and stringify_in_c() into asm-const.h 2018-07-30 22:48:16 +10:00
vmlinux.lds.S powerpc/fsl: Add infrastructure to fixup branch predictor flush 2018-12-20 22:53:39 +11:00
watchdog.c powerpc: NMI IPI make NMI IPIs fully sychronous 2018-07-24 22:03:14 +10:00