summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/patches/mutable-types.patch54
-rw-r--r--debian/patches/protected_payload.patch61
2 files changed, 105 insertions, 10 deletions
diff --git a/debian/patches/mutable-types.patch b/debian/patches/mutable-types.patch
index c8e7b86..8a2344d 100644
--- a/debian/patches/mutable-types.patch
+++ b/debian/patches/mutable-types.patch
@@ -20,7 +20,7 @@ index 607d5d9..bfce6cb 100644
;
diff --git a/include/mach/memory_object.defs b/include/mach/memory_object.defs
-index ea7989a..7732955 100644
+index ea7989a..0ed8dbc 100644
--- a/include/mach/memory_object.defs
+++ b/include/mach/memory_object.defs
@@ -42,6 +42,10 @@ subsystem
@@ -34,6 +34,58 @@ index ea7989a..7732955 100644
#if SEQNOS
serverprefix seqnos_;
serverdemux seqnos_memory_object_server;
+@@ -85,7 +89,11 @@ simpleroutine memory_object_init(
+ simpleroutine memory_object_terminate(
+ memory_object : memory_object_t =
+ MACH_MSG_TYPE_MOVE_SEND
+- ctype: mach_port_t;
++ ctype: mach_port_t
++#ifdef MEMORY_OBJECT_INTRAN
++ intran: MEMORY_OBJECT_INTRAN
++#endif
++ ;
+ #if SEQNOS
+ msgseqno seqno : mach_port_seqno_t;
+ #endif /* SEQNOS */
+@@ -221,7 +229,11 @@ simpleroutine memory_object_data_write(
+ simpleroutine memory_object_lock_completed(
+ memory_object : memory_object_t =
+ polymorphic|MACH_MSG_TYPE_PORT_SEND_ONCE
+- ctype: mach_port_t;
++ ctype: mach_port_t
++#ifdef MEMORY_OBJECT_INTRAN
++ intran: MEMORY_OBJECT_INTRAN
++#endif
++ ;
+ #if SEQNOS
+ msgseqno seqno : mach_port_seqno_t;
+ #endif /* SEQNOS */
+@@ -252,7 +264,11 @@ simpleroutine memory_object_lock_completed(
+ simpleroutine memory_object_supply_completed(
+ memory_object : memory_object_t =
+ polymorphic|MACH_MSG_TYPE_PORT_SEND_ONCE
+- ctype: mach_port_t;
++ ctype: mach_port_t
++#ifdef MEMORY_OBJECT_INTRAN
++ intran: MEMORY_OBJECT_INTRAN
++#endif
++ ;
+ #if SEQNOS
+ msgseqno seqno : mach_port_seqno_t;
+ #endif /* SEQNOS */
+@@ -298,7 +314,11 @@ simpleroutine memory_object_data_return(
+ simpleroutine memory_object_change_completed(
+ memory_object : memory_object_t =
+ polymorphic|MACH_MSG_TYPE_PORT_SEND_ONCE
+- ctype: mach_port_t;
++ ctype: mach_port_t
++#ifdef MEMORY_OBJECT_INTRAN
++ intran: MEMORY_OBJECT_INTRAN
++#endif
++ ;
+ #if SEQNOS
+ msgseqno seqno : mach_port_seqno_t;
+ #endif /* SEQNOS */
diff --git a/include/mach/memory_object_default.defs b/include/mach/memory_object_default.defs
index 0eac271..cfd54a4 100644
--- a/include/mach/memory_object_default.defs
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;
}