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: --- kern/ipc_tt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kern/ipc_tt.c') diff --git a/kern/ipc_tt.c b/kern/ipc_tt.c index 04a5a92f..0b10204c 100644 --- a/kern/ipc_tt.c +++ b/kern/ipc_tt.c @@ -554,11 +554,11 @@ mach_thread_self(void) * or other errors. */ -mach_port_t +mach_port_name_t mach_reply_port(void) { ipc_port_t port; - mach_port_t name; + mach_port_name_t name; kern_return_t kr; kr = ipc_port_alloc(current_task()->itk_space, &name, &port); -- cgit v1.2.3