Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20261102165837.24591-7-kaloz@kernel.org>
Date: Mon,  2 Nov 2026 17:58:33 +0100
From: Imre Kaloz <kaloz@...nel.org>
To: musl@...ts.openwall.com
Subject: [PATCH 06/10] add sparc ipc() hooks for semctl and msgrcv

sparc64's sys_sparc_ipc takes the semctl semun and the msgrcv buffer
and type as arguments, where the generic sys_ipc reads them through a
pointer. sparc32 uses the generic sys_ipc.
---
 src/ipc/msgrcv.c | 2 ++
 src/ipc/semctl.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/ipc/msgrcv.c b/src/ipc/msgrcv.c
index 9d1034b1..c581fdbf 100644
--- a/src/ipc/msgrcv.c
+++ b/src/ipc/msgrcv.c
@@ -6,6 +6,8 @@ ssize_t msgrcv(int q, void *m, size_t len, long type, int flag)
 {
 #ifndef SYS_ipc
 	return syscall_cp(SYS_msgrcv, q, m, len, type, flag);
+#elif defined(SYSCALL_IPC_MSGRCV_DIRECT)
+	return syscall_cp(SYS_ipc, IPCOP_msgrcv, q, len, flag, m, type);
 #else
 	return syscall_cp(SYS_ipc, IPCOP_msgrcv, q, len, flag, ((long[]){ (long)m, type }));
 #endif
diff --git a/src/ipc/semctl.c b/src/ipc/semctl.c
index bbb97d7a..9d200efa 100644
--- a/src/ipc/semctl.c
+++ b/src/ipc/semctl.c
@@ -46,6 +46,8 @@ int semctl(int id, int num, int cmd, ...)
 #endif
 #ifndef SYS_ipc
 	int r = __syscall(SYS_semctl, id, num, IPC_CMD(cmd), arg.buf);
+#elif defined(SYSCALL_IPC_SEMUN_DIRECT)
+	int r = __syscall(SYS_ipc, IPCOP_semctl, id, num, IPC_CMD(cmd), arg.buf);
 #else
 	int r = __syscall(SYS_ipc, IPCOP_semctl, id, num, IPC_CMD(cmd), &arg.buf);
 #endif
-- 
2.47.3

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.