summaryrefslogtreecommitdiff
path: root/ipc/ipc_space.c
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2022-11-30 02:14:20 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-11-30 22:26:30 +0100
commit958686efa2175abe3f7044890c2c2370e29147f2 (patch)
treef4052284d57e063d7f1b3583a3b8a387cba0cd3f /ipc/ipc_space.c
parent0afd533bfef628d0ef8476bbaaab78c6a1336873 (diff)
Update ipc/ directory to use mach_port_name_t
Make it explicit where we use port names versus actual ports. For the 64 bit kernel, port names and ports are of different size so this corrects the syscall arguments and internal structs to have the right size. This patch also uncovered several issues we need to solve to make GNUMach work well on 64 bits. First, the mach_msg call will receive 4 byte port names while the kernel "thinks" they are 8 bytes, which will be a problem. Also, when we send a message, the kernel translates the port names into port pointers in the message copied from user space. This also won't work on 64 bits. In this patch, I added several TODOs to fix the issues later. Message-Id: <Y4cCzNmc6vC4bjsX@viriathus>
Diffstat (limited to 'ipc/ipc_space.c')
-rw-r--r--ipc/ipc_space.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/ipc_space.c b/ipc/ipc_space.c
index 894cf58e..77040d13 100644
--- a/ipc/ipc_space.c
+++ b/ipc/ipc_space.c
@@ -194,7 +194,7 @@ ipc_space_destroy(
mach_port_type_t type = IE_BITS_TYPE(entry->ie_bits);
if (type != MACH_PORT_TYPE_NONE) {
- mach_port_t name =
+ mach_port_name_t name =
MACH_PORT_MAKEB(entry->ie_name, entry->ie_bits);
ipc_right_clean(space, name, entry);