Skip to content

Commit bc7584e

Browse files
ismhongtsbogend
authored andcommitted
mips: fix shmctl/semctl/msgctl syscall for o32
The commit 275f221 ("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 0d6040d ("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>
1 parent 42a39e4 commit bc7584e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/mips/kernel/syscalls/syscall_o32.tbl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,15 +382,15 @@
382382
368 o32 io_pgetevents sys_io_pgetevents_time32 compat_sys_io_pgetevents
383383
# room for arch specific calls
384384
393 o32 semget sys_semget
385-
394 o32 semctl sys_semctl compat_sys_semctl
385+
394 o32 semctl sys_old_semctl compat_sys_old_semctl
386386
395 o32 shmget sys_shmget
387-
396 o32 shmctl sys_shmctl compat_sys_shmctl
387+
396 o32 shmctl sys_old_shmctl compat_sys_old_shmctl
388388
397 o32 shmat sys_shmat compat_sys_shmat
389389
398 o32 shmdt sys_shmdt
390390
399 o32 msgget sys_msgget
391391
400 o32 msgsnd sys_msgsnd compat_sys_msgsnd
392392
401 o32 msgrcv sys_msgrcv compat_sys_msgrcv
393-
402 o32 msgctl sys_msgctl compat_sys_msgctl
393+
402 o32 msgctl sys_old_msgctl compat_sys_old_msgctl
394394
403 o32 clock_gettime64 sys_clock_gettime sys_clock_gettime
395395
404 o32 clock_settime64 sys_clock_settime sys_clock_settime
396396
405 o32 clock_adjtime64 sys_clock_adjtime sys_clock_adjtime

0 commit comments

Comments
 (0)