[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/5] ipc: add protected payload
From: |
Richard Braun |
Subject: |
Re: [PATCH 1/5] ipc: add protected payload |
Date: |
Fri, 21 Feb 2014 15:03:00 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Feb 21, 2014 at 12:48:49PM +0100, Justus Winter wrote:
> Add a field ip_protected_payload and a flag ip_has_protected_payload
> to struct ipc_port.
> diff --git a/ipc/ipc_port.h b/ipc/ipc_port.h
> index 27d2e49..4c7c742 100644
> --- a/ipc/ipc_port.h
> +++ b/ipc/ipc_port.h
> @@ -71,6 +71,10 @@ typedef unsigned int ipc_port_timestamp_t;
> struct ipc_port {
> struct ipc_target ip_target;
>
> + /* Flags. */
> + unsigned int ip_has_protected_payload:1; /* A pp has
> + been set. */
> +
> /* This points to the ip_target above if this port isn't on a port set;
> otherwise it points to the port set's ips_target. */
> struct ipc_target *ip_cur_target;
> @@ -96,6 +100,7 @@ struct ipc_port {
> mach_port_msgcount_t ip_msgcount;
> mach_port_msgcount_t ip_qlimit;
> struct ipc_thread_queue ip_blocked;
> + unsigned long ip_protected_payload;
> };
Increasing the port structure size by 4 bytes for a single bit is a
little frustrating. Instead, how about storing that bit in
ip_target.ipt_object.io_bits, right next to IO_BITS_ACTIVE ?
--
Richard Braun
- [PATCH 1/5] ipc: add protected payload, Justus Winter, 2014/02/21
- [PATCH 2/5] ipc: implement mach_port_{set,clear}_protected_payload, Justus Winter, 2014/02/21
- [PATCH 3/5] include: add msgh_protected_payload to mach_msg_header_t, Justus Winter, 2014/02/21
- [PATCH 4/5] include: define MACH_MSG_TYPE_PROTECTED_PAYLOAD, Justus Winter, 2014/02/21
- [PATCH 5/5] ipc: provide the protected payload in ipc_kmsg_copyout_header, Justus Winter, 2014/02/21
- Re: [PATCH 1/5] ipc: add protected payload,
Richard Braun <=
- [PATCH 1/5] ipc: add protected payload, Justus Winter, 2014/02/21
- [PATCH 2/5] ipc: implement mach_port_{set,clear}_protected_payload, Justus Winter, 2014/02/21
- [PATCH 3/5] include: add msgh_protected_payload to mach_msg_header_t, Justus Winter, 2014/02/21
- [PATCH 4/5] include: define MACH_MSG_TYPE_PROTECTED_PAYLOAD, Justus Winter, 2014/02/21
- [PATCH 5/5] ipc: provide the protected payload in ipc_kmsg_copyout_header, Justus Winter, 2014/02/21
- Re: [PATCH 5/5] ipc: provide the protected payload in ipc_kmsg_copyout_header, Samuel Thibault, 2014/02/22
- Re: [PATCH 1/5] ipc: add protected payload, Richard Braun, 2014/02/21