diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2022-11-30 02:14:20 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-11-30 22:26:30 +0100 |
commit | 958686efa2175abe3f7044890c2c2370e29147f2 (patch) | |
tree | f4052284d57e063d7f1b3583a3b8a387cba0cd3f /ipc/ipc_marequest.c | |
parent | 0afd533bfef628d0ef8476bbaaab78c6a1336873 (diff) | |
download | gnumach-958686efa2175abe3f7044890c2c2370e29147f2.tar.gz gnumach-958686efa2175abe3f7044890c2c2370e29147f2.tar.bz2 gnumach-958686efa2175abe3f7044890c2c2370e29147f2.zip |
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_marequest.c')
-rw-r--r-- | ipc/ipc_marequest.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ipc/ipc_marequest.c b/ipc/ipc_marequest.c index 736db838..526e4722 100644 --- a/ipc/ipc_marequest.c +++ b/ipc/ipc_marequest.c @@ -161,12 +161,12 @@ ipc_marequest_init(void) mach_msg_return_t ipc_marequest_create( - ipc_space_t space, - ipc_port_t port, - mach_port_t notify, - ipc_marequest_t *marequestp) + ipc_space_t space, + ipc_port_t port, + mach_port_name_t notify, + ipc_marequest_t *marequestp) { - mach_port_t name; + mach_port_name_t name; ipc_entry_t entry; ipc_port_t soright; ipc_marequest_t marequest; @@ -258,7 +258,7 @@ ipc_marequest_create( void ipc_marequest_cancel( ipc_space_t space, - mach_port_t name) + mach_port_name_t name) { ipc_marequest_bucket_t bucket; ipc_marequest_t marequest, *last; @@ -294,8 +294,8 @@ ipc_marequest_cancel( 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) { ipc_marequest_bucket_t bucket; ipc_marequest_t marequest, *last; @@ -340,7 +340,7 @@ void ipc_marequest_destroy(ipc_marequest_t marequest) { ipc_space_t space = marequest->imar_space; - mach_port_t name; + mach_port_name_t name; ipc_port_t soright; is_write_lock(space); |