protected payloads for GNU Mach

2014-02-17 Thread Justus Winter
Hi :) this patch series implements protected payloads on top of the mach messaging system. It preserves the semantics for programs not using this functionality. This is the kernel part of my work that will (hopefully) speed up the Hurd. For a detailed sketch see:

[PATCH 03/11] ipc: implement mach_port_set_protected_payload

2014-02-17 Thread Justus Winter
* include/mach/mach_port.defs: Add mach_port_set_protected_payload. * ipc/mach_port.c: Implement mach_port_set_protected_payload. --- include/mach/mach_port.defs | 9 + ipc/mach_port.c | 37 + 2 files changed, 46 insertions(+) diff --git

[PATCH 04/11] doc: document mach_port_set_protected_payload

2014-02-17 Thread Justus Winter
* doc/mach.texi (Receive Rights): Document mach_port_set_protected_payload. --- doc/mach.texi | 18 ++ 1 file changed, 18 insertions(+) diff --git a/doc/mach.texi b/doc/mach.texi index d089224..67c5fe9 100644 --- a/doc/mach.texi +++ b/doc/mach.texi @@ -2715,6 +2715,24 @@ In

[PATCH 01/11] include: skip routines related to migrating threads

2014-02-17 Thread Justus Winter
* include/mach/mach_port.defs: Skip the routines mach_port_set_rpcinfo and mach_port_create_act if MIGRATING_THREADS is not defined. --- include/mach/mach_port.defs | 5 + 1 file changed, 5 insertions(+) diff --git a/include/mach/mach_port.defs b/include/mach/mach_port.defs index

[PATCH 07/11] include: define MACH_MSG_TYPE_PROTECTED_PAYLOAD

2014-02-17 Thread Justus Winter
* include/mach/message.h: Define MACH_MSG_TYPE_PROTECTED_PAYLOAD. (MACH_MSG_TYPE_LAST): Adjust accordingly. --- include/mach/message.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/mach/message.h b/include/mach/message.h index 7464a57..0a7297e 100644 ---

[PATCH 10/11] ipc: clear the payload when moving a receive port

2014-02-17 Thread Justus Winter
Clear the protected payload when a receive port is moved from one ipc space to another. This is done to retain the old behavior of mach_msg, so that a port name is sent in the msgh_local_port field. If the new owner of that receive right wishes to use the protected payload mechanism, it has to be

[PATCH 05/11] include: add msgh_protected_payload to mach_msg_header_t

2014-02-17 Thread Justus Winter
* include/mach/message.h (mach_msg_header_t): Add msgh_protected_payload as a union with msgh_local_port. --- include/mach/message.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/mach/message.h b/include/mach/message.h index f78e978..7464a57 100644 ---

[PATCH 09/11] ipc: provide the protected payload in ipc_kmsg_copyout_header

2014-02-17 Thread Justus Winter
* ipc/ipc_kmsg.c (ipc_kmsg_copyout_header): If a protected payload is set for the destination port, provide it in msgh_protected_payload. --- ipc/ipc_kmsg.c | 58 +- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git

[PATCH 08/11] doc: document MACH_MSG_TYPE_PROTECTED_PAYLOAD

2014-02-17 Thread Justus Winter
* doc/mach.texi (Message Format): Document MACH_MSG_TYPE_PROTECTED_PAYLOAD. --- doc/mach.texi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/doc/mach.texi b/doc/mach.texi index 251c290..26bf0c6 100644 --- a/doc/mach.texi +++ b/doc/mach.texi @@ -1426,6 +1426,7 @@ types are predefined:

[PATCH 06/11] doc: document msgh_protected_payload

2014-02-17 Thread Justus Winter
* doc/mach.texi (Message Format): Document msgh_protected_payload. --- doc/mach.texi | 9 + 1 file changed, 9 insertions(+) diff --git a/doc/mach.texi b/doc/mach.texi index 67c5fe9..251c290 100644 --- a/doc/mach.texi +++ b/doc/mach.texi @@ -1330,6 +1330,15 @@ which is conventionally used

[PATCH 11/11] doc: document message semantics with protected payloads

2014-02-17 Thread Justus Winter
* doc/mach.texi (Message Receive): Document message semantics with protected payloads. --- doc/mach.texi | 19 +++ 1 file changed, 19 insertions(+) diff --git a/doc/mach.texi b/doc/mach.texi index 26bf0c6..b3cc2ec 100644 --- a/doc/mach.texi +++ b/doc/mach.texi @@ -1949,6 +1949,25

Re: [PATCH 04/11] doc: document mach_port_set_protected_payload

2014-02-17 Thread Richard Braun
On Mon, Feb 17, 2014 at 06:20:54PM +0100, Justus Winter wrote: +@deftypefun kern_return_t mach_port_set_protected_payload (@w{ipc_space_t @var{task}}, @w{mach_port_t @var{name}}, @w{unsigned long @var{payload}}) +The function @code{mach_port_set_protected_payload} sets the protected +payload