From 958686efa2175abe3f7044890c2c2370e29147f2 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Wed, 30 Nov 2022 02:14:20 -0500 Subject: 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: --- ipc/ipc_marequest.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ipc/ipc_marequest.h') diff --git a/ipc/ipc_marequest.h b/ipc/ipc_marequest.h index 4f6f7584..a55d4e23 100644 --- a/ipc/ipc_marequest.h +++ b/ipc/ipc_marequest.h @@ -63,7 +63,7 @@ typedef struct ipc_marequest { struct ipc_space *imar_space; - mach_port_t imar_name; + mach_port_name_t imar_name; struct ipc_port *imar_soright; struct ipc_marequest *imar_next; } *ipc_marequest_t; @@ -84,14 +84,14 @@ ipc_marequest_info(unsigned int *, hash_info_bucket_t *, unsigned int); extern mach_msg_return_t ipc_marequest_create(ipc_space_t space, ipc_port_t port, - mach_port_t notify, ipc_marequest_t *marequestp); + mach_port_name_t notify, ipc_marequest_t *marequestp); extern void -ipc_marequest_cancel(ipc_space_t space, mach_port_t name); +ipc_marequest_cancel(ipc_space_t space, mach_port_name_t name); extern void ipc_marequest_rename(ipc_space_t space, - mach_port_t old, mach_port_t new); + mach_port_name_t old, mach_port_name_t new); extern void ipc_marequest_destroy(ipc_marequest_t marequest); -- cgit v1.2.3