diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-03-18 16:30:59 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-03-18 16:30:59 +0100 |
commit | caa76659f88c20ffc5cd38663358dceaba5296a3 (patch) | |
tree | 5499a8c9103bc0d4966d439c8d768d8ee629b657 /debian/patches/protected_payload.patch | |
parent | 062743d2a9aaf2ae6c26e90e1c3492fc38df07b3 (diff) |
update pp related patches
Diffstat (limited to 'debian/patches/protected_payload.patch')
-rw-r--r-- | debian/patches/protected_payload.patch | 61 |
1 files changed, 52 insertions, 9 deletions
diff --git a/debian/patches/protected_payload.patch b/debian/patches/protected_payload.patch index a91dc91..71f6b1e 100644 --- a/debian/patches/protected_payload.patch +++ b/debian/patches/protected_payload.patch @@ -146,6 +146,51 @@ index bfce6cb..85ad653 100644 #ifdef MEMORY_OBJECT_OUTTRAN outtran: MEMORY_OBJECT_OUTTRAN #endif +diff --git a/include/mach/memory_object.defs b/include/mach/memory_object.defs +index 0ed8dbc..c6c1921 100644 +--- a/include/mach/memory_object.defs ++++ b/include/mach/memory_object.defs +@@ -93,6 +93,10 @@ simpleroutine memory_object_terminate( + #ifdef MEMORY_OBJECT_INTRAN + intran: MEMORY_OBJECT_INTRAN + #endif ++#ifdef MEMORY_OBJECT_INTRAN_PAYLOAD ++ intranpayload: ++ MEMORY_OBJECT_INTRAN_PAYLOAD ++#endif + ; + #if SEQNOS + msgseqno seqno : mach_port_seqno_t; +@@ -233,6 +237,9 @@ simpleroutine memory_object_lock_completed( + #ifdef MEMORY_OBJECT_INTRAN + intran: MEMORY_OBJECT_INTRAN + #endif ++#ifdef MEMORY_OBJECT_INTRAN_PAYLOAD ++ intranpayload: MEMORY_OBJECT_INTRAN_PAYLOAD ++#endif + ; + #if SEQNOS + msgseqno seqno : mach_port_seqno_t; +@@ -268,6 +275,9 @@ simpleroutine memory_object_supply_completed( + #ifdef MEMORY_OBJECT_INTRAN + intran: MEMORY_OBJECT_INTRAN + #endif ++#ifdef MEMORY_OBJECT_INTRAN_PAYLOAD ++ intranpayload: MEMORY_OBJECT_INTRAN_PAYLOAD ++#endif + ; + #if SEQNOS + msgseqno seqno : mach_port_seqno_t; +@@ -318,6 +328,9 @@ simpleroutine memory_object_change_completed( + #ifdef MEMORY_OBJECT_INTRAN + intran: MEMORY_OBJECT_INTRAN + #endif ++#ifdef MEMORY_OBJECT_INTRAN_PAYLOAD ++ intranpayload: MEMORY_OBJECT_INTRAN_PAYLOAD ++#endif + ; + #if SEQNOS + msgseqno seqno : mach_port_seqno_t; diff --git a/include/mach/message.h b/include/mach/message.h index f78e978..0a7297e 100644 --- a/include/mach/message.h @@ -174,7 +219,7 @@ index f78e978..0a7297e 100644 /* * A dummy value. Mostly used to indicate that the actual value diff --git a/ipc/ipc_kmsg.c b/ipc/ipc_kmsg.c -index 0e43410..3d79866 100644 +index 0e43410..2190e30 100644 --- a/ipc/ipc_kmsg.c +++ b/ipc/ipc_kmsg.c @@ -1802,9 +1802,17 @@ ipc_kmsg_copyout_header(msg, space, notify) @@ -243,24 +288,22 @@ index 0e43410..3d79866 100644 msg->msgh_remote_port = MACH_PORT_NULL; return MACH_MSG_SUCCESS; } -@@ -2227,9 +2252,18 @@ ipc_kmsg_copyout_header(msg, space, notify) +@@ -2227,9 +2252,16 @@ ipc_kmsg_copyout_header(msg, space, notify) if (IP_VALID(reply)) ipc_port_release(reply); - msg->msgh_bits = (MACH_MSGH_BITS_OTHER(mbits) | - MACH_MSGH_BITS(reply_type, dest_type)); - msg->msgh_local_port = dest_name; -+ if (ipc_port_flag_protected_payload(dest) -+ && (dest_type == MACH_MSG_TYPE_PORT_SEND -+ || dest_type == MACH_MSG_TYPE_PORT_SEND_ONCE)) { ++ if (! ipc_port_flag_protected_payload(dest)) { ++ msg->msgh_bits = (MACH_MSGH_BITS_OTHER(mbits) | ++ MACH_MSGH_BITS(reply_type, dest_type)); ++ msg->msgh_local_port = dest_name; ++ } else { + msg->msgh_bits = (MACH_MSGH_BITS_OTHER(mbits) | + MACH_MSGH_BITS(reply_type, + MACH_MSG_TYPE_PROTECTED_PAYLOAD)); + msg->msgh_protected_payload = dest->ip_protected_payload; -+ } else { -+ msg->msgh_bits = (MACH_MSGH_BITS_OTHER(mbits) | -+ MACH_MSGH_BITS(reply_type, dest_type)); -+ msg->msgh_local_port = dest_name; + } msg->msgh_remote_port = reply_name; } |