[PATCH gnumach] Reorder mach_msg_type_t fields to ensure msgt_name and msgt_size are byte aligned

2023-11-24 Thread Flavio Cruz
msgt_unused appears right after msgt_size since msgt_size can be reduced to only 8 bits in the future, so we leave the door opened to make msgt_unused 13 bits long. --- include/mach/message.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/mach/me

[PATCH hurd] Update hurd code to handle the new ABI for sending inlined port rights.

2023-11-24 Thread Flavio Cruz
--- libfshelp/start-translator-long.c | 16 proc/stubs.c | 8 +--- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/libfshelp/start-translator-long.c b/libfshelp/start-translator-long.c index 0b16e7d0..f788f0a7 100644 --- a/libfshelp/star

[PATCH glibc] Update code to handle the new ABI for sending inlined port rights.

2023-11-24 Thread Flavio Cruz
For i686, this change is no op but for x86_64 it forces all inlined port rights to be 8 bytes long. --- hurd/intr-msg.c| 26 -- mach/msg-destroy.c | 12 +--- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/hurd/intr-msg.c b/hurd/intr-msg.c index

[PATCH mig] x86_64: adapt MiG generated stubs to use mach_port_name_inlined_t for inlined port rights.

2023-11-24 Thread Flavio Cruz
For i686, we just change the code to use mach_port_name_inlined_t when defining the types. This is a no-op. For x86_64, there's a few things that are different: - In the server code, the server handler can get inlined ports and the array will be resized and cast as an array of mach_port_name_t.

[PATCH gnumach] x86_64: Support 8 byte inlined port rights to avoid message resizing.

2023-11-24 Thread Flavio Cruz
If a port is inlined in a message, the user has to use mach_port_name_inlined_t to define each port. Out of line memory continues to use mach_port_name_t since that memory has to be copied to the kernel anyway. Both copyinmsg and copyoutmsg can be reduced to nothing (if we ignore USER32) as a foll

Patch series to avoid message resizing for x86_64

2023-11-24 Thread Flavio Cruz
Hello, this patch series updates the RPC ABI so that inlined port rights are always passed as mach_port_name_inlined_t which is as big as a kernel port pointer. This avoids message resizing for x86_64 in the kernel. Out of line port rights are unchanged. A future patch will simplify copyinmsg/copyo