Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1b988a6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'timers-2038-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull year 2038 updates from Thomas Gleixner:
 "Another round of changes to make the kernel ready for 2038. After lots
  of preparatory work this is the first set of syscalls which are 2038
  safe:

    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

  The syscall numbers are identical all over the architectures"

* 'timers-2038-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits)
  riscv: Use latest system call ABI
  checksyscalls: fix up mq_timedreceive and stat exceptions
  unicore32: Fix __ARCH_WANT_STAT64 definition
  asm-generic: Make time32 syscall numbers optional
  asm-generic: Drop getrlimit and setrlimit syscalls from default list
  32-bit userspace ABI: introduce ARCH_32BIT_OFF_T config option
  compat ABI: use non-compat openat and open_by_handle_at variants
  y2038: add 64-bit time_t syscalls to all 32-bit architectures
  y2038: rename old time and utime syscalls
  y2038: remove struct definition redirects
  y2038: use time32 syscall names on 32-bit
  syscalls: remove obsolete __IGNORE_ macros
  y2038: syscalls: rename y2038 compat syscalls
  x86/x32: use time64 versions of sigtimedwait and recvmmsg
  timex: change syscalls to use struct __kernel_timex
  timex: use __kernel_timex internally
  sparc64: add custom adjtimex/clock_adjtime functions
  time: fix sys_timer_settime prototype
  time: Add struct __kernel_timex
  time: make adjtime compat handling available for 32 bit
  ...
parents edaed168 cfbe2716
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -276,6 +276,16 @@ 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
	  still support 32-bit off_t. This option is enabled for all such
	  architectures explicitly.

config HAVE_REGS_AND_STACK_ACCESS_API
	bool
	help
@@ -759,7 +769,7 @@ config 64BIT_TIME
	  handling.

config COMPAT_32BIT_TIME
	def_bool (!64BIT && 64BIT_TIME) || COMPAT
	def_bool !64BIT || COMPAT
	help
	  This enables 32 bit time_t support in addition to 64 bit time_t support.
	  This is relevant on all 32-bit architectures, and 64-bit architectures
+0 −21
Original line number Diff line number Diff line
@@ -19,25 +19,4 @@
#define __ARCH_WANT_SYS_VFORK
#define __ARCH_WANT_SYS_CLONE

/*
 * Ignore legacy syscalls that we don't use.
 */
#define __IGNORE_alarm
#define __IGNORE_creat
#define __IGNORE_getegid
#define __IGNORE_geteuid
#define __IGNORE_getgid
#define __IGNORE_getpid
#define __IGNORE_getppid
#define __IGNORE_getuid
#define __IGNORE_pause
#define __IGNORE_time
#define __IGNORE_utime
#define __IGNORE_umount2

/* Alpha doesn't have protection keys. */
#define __IGNORE_pkey_mprotect
#define __IGNORE_pkey_alloc
#define __IGNORE_pkey_free

#endif /* _ALPHA_UNISTD_H */
+10 −0
Original line number Diff line number Diff line
@@ -2,6 +2,16 @@
#ifndef _UAPI_ALPHA_UNISTD_H
#define _UAPI_ALPHA_UNISTD_H

/* These are traditionally the names linux-alpha uses for
 * the two otherwise generic system calls */
#define __NR_umount	__NR_umount2
#define __NR_osf_shmat	__NR_shmat

/* These return an extra value but can be used as aliases */
#define __NR_getpid	__NR_getxpid
#define __NR_getuid	__NR_getxuid
#define __NR_getgid	__NR_getxgid

#include <asm/unistd_32.h>

#endif /* _UAPI_ALPHA_UNISTD_H */
+3 −2
Original line number Diff line number Diff line
@@ -1253,7 +1253,7 @@ struct timex32 {

SYSCALL_DEFINE1(old_adjtimex, struct timex32 __user *, txc_p)
{
        struct timex txc;
	struct __kernel_timex txc;
	int ret;

	/* copy relevant bits of struct timex. */
@@ -1270,7 +1270,8 @@ SYSCALL_DEFINE1(old_adjtimex, struct timex32 __user *, txc_p)
	if (copy_to_user(txc_p, &txc, offsetof(struct timex32, time)) ||
	    (copy_to_user(&txc_p->tick, &txc.tick, sizeof(struct timex32) - 
			  offsetof(struct timex32, tick))) ||
	    (put_tv_to_tv32(&txc_p->time, &txc.time)))
	    (put_user(txc.time.tv_sec, &txc_p->time.tv_sec)) ||
	    (put_user(txc.time.tv_usec, &txc_p->time.tv_usec)))
	  return -EFAULT;

	return ret;
+17 −5
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
19	common	lseek				sys_lseek
20	common	getxpid				sys_getxpid
21	common	osf_mount			sys_osf_mount
22	common	umount				sys_umount
22	common	umount2				sys_umount
23	common	setuid				sys_setuid
24	common	getxuid				sys_getxuid
25	common	exec_with_loader		sys_ni_syscall
@@ -174,17 +174,17 @@
187	common	osf_alt_sigpending		sys_ni_syscall
188	common	osf_alt_setsid			sys_ni_syscall
199	common	osf_swapon			sys_swapon
200	common	msgctl				sys_msgctl
200	common	msgctl				sys_old_msgctl
201	common	msgget				sys_msgget
202	common	msgrcv				sys_msgrcv
203	common	msgsnd				sys_msgsnd
204	common	semctl				sys_semctl
204	common	semctl				sys_old_semctl
205	common	semget				sys_semget
206	common	semop				sys_semop
207	common	osf_utsname			sys_osf_utsname
208	common	lchown				sys_lchown
209	common	osf_shmat			sys_shmat
210	common	shmctl				sys_shmctl
209	common	shmat				sys_shmat
210	common	shmctl				sys_old_shmctl
211	common	shmdt				sys_shmdt
212	common	shmget				sys_shmget
213	common	osf_mvalid			sys_ni_syscall
@@ -451,3 +451,15 @@
520	common	preadv2				sys_preadv2
521	common	pwritev2			sys_pwritev2
522	common	statx				sys_statx
523	common	io_pgetevents			sys_io_pgetevents
524	common	pkey_mprotect			sys_pkey_mprotect
525	common	pkey_alloc			sys_pkey_alloc
526	common	pkey_free			sys_pkey_free
527	common	rseq				sys_rseq
528	common	statfs64			sys_statfs64
529	common	fstatfs64			sys_fstatfs64
530	common	getegid				sys_getegid
531	common	geteuid				sys_geteuid
532	common	getppid				sys_getppid
# all other architectures have common numbers for new syscall, alpha
# is the exception.
Loading