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

Commit 275f2214 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

ipc: rename old-style shmctl/semctl/msgctl syscalls



The behavior of these system calls is slightly different between
architectures, as determined by the CONFIG_ARCH_WANT_IPC_PARSE_VERSION
symbol. Most architectures that implement the split IPC syscalls don't set
that symbol and only get the modern version, but alpha, arm, microblaze,
mips-n32, mips-n64 and xtensa expect the caller to pass the IPC_64 flag.

For the architectures that so far only implement sys_ipc(), i.e. m68k,
mips-o32, powerpc, s390, sh, sparc, and x86-32, we want the new behavior
when adding the split syscalls, so we need to distinguish between the
two groups of architectures.

The method I picked for this distinction is to have a separate system call
entry point: sys_old_*ctl() now uses ipc_parse_version, while sys_*ctl()
does not. The system call tables of the five architectures are changed
accordingly.

As an additional benefit, we no longer need the configuration specific
definition for ipc_parse_version(), it always does the same thing now,
but simply won't get called on architectures with the modern interface.

A small downside is that on architectures that do set
ARCH_WANT_IPC_PARSE_VERSION, we now have an extra set of entry points
that are never called. They only add a few bytes of bloat, so it seems
better to keep them compared to adding yet another Kconfig symbol.
I considered adding new syscall numbers for the IPC_64 variants for
consistency, but decided against that for now.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 73a66023
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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	shmat				sys_shmat
210	common	shmctl				sys_shmctl
210	common	shmctl				sys_old_shmctl
211	common	shmdt				sys_shmdt
212	common	shmget				sys_shmget
213	common	osf_mvalid			sys_ni_syscall
+3 −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
+3 −3
Original line number Diff line number Diff line
@@ -622,7 +622,7 @@ __SYSCALL(__NR_semop, sys_semop)
#define __NR_semget 299
__SYSCALL(__NR_semget, sys_semget)
#define __NR_semctl 300
__SYSCALL(__NR_semctl, compat_sys_semctl)
__SYSCALL(__NR_semctl, compat_sys_old_semctl)
#define __NR_msgsnd 301
__SYSCALL(__NR_msgsnd, compat_sys_msgsnd)
#define __NR_msgrcv 302
@@ -630,7 +630,7 @@ __SYSCALL(__NR_msgrcv, compat_sys_msgrcv)
#define __NR_msgget 303
__SYSCALL(__NR_msgget, sys_msgget)
#define __NR_msgctl 304
__SYSCALL(__NR_msgctl, compat_sys_msgctl)
__SYSCALL(__NR_msgctl, compat_sys_old_msgctl)
#define __NR_shmat 305
__SYSCALL(__NR_shmat, compat_sys_shmat)
#define __NR_shmdt 306
@@ -638,7 +638,7 @@ __SYSCALL(__NR_shmdt, sys_shmdt)
#define __NR_shmget 307
__SYSCALL(__NR_shmget, sys_shmget)
#define __NR_shmctl 308
__SYSCALL(__NR_shmctl, compat_sys_shmctl)
__SYSCALL(__NR_shmctl, compat_sys_old_shmctl)
#define __NR_add_key 309
__SYSCALL(__NR_add_key, sys_add_key)
#define __NR_request_key 310
+3 −3
Original line number Diff line number Diff line
@@ -335,15 +335,15 @@
325	common	semtimedop			sys_semtimedop
326	common	timerfd_settime			sys_timerfd_settime
327	common	timerfd_gettime			sys_timerfd_gettime
328	common	semctl				sys_semctl
328	common	semctl				sys_old_semctl
329	common	semget				sys_semget
330	common	semop				sys_semop
331	common	msgctl				sys_msgctl
331	common	msgctl				sys_old_msgctl
332	common	msgget				sys_msgget
333	common	msgrcv				sys_msgrcv
334	common	msgsnd				sys_msgsnd
335	common	shmat				sys_shmat
336	common	shmctl				sys_shmctl
336	common	shmctl				sys_old_shmctl
337	common	shmdt				sys_shmdt
338	common	shmget				sys_shmget
339	common	signalfd4			sys_signalfd4
+3 −3
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@
27	n32	madvise				sys_madvise
28	n32	shmget				sys_shmget
29	n32	shmat				sys_shmat
30	n32	shmctl				compat_sys_shmctl
30	n32	shmctl				compat_sys_old_shmctl
31	n32	dup				sys_dup
32	n32	dup2				sys_dup2
33	n32	pause				sys_pause
@@ -71,12 +71,12 @@
61	n32	uname				sys_newuname
62	n32	semget				sys_semget
63	n32	semop				sys_semop
64	n32	semctl				compat_sys_semctl
64	n32	semctl				compat_sys_old_semctl
65	n32	shmdt				sys_shmdt
66	n32	msgget				sys_msgget
67	n32	msgsnd				compat_sys_msgsnd
68	n32	msgrcv				compat_sys_msgrcv
69	n32	msgctl				compat_sys_msgctl
69	n32	msgctl				compat_sys_old_msgctl
70	n32	fcntl				compat_sys_fcntl
71	n32	flock				sys_flock
72	n32	fsync				sys_fsync
Loading