diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-12-31 16:22:40 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2019-01-25 11:22:50 -0500 |
commit | 275f22148e8720e84b180d9e0cdf8abfd69bac5b (patch) | |
tree | f7cb9810f8415904589d73a8d8f3c15b0bc70246 /include/linux/syscalls.h | |
parent | 73a66023c937ef258f2aa340cdb53ae7d8b1d47c (diff) |
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: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/linux/syscalls.h')
-rw-r--r-- | include/linux/syscalls.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index fb63045a0fb6..938d8908b9e0 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -717,6 +717,7 @@ asmlinkage long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqst | |||
717 | 717 | ||
718 | /* ipc/msg.c */ | 718 | /* ipc/msg.c */ |
719 | asmlinkage long sys_msgget(key_t key, int msgflg); | 719 | asmlinkage long sys_msgget(key_t key, int msgflg); |
720 | asmlinkage long sys_old_msgctl(int msqid, int cmd, struct msqid_ds __user *buf); | ||
720 | asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf); | 721 | asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf); |
721 | asmlinkage long sys_msgrcv(int msqid, struct msgbuf __user *msgp, | 722 | asmlinkage long sys_msgrcv(int msqid, struct msgbuf __user *msgp, |
722 | size_t msgsz, long msgtyp, int msgflg); | 723 | size_t msgsz, long msgtyp, int msgflg); |
@@ -726,6 +727,7 @@ asmlinkage long sys_msgsnd(int msqid, struct msgbuf __user *msgp, | |||
726 | /* ipc/sem.c */ | 727 | /* ipc/sem.c */ |
727 | asmlinkage long sys_semget(key_t key, int nsems, int semflg); | 728 | asmlinkage long sys_semget(key_t key, int nsems, int semflg); |
728 | asmlinkage long sys_semctl(int semid, int semnum, int cmd, unsigned long arg); | 729 | asmlinkage long sys_semctl(int semid, int semnum, int cmd, unsigned long arg); |
730 | asmlinkage long sys_old_semctl(int semid, int semnum, int cmd, unsigned long arg); | ||
729 | asmlinkage long sys_semtimedop(int semid, struct sembuf __user *sops, | 731 | asmlinkage long sys_semtimedop(int semid, struct sembuf __user *sops, |
730 | unsigned nsops, | 732 | unsigned nsops, |
731 | const struct __kernel_timespec __user *timeout); | 733 | const struct __kernel_timespec __user *timeout); |
@@ -734,6 +736,7 @@ asmlinkage long sys_semop(int semid, struct sembuf __user *sops, | |||
734 | 736 | ||
735 | /* ipc/shm.c */ | 737 | /* ipc/shm.c */ |
736 | asmlinkage long sys_shmget(key_t key, size_t size, int flag); | 738 | asmlinkage long sys_shmget(key_t key, size_t size, int flag); |
739 | asmlinkage long sys_old_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); | ||
737 | asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); | 740 | asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); |
738 | asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg); | 741 | asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg); |
739 | asmlinkage long sys_shmdt(char __user *shmaddr); | 742 | asmlinkage long sys_shmdt(char __user *shmaddr); |