summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsm Hong <ism.hong@gmail.com>2025-01-06 14:52:27 +0300
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2025-01-11 14:55:47 +0300
commitbc7584e009c39375294794f7ca751a6b2622c425 (patch)
treedcf6cecda80df56afb1c6d682e00a0380c5036c7
parent42a39e4aa59a10aa4afdc14194f3ee63d2db94e1 (diff)
downloadlinux-bc7584e009c39375294794f7ca751a6b2622c425.tar.xz
mips: fix shmctl/semctl/msgctl syscall for o32
The commit 275f22148e87 ("ipc: rename old-style shmctl/semctl/msgctl syscalls") switched various architectures to use sys_old_*ctl() with ipc_parse_version, including mips n32/n64. However, for mips o32, commit 0d6040d46817 ("arch: add split IPC system calls where needed") added separate IPC syscalls without properly using the old-style handlers. This causes applications using uClibc-ng to fail with -EINVAL when calling semctl/shmctl/msgctl with IPC_64 flag, as uClibc-ng uses the syscall numbers from kernel headers to determine whether to use the IPC multiplexer or split syscalls. In contrast, glibc is unaffected as it uses a unified feature test macro __ASSUME_DIRECT_SYSVIPC_SYSCALLS (disabled for mips-o32) to make this decision. Fix this by switching the o32 ABI entries for semctl, shmctl and msgctl to use the old-style handlers, matching the behavior of other architectures and fixing compatibility with uClibc-ng. Signed-off-by: Ism Hong <ism.hong@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
-rw-r--r--arch/mips/kernel/syscalls/syscall_o32.tbl6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/mips/kernel/syscalls/syscall_o32.tbl b/arch/mips/kernel/syscalls/syscall_o32.tbl
index 349b8aad1159..e8a57c206758 100644
--- a/arch/mips/kernel/syscalls/syscall_o32.tbl
+++ b/arch/mips/kernel/syscalls/syscall_o32.tbl
@@ -382,15 +382,15 @@
368 o32 io_pgetevents sys_io_pgetevents_time32 compat_sys_io_pgetevents
# room for arch specific calls
393 o32 semget sys_semget
-394 o32 semctl sys_semctl compat_sys_semctl
+394 o32 semctl sys_old_semctl compat_sys_old_semctl
395 o32 shmget sys_shmget
-396 o32 shmctl sys_shmctl compat_sys_shmctl
+396 o32 shmctl sys_old_shmctl compat_sys_old_shmctl
397 o32 shmat sys_shmat compat_sys_shmat
398 o32 shmdt sys_shmdt
399 o32 msgget sys_msgget
400 o32 msgsnd sys_msgsnd compat_sys_msgsnd
401 o32 msgrcv sys_msgrcv compat_sys_msgrcv
-402 o32 msgctl sys_msgctl compat_sys_msgctl
+402 o32 msgctl sys_old_msgctl compat_sys_old_msgctl
403 o32 clock_gettime64 sys_clock_gettime sys_clock_gettime
404 o32 clock_settime64 sys_clock_settime sys_clock_settime
405 o32 clock_adjtime64 sys_clock_adjtime sys_clock_adjtime