bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch series to avoid message resizing for x86_64


From: Flavio Cruz
Subject: Patch series to avoid message resizing for x86_64
Date: Fri, 24 Nov 2023 16:30:37 -0500

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/copyoutmsg for 64bit userland in gnumach.

The major changes here happen in MiG. The interface to the user stubs
and server handlers is unchanged but MiG generates special code to
ensure we can convert between arrays of mach_port_name_inlined_t and
mach_port_name_t, depending on the situation. We introduce
itUserlandPort to identify userland port rights and drive code
generation.

A few small changes were required for glibc and the hurd servers but
overall it's pretty minor, which is evidence that this approach makes
sense as MiG does the heavy lifting.

For x86_64, I tested this with a simple initrd that boots up with the core 
servers
and up to a bash shell. I didn't test if a full system works with rumpdisk
or with networking. Stub diffs are provided in 
https://gist.github.com/flavioc/300ca3d8edbf7126abe22f01021df03f

For i686, I didn't see any problems with a cross-built system.
The diff in the autogenerated code is minimal here.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]