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

Commit fd659cc0 authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

Merge tag 'y2038-syscall-cleanup' of...

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

Pull preparatory work for y2038 changes from Arnd Bergmann:

System call unification and cleanup

The system call tables have diverged a bit over the years, and a number of
the recent additions never made it into all architectures, for one reason
or another.

This is an attempt to clean it up as far as we can without breaking
compatibility, doing a number of steps:

 - Add system calls that have not yet been integrated into all architectures
   but that we definitely want there. This includes {,f}statfs64() and
   get{eg,eu,g,p,u,pp}id() on alpha, which have been missing traditionally.

 - The s390 compat syscall handling is cleaned up to be more like what we
   do on other architectures, while keeping the 31-bit pointer
   extension. This was merged as a shared branch by the s390 maintainers
   and is included here in order to base the other patches on top.

 - Add the separate ipc syscalls on all architectures that traditionally
   only had sys_ipc(). This version is done without support for IPC_OLD
   that is we have in sys_ipc. The new semtimedop_time64 syscall will only
   be added here, not in sys_ipc

 - Add syscall numbers for a couple of syscalls that we probably don't need
   everywhere, in particular pkey_* and rseq, for the purpose of symmetry:
   if it's in asm-generic/unistd.h, it makes sense to have it everywhere. I
   expect that any future system calls will get assigned on all platforms
   together, even when they appear to be specific to a single architecture.

 - Prepare for having the same system call numbers for any future calls. In
   combination with the generated tables, this hopefully makes it easier to
   add new calls across all architectures together.

All of the above are technically separate from the y2038 work, but are done
as preparation before we add the new 64-bit time_t system calls everywhere,
providing a common baseline set of system calls.

I expect that glibc and other libraries that want to use 64-bit time_t will
require linux-5.1 kernel headers for building in the future, and at a much
later point may also require linux-5.1 or a later version as the minimum
kernel at runtime. Having a common baseline then allows the removal of many
architecture or kernel version specific workarounds.
parents 74e96711 805089c2
Loading
Loading
Loading
Loading
+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 */
+15 −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,13 @@
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
+0 −1
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@
 * Unimplemented (or alternatively implemented) syscalls
 */
#define __IGNORE_fadvise64_64
#define __IGNORE_migrate_pages

#ifdef __ARM_EABI__
/*
+5 −3
Original line number Diff line number Diff line
@@ -314,15 +314,15 @@
297	common	recvmsg			sys_recvmsg
298	common	semop			sys_semop		sys_oabi_semop
299	common	semget			sys_semget
300	common	semctl			sys_semctl
300	common	semctl			sys_old_semctl
301	common	msgsnd			sys_msgsnd
302	common	msgrcv			sys_msgrcv
303	common	msgget			sys_msgget
304	common	msgctl			sys_msgctl
304	common	msgctl			sys_old_msgctl
305	common	shmat			sys_shmat
306	common	shmdt			sys_shmdt
307	common	shmget			sys_shmget
308	common	shmctl			sys_shmctl
308	common	shmctl			sys_old_shmctl
309	common	add_key			sys_add_key
310	common	request_key		sys_request_key
311	common	keyctl			sys_keyctl
@@ -414,3 +414,5 @@
397	common	statx			sys_statx
398	common	rseq			sys_rseq
399	common	io_pgetevents		sys_io_pgetevents
400	common	migrate_pages		sys_migrate_pages
401	common	kexec_file_load		sys_kexec_file_load
Loading