Created
November 24, 2023 20:52
-
-
Save flavioc/300ca3d8edbf7126abe22f01021df03f to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_data_initialize.c 2023-11-24 15:41:06.371144152 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_data_initialize.c 2023-11-24 15:49:27.312111074 -0500 | |
@@ -54,8 +54,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_control_portType; | |
- mach_port_t memory_control_port; | |
- char memory_control_portPad[4]; | |
+ mach_port_name_inlined_t memory_control_port; | |
mach_msg_type_t offsetType; | |
vm_offset_t offset; | |
mach_msg_type_long_t dataType; | |
@@ -71,14 +70,14 @@ | |
const mach_msg_type_t memory_control_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t offsetType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -105,7 +104,7 @@ | |
InP->memory_control_portType = memory_control_portType; | |
- InP->memory_control_port = memory_control_port; | |
+ InP->memory_control_port.name = memory_control_port; | |
InP->offsetType = offsetType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_mach_port_insert_right_rpc.c 2023-11-24 15:41:06.423143007 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_mach_port_insert_right_rpc.c 2023-11-24 15:49:27.388109401 -0500 | |
@@ -56,8 +56,7 @@ | |
mach_port_name_t name; | |
char namePad[4]; | |
mach_msg_type_t polyType; | |
- mach_port_t poly; | |
- char polyPad[4]; | |
+ mach_port_name_inlined_t poly; | |
} Request; | |
typedef struct { | |
@@ -91,14 +90,14 @@ | |
const mach_msg_type_t polyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -116,7 +115,7 @@ | |
InP->polyType = polyType; | |
- InP->poly = poly; | |
+ InP->poly.name = poly; | |
if (MACH_MSG_TYPE_PORT_ANY(polyPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_thread_get_special_port.c 2023-11-24 15:41:06.467142038 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_thread_get_special_port.c 2023-11-24 15:49:27.436108343 -0500 | |
@@ -62,8 +62,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t special_portType; | |
- mach_port_t special_port; | |
- char special_portPad[4]; | |
+ mach_port_name_inlined_t special_port; | |
} Reply; | |
union { | |
@@ -105,7 +104,7 @@ | |
const mach_msg_type_t special_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -168,7 +167,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *special_port = OutP->special_port; | |
+ *special_port = OutP->special_port.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_mach_notify_new_task.c 2023-11-24 15:41:06.355144504 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_mach_notify_new_task.c 2023-11-24 15:49:27.308111163 -0500 | |
@@ -52,11 +52,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t parentType; | |
- mach_port_t parent; | |
- char parentPad[4]; | |
+ mach_port_name_inlined_t parent; | |
} Request; | |
union { | |
@@ -68,33 +66,33 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MOVE_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t parentType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MOVE_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->parentType = parentType; | |
- InP->parent = parent; | |
+ InP->parent.name = parent; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_data_return.c 2023-11-24 15:41:06.383143888 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_data_return.c 2023-11-24 15:49:27.332110634 -0500 | |
@@ -56,8 +56,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_controlType; | |
- mach_port_t memory_control; | |
- char memory_controlPad[4]; | |
+ mach_port_name_inlined_t memory_control; | |
mach_msg_type_t offsetType; | |
vm_offset_t offset; | |
mach_msg_type_long_t dataType; | |
@@ -79,14 +78,14 @@ | |
const mach_msg_type_t memory_controlType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t offsetType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -135,7 +134,7 @@ | |
InP->memory_controlType = memory_controlType; | |
- InP->memory_control = memory_control; | |
+ InP->memory_control.name = memory_control; | |
InP->offsetType = offsetType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_i386_io_perm_create.c 2023-11-24 15:41:06.371144152 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_i386_io_perm_create.c 2023-11-24 15:49:27.320110898 -0500 | |
@@ -67,8 +67,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t io_permType; | |
- mach_port_t io_perm; | |
- char io_permPad[4]; | |
+ mach_port_name_inlined_t io_perm; | |
} Reply; | |
union { | |
@@ -121,7 +120,7 @@ | |
const mach_msg_type_t io_permCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -188,7 +187,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *io_perm = OutP->io_perm; | |
+ *io_perm = OutP->io_perm.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_processor_set_default.c 2023-11-24 15:41:06.391143712 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_processor_set_default.c 2023-11-24 15:49:27.344110369 -0500 | |
@@ -58,8 +58,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t default_setType; | |
- mach_port_t default_set; | |
- char default_setPad[4]; | |
+ mach_port_name_inlined_t default_set; | |
} Reply; | |
union { | |
@@ -90,7 +89,7 @@ | |
const mach_msg_type_t default_setCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -149,7 +148,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *default_set = OutP->default_set; | |
+ *default_set = OutP->default_set.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_device_set_filter.c 2023-11-24 15:41:06.435142743 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_device_set_filter.c 2023-11-24 15:49:27.372109753 -0500 | |
@@ -57,8 +57,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t receive_portType; | |
- mach_port_t receive_port; | |
- char receive_portPad[4]; | |
+ mach_port_name_inlined_t receive_port; | |
mach_msg_type_t priorityType; | |
int priority; | |
char priorityPad[4]; | |
@@ -90,14 +89,14 @@ | |
const mach_msg_type_t receive_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t priorityType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -132,7 +131,7 @@ | |
InP->receive_portType = receive_portType; | |
- InP->receive_port = receive_port; | |
+ InP->receive_port.name = receive_port; | |
if (MACH_MSG_TYPE_PORT_ANY(receive_portPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_data_unlock.c 2023-11-24 15:41:06.371144152 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_data_unlock.c 2023-11-24 15:49:27.320110898 -0500 | |
@@ -54,8 +54,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_controlType; | |
- mach_port_t memory_control; | |
- char memory_controlPad[4]; | |
+ mach_port_name_inlined_t memory_control; | |
mach_msg_type_t offsetType; | |
vm_offset_t offset; | |
mach_msg_type_t lengthType; | |
@@ -74,14 +73,14 @@ | |
const mach_msg_type_t memory_controlType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t offsetType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -118,7 +117,7 @@ | |
InP->memory_controlType = memory_controlType; | |
- InP->memory_control = memory_control; | |
+ InP->memory_control.name = memory_control; | |
InP->offsetType = offsetType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_host_processor_sets.c 2023-11-24 15:41:06.519140893 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_host_processor_sets.c 2023-11-24 15:49:27.420108696 -0500 | |
@@ -138,7 +138,8 @@ | |
if (mig_unlikely ((OutP->processor_setsType.msgtl_header.msgt_inline != FALSE) || | |
(OutP->processor_setsType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->processor_setsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->processor_setsType.msgtl_size != 32))) | |
+ (OutP->processor_setsType.msgtl_size != 64 && OutP->processor_setsType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->processor_setsType.msgtl_size != 32 && OutP->processor_setsType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_exception_raise.c 2023-11-24 15:41:06.383143888 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_exception_raise.c 2023-11-24 15:49:27.328110722 -0500 | |
@@ -54,11 +54,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t threadType; | |
- mach_port_t thread; | |
- char threadPad[4]; | |
+ mach_port_name_inlined_t thread; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t exceptionType; | |
integer_t exception; | |
char exceptionPad[4]; | |
@@ -88,25 +86,25 @@ | |
const mach_msg_type_t threadType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t exceptionType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -153,11 +151,11 @@ | |
InP->threadType = threadType; | |
- InP->thread = thread; | |
+ InP->thread.name = thread; | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->exceptionType = exceptionType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_lock_completed.c 2023-11-24 15:41:06.375144063 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_lock_completed.c 2023-11-24 15:49:27.324110810 -0500 | |
@@ -54,8 +54,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_controlType; | |
- mach_port_t memory_control; | |
- char memory_controlPad[4]; | |
+ mach_port_name_inlined_t memory_control; | |
mach_msg_type_t offsetType; | |
vm_offset_t offset; | |
mach_msg_type_t lengthType; | |
@@ -71,14 +70,14 @@ | |
const mach_msg_type_t memory_controlType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t offsetType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -104,7 +103,7 @@ | |
InP->memory_controlType = memory_controlType; | |
- InP->memory_control = memory_control; | |
+ InP->memory_control.name = memory_control; | |
InP->offsetType = offsetType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_thread_max_priority.c 2023-11-24 15:41:06.443142566 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_thread_max_priority.c 2023-11-24 15:49:27.384109489 -0500 | |
@@ -52,8 +52,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t processor_setType; | |
- mach_port_t processor_set; | |
- char processor_setPad[4]; | |
+ mach_port_name_inlined_t processor_set; | |
mach_msg_type_t max_priorityType; | |
int max_priority; | |
char max_priorityPad[4]; | |
@@ -78,14 +77,14 @@ | |
const mach_msg_type_t processor_setType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t max_priorityType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -110,7 +109,7 @@ | |
InP->processor_setType = processor_setType; | |
- InP->processor_set = processor_set; | |
+ InP->processor_set.name = processor_set; | |
InP->max_priorityType = max_priorityType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_lock_request.c 2023-11-24 15:41:06.435142743 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_lock_request.c 2023-11-24 15:49:27.392109312 -0500 | |
@@ -69,8 +69,7 @@ | |
vm_prot_t lock_value; | |
char lock_valuePad[4]; | |
mach_msg_type_t reply_toType; | |
- mach_port_t reply_to; | |
- char reply_toPad[4]; | |
+ mach_port_name_inlined_t reply_to; | |
} Request; | |
union { | |
@@ -137,14 +136,14 @@ | |
const mach_msg_type_t reply_toType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->offsetType = offsetType; | |
@@ -168,7 +167,7 @@ | |
InP->reply_toType = reply_toType; | |
- InP->reply_to = reply_to; | |
+ InP->reply_to.name = reply_to; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_i386_io_perm_modify.c 2023-11-24 15:41:06.375144063 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_i386_io_perm_modify.c 2023-11-24 15:49:27.324110810 -0500 | |
@@ -53,8 +53,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t io_permType; | |
- mach_port_t io_perm; | |
- char io_permPad[4]; | |
+ mach_port_name_inlined_t io_perm; | |
mach_msg_type_t enableType; | |
boolean_t enable; | |
char enablePad[4]; | |
@@ -79,14 +78,14 @@ | |
const mach_msg_type_t io_permType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t enableType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_BOOLEAN, | |
@@ -111,7 +110,7 @@ | |
InP->io_permType = io_permType; | |
- InP->io_perm = io_perm; | |
+ InP->io_perm.name = io_perm; | |
InP->enableType = enableType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_device_open_new.c 2023-11-24 15:41:06.415143182 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_device_open_new.c 2023-11-24 15:49:27.356110105 -0500 | |
@@ -67,8 +67,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t deviceType; | |
- mach_port_t device; | |
- char devicePad[4]; | |
+ mach_port_name_inlined_t device; | |
} Reply; | |
union { | |
@@ -121,7 +120,7 @@ | |
const mach_msg_type_t deviceCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -188,7 +187,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *device = OutP->device; | |
+ *device = OutP->device.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_vm_allocate_contiguous.c 2023-11-24 15:41:06.407143359 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_vm_allocate_contiguous.c 2023-11-24 15:49:27.344110369 -0500 | |
@@ -58,8 +58,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t target_taskType; | |
- mach_port_t target_task; | |
- char target_taskPad[4]; | |
+ mach_port_name_inlined_t target_task; | |
mach_msg_type_t sizeType; | |
vm_size_t size; | |
mach_msg_type_t pminType; | |
@@ -96,14 +95,14 @@ | |
const mach_msg_type_t target_taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t sizeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -181,7 +180,7 @@ | |
InP->target_taskType = target_taskType; | |
- InP->target_task = target_task; | |
+ InP->target_task.name = target_task; | |
InP->sizeType = sizeType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_task_create_rpc.c 2023-11-24 15:41:06.339144856 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_task_create_rpc.c 2023-11-24 15:49:27.292111515 -0500 | |
@@ -62,8 +62,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t child_taskType; | |
- mach_port_t child_task; | |
- char child_taskPad[4]; | |
+ mach_port_name_inlined_t child_task; | |
} Reply; | |
union { | |
@@ -105,7 +104,7 @@ | |
const mach_msg_type_t child_taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -168,7 +167,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *child_task = OutP->child_task; | |
+ *child_task = OutP->child_task.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_task_assign.c 2023-11-24 15:41:06.423143007 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_task_assign.c 2023-11-24 15:49:27.372109753 -0500 | |
@@ -52,8 +52,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t new_setType; | |
- mach_port_t new_set; | |
- char new_setPad[4]; | |
+ mach_port_name_inlined_t new_set; | |
mach_msg_type_t assign_threadsType; | |
boolean_t assign_threads; | |
char assign_threadsPad[4]; | |
@@ -78,14 +77,14 @@ | |
const mach_msg_type_t new_setType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t assign_threadsType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_BOOLEAN, | |
@@ -110,7 +109,7 @@ | |
InP->new_setType = new_setType; | |
- InP->new_set = new_set; | |
+ InP->new_set.name = new_set; | |
InP->assign_threadsType = assign_threadsType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_task_get_assignment.c 2023-11-24 15:41:06.435142743 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_task_get_assignment.c 2023-11-24 15:49:27.376109665 -0500 | |
@@ -58,8 +58,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t assigned_setType; | |
- mach_port_t assigned_set; | |
- char assigned_setPad[4]; | |
+ mach_port_name_inlined_t assigned_set; | |
} Reply; | |
union { | |
@@ -90,7 +89,7 @@ | |
const mach_msg_type_t assigned_setCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -149,7 +148,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *assigned_set = OutP->assigned_set; | |
+ *assigned_set = OutP->assigned_set.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_terminate.c 2023-11-24 15:41:06.359144415 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_terminate.c 2023-11-24 15:49:27.312111074 -0500 | |
@@ -52,11 +52,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_controlType; | |
- mach_port_t memory_control; | |
- char memory_controlPad[4]; | |
+ mach_port_name_inlined_t memory_control; | |
mach_msg_type_t memory_object_nameType; | |
- mach_port_t memory_object_name; | |
- char memory_object_namePad[4]; | |
+ mach_port_name_inlined_t memory_object_name; | |
} Request; | |
union { | |
@@ -68,33 +66,33 @@ | |
const mach_msg_type_t memory_controlType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MOVE_RECEIVE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t memory_object_nameType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MOVE_RECEIVE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->memory_controlType = memory_controlType; | |
- InP->memory_control = memory_control; | |
+ InP->memory_control.name = memory_control; | |
InP->memory_object_nameType = memory_object_nameType; | |
- InP->memory_object_name = memory_object_name; | |
+ InP->memory_object_name.name = memory_object_name; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_MOVE_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_processor_set_threads.c 2023-11-24 15:41:06.519140893 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_processor_set_threads.c 2023-11-24 15:49:27.412108871 -0500 | |
@@ -138,7 +138,8 @@ | |
if (mig_unlikely ((OutP->thread_listType.msgtl_header.msgt_inline != FALSE) || | |
(OutP->thread_listType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->thread_listType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->thread_listType.msgtl_size != 32))) | |
+ (OutP->thread_listType.msgtl_size != 64 && OutP->thread_listType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->thread_listType.msgtl_size != 32 && OutP->thread_listType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_mach_ports_lookup.c 2023-11-24 15:41:06.415143182 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_mach_ports_lookup.c 2023-11-24 15:49:27.380109576 -0500 | |
@@ -138,7 +138,8 @@ | |
if (mig_unlikely ((OutP->init_port_setType.msgtl_header.msgt_inline != FALSE) || | |
(OutP->init_port_setType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->init_port_setType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->init_port_setType.msgtl_size != 32))) | |
+ (OutP->init_port_setType.msgtl_size != 64 && OutP->init_port_setType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->init_port_setType.msgtl_size != 32 && OutP->init_port_setType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_mach_port_extract_right.c 2023-11-24 15:41:06.423143007 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_mach_port_extract_right.c 2023-11-24 15:49:27.392109312 -0500 | |
@@ -67,8 +67,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t polyType; | |
- mach_port_t poly; | |
- char polyPad[4]; | |
+ mach_port_name_inlined_t poly; | |
} Reply; | |
union { | |
@@ -178,11 +177,11 @@ | |
(OutP->polyType.msgt_longform != FALSE) || | |
(MACH_MSG_TYPE_PORT_ANY(OutP->polyType.msgt_name) && msgh_simple) || | |
(OutP->polyType.msgt_number != 1) || | |
- (OutP->polyType.msgt_size != 32))) | |
+ (OutP->polyType.msgt_size != 64))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *poly = OutP->poly; | |
+ *poly = OutP->poly.name; | |
*polyPoly = OutP->polyType.msgt_name; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_supply_completed.c 2023-11-24 15:41:06.379143976 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_supply_completed.c 2023-11-24 15:49:27.328110722 -0500 | |
@@ -56,8 +56,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_controlType; | |
- mach_port_t memory_control; | |
- char memory_controlPad[4]; | |
+ mach_port_name_inlined_t memory_control; | |
mach_msg_type_t offsetType; | |
vm_offset_t offset; | |
mach_msg_type_t lengthType; | |
@@ -78,14 +77,14 @@ | |
const mach_msg_type_t memory_controlType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t offsetType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -133,7 +132,7 @@ | |
InP->memory_controlType = memory_controlType; | |
- InP->memory_control = memory_control; | |
+ InP->memory_control.name = memory_control; | |
InP->offsetType = offsetType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_task_set_special_port_rpc.c 2023-11-24 15:41:06.451142390 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_task_set_special_port_rpc.c 2023-11-24 15:49:27.408108960 -0500 | |
@@ -55,8 +55,7 @@ | |
int which_port; | |
char which_portPad[4]; | |
mach_msg_type_t special_portType; | |
- mach_port_t special_port; | |
- char special_portPad[4]; | |
+ mach_port_name_inlined_t special_port; | |
} Request; | |
typedef struct { | |
@@ -89,14 +88,14 @@ | |
const mach_msg_type_t special_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -114,7 +113,7 @@ | |
InP->special_portType = special_portType; | |
- InP->special_port = special_port; | |
+ InP->special_port.name = special_port; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_i386_get_ldt.c 2023-11-24 15:41:06.371144152 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_i386_get_ldt.c 2023-11-24 15:49:27.316110987 -0500 | |
@@ -189,14 +189,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->desc_listType.msgtl_header.msgt_inline) | |
- *desc_list = OutP->desc_listP; | |
+ *desc_list = OutP->desc_listP; | |
else if (OutP->desc_listType.msgtl_number / 2 > *desc_listCnt) { | |
- __mig_allocate((vm_offset_t *)desc_list, | |
- 4 * OutP->desc_listType.msgtl_number); | |
- memcpy(*desc_list, OutP->desc_list, 4 * OutP->desc_listType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)desc_list, 4 * OutP->desc_listType.msgtl_number); | |
+ memcpy(*desc_list, OutP->desc_list, 4 * OutP->desc_listType.msgtl_number); | |
} | |
else if (OutP->desc_listType.msgtl_number) { | |
- memcpy(*desc_list, OutP->desc_list, 4 * OutP->desc_listType.msgtl_number); | |
+ memcpy(*desc_list, OutP->desc_list, 4 * OutP->desc_listType.msgtl_number); | |
} | |
*desc_listCnt = OutP->desc_listType.msgtl_number / 2; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_task_get_special_port.c 2023-11-24 15:41:06.447142479 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_task_get_special_port.c 2023-11-24 15:49:27.404109048 -0500 | |
@@ -62,8 +62,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t special_portType; | |
- mach_port_t special_port; | |
- char special_portPad[4]; | |
+ mach_port_name_inlined_t special_port; | |
} Reply; | |
union { | |
@@ -105,7 +104,7 @@ | |
const mach_msg_type_t special_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -168,7 +167,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *special_port = OutP->special_port; | |
+ *special_port = OutP->special_port.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_host_processor_set_priv.c 2023-11-24 15:41:06.523140805 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_host_processor_set_priv.c 2023-11-24 15:49:27.428108519 -0500 | |
@@ -52,8 +52,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t set_nameType; | |
- mach_port_t set_name; | |
- char set_namePad[4]; | |
+ mach_port_name_inlined_t set_name; | |
} Request; | |
typedef struct { | |
@@ -62,8 +61,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t setType; | |
- mach_port_t set; | |
- char setPad[4]; | |
+ mach_port_name_inlined_t set; | |
} Reply; | |
union { | |
@@ -84,14 +82,14 @@ | |
const mach_msg_type_t set_nameType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -105,7 +103,7 @@ | |
const mach_msg_type_t setCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -115,7 +113,7 @@ | |
InP->set_nameType = set_nameType; | |
- InP->set_name = set_name; | |
+ InP->set_name.name = set_name; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -168,7 +166,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *set = OutP->set; | |
+ *set = OutP->set.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_create_proxy.c 2023-11-24 15:41:06.375144063 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_create_proxy.c 2023-11-24 15:49:27.324110810 -0500 | |
@@ -65,7 +65,7 @@ | |
char max_protectionPad[4]; | |
mach_msg_type_t objectType; | |
union { | |
- mach_port_t object[1024]; | |
+ mach_port_name_inlined_t object[1024]; | |
const mach_port_t *objectP; | |
}; | |
mach_msg_type_t offsetType; | |
@@ -91,8 +91,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t proxyType; | |
- mach_port_t proxy; | |
- char proxyPad[4]; | |
+ mach_port_name_inlined_t proxy; | |
} Reply; | |
union { | |
@@ -121,7 +120,7 @@ | |
const mach_msg_type_t objectType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1024, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -171,7 +170,7 @@ | |
const mach_msg_type_t proxyCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -189,7 +188,14 @@ | |
return MIG_ARRAY_TOO_LARGE; | |
} | |
else if (objectCnt) { | |
- memcpy(InP->object, object, 4 * objectCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_object = (mach_port_name_inlined_t *)InP->object; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < objectCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_object[i].kernel_port_do_not_use = 0; | |
+ inlined_object[i].name = (object)[i]; | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(objectPoly)) | |
@@ -199,9 +205,9 @@ | |
InP->objectType.msgt_number = objectCnt; | |
- msgh_size_delta = (4 * objectCnt + 7) & ~7; | |
+ msgh_size_delta = 8 * objectCnt; | |
msgh_size = 80 + msgh_size_delta; | |
- InP = (Request *) ((char *) InP + msgh_size_delta - 4096); | |
+ InP = (Request *) ((char *) InP + msgh_size_delta - 8192); | |
InP->offsetType = offsetType; | |
if (offsetCnt > 1024) { | |
@@ -295,7 +301,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *proxy = OutP->proxy; | |
+ *proxy = OutP->proxy.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_device_intr_register.c 2023-11-24 15:41:06.435142743 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_device_intr_register.c 2023-11-24 15:49:27.376109665 -0500 | |
@@ -62,8 +62,7 @@ | |
int flags; | |
char flagsPad[4]; | |
mach_msg_type_t receive_portType; | |
- mach_port_t receive_port; | |
- char receive_portPad[4]; | |
+ mach_port_name_inlined_t receive_port; | |
} Request; | |
typedef struct { | |
@@ -108,14 +107,14 @@ | |
const mach_msg_type_t receive_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -137,7 +136,7 @@ | |
InP->receive_portType = receive_portType; | |
- InP->receive_port = receive_port; | |
+ InP->receive_port.name = receive_port; | |
if (MACH_MSG_TYPE_PORT_ANY(receive_portPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_data_request.c 2023-11-24 15:41:06.367144240 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_data_request.c 2023-11-24 15:49:27.316110987 -0500 | |
@@ -54,8 +54,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_controlType; | |
- mach_port_t memory_control; | |
- char memory_controlPad[4]; | |
+ mach_port_name_inlined_t memory_control; | |
mach_msg_type_t offsetType; | |
vm_offset_t offset; | |
mach_msg_type_t lengthType; | |
@@ -74,14 +73,14 @@ | |
const mach_msg_type_t memory_controlType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t offsetType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -118,7 +117,7 @@ | |
InP->memory_controlType = memory_controlType; | |
- InP->memory_control = memory_control; | |
+ InP->memory_control.name = memory_control; | |
InP->offsetType = offsetType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_device_intr_ack.c 2023-11-24 15:41:06.439142655 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_device_intr_ack.c 2023-11-24 15:49:27.380109576 -0500 | |
@@ -54,8 +54,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t receive_portType; | |
- mach_port_t receive_port; | |
- char receive_portPad[4]; | |
+ mach_port_name_inlined_t receive_port; | |
} Request; | |
typedef struct { | |
@@ -78,14 +77,14 @@ | |
const mach_msg_type_t receive_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -99,7 +98,7 @@ | |
InP->receive_portType = receive_portType; | |
- InP->receive_port = receive_port; | |
+ InP->receive_port.name = receive_port; | |
if (MACH_MSG_TYPE_PORT_ANY(receive_portPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_init.c 2023-11-24 15:41:06.359144415 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_init.c 2023-11-24 15:49:27.308111163 -0500 | |
@@ -53,11 +53,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_controlType; | |
- mach_port_t memory_control; | |
- char memory_controlPad[4]; | |
+ mach_port_name_inlined_t memory_control; | |
mach_msg_type_t memory_object_nameType; | |
- mach_port_t memory_object_name; | |
- char memory_object_namePad[4]; | |
+ mach_port_name_inlined_t memory_object_name; | |
mach_msg_type_t memory_object_page_sizeType; | |
vm_size_t memory_object_page_size; | |
} Request; | |
@@ -71,25 +69,25 @@ | |
const mach_msg_type_t memory_controlType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t memory_object_nameType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t memory_object_page_sizeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -104,11 +102,11 @@ | |
InP->memory_controlType = memory_controlType; | |
- InP->memory_control = memory_control; | |
+ InP->memory_control.name = memory_control; | |
InP->memory_object_nameType = memory_object_nameType; | |
- InP->memory_object_name = memory_object_name; | |
+ InP->memory_object_name.name = memory_object_name; | |
InP->memory_object_page_sizeType = memory_object_page_sizeType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_task_threads.c 2023-11-24 15:41:06.355144504 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_task_threads.c 2023-11-24 15:49:27.312111074 -0500 | |
@@ -138,7 +138,8 @@ | |
if (mig_unlikely ((OutP->thread_listType.msgtl_header.msgt_inline != FALSE) || | |
(OutP->thread_listType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->thread_listType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->thread_listType.msgtl_size != 32))) | |
+ (OutP->thread_listType.msgtl_size != 64 && OutP->thread_listType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->thread_listType.msgtl_size != 32 && OutP->thread_listType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_create.c 2023-11-24 15:41:06.367144240 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_create.c 2023-11-24 15:49:27.308111163 -0500 | |
@@ -55,16 +55,13 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t new_memory_objectType; | |
- mach_port_t new_memory_object; | |
- char new_memory_objectPad[4]; | |
+ mach_port_name_inlined_t new_memory_object; | |
mach_msg_type_t new_object_sizeType; | |
vm_size_t new_object_size; | |
mach_msg_type_t new_control_portType; | |
- mach_port_t new_control_port; | |
- char new_control_portPad[4]; | |
+ mach_port_name_inlined_t new_control_port; | |
mach_msg_type_t new_nameType; | |
- mach_port_t new_name; | |
- char new_namePad[4]; | |
+ mach_port_name_inlined_t new_name; | |
mach_msg_type_t new_page_sizeType; | |
vm_size_t new_page_size; | |
} Request; | |
@@ -78,14 +75,14 @@ | |
const mach_msg_type_t new_memory_objectType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MOVE_RECEIVE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t new_object_sizeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -100,25 +97,25 @@ | |
const mach_msg_type_t new_control_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t new_nameType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t new_page_sizeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -133,7 +130,7 @@ | |
InP->new_memory_objectType = new_memory_objectType; | |
- InP->new_memory_object = new_memory_object; | |
+ InP->new_memory_object.name = new_memory_object; | |
InP->new_object_sizeType = new_object_sizeType; | |
@@ -141,11 +138,11 @@ | |
InP->new_control_portType = new_control_portType; | |
- InP->new_control_port = new_control_port; | |
+ InP->new_control_port.name = new_control_port; | |
InP->new_nameType = new_nameType; | |
- InP->new_name = new_name; | |
+ InP->new_name.name = new_name; | |
InP->new_page_sizeType = new_page_sizeType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_vm_map_rpc.c 2023-11-24 15:41:06.479141774 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_vm_map_rpc.c 2023-11-24 15:49:27.452107991 -0500 | |
@@ -69,8 +69,7 @@ | |
boolean_t anywhere; | |
char anywherePad[4]; | |
mach_msg_type_t memory_objectType; | |
- mach_port_t memory_object; | |
- char memory_objectPad[4]; | |
+ mach_port_name_inlined_t memory_object; | |
mach_msg_type_t offsetType; | |
vm_offset_t offset; | |
mach_msg_type_t copyType; | |
@@ -155,14 +154,14 @@ | |
const mach_msg_type_t memory_objectType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t offsetType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -257,7 +256,7 @@ | |
InP->memory_objectType = memory_objectType; | |
- InP->memory_object = memory_object; | |
+ InP->memory_object.name = memory_object; | |
InP->offsetType = offsetType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_thread_wire.c 2023-11-24 15:41:06.563139924 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_thread_wire.c 2023-11-24 15:49:27.452107991 -0500 | |
@@ -52,8 +52,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t threadType; | |
- mach_port_t thread; | |
- char threadPad[4]; | |
+ mach_port_name_inlined_t thread; | |
mach_msg_type_t wiredType; | |
boolean_t wired; | |
char wiredPad[4]; | |
@@ -78,14 +77,14 @@ | |
const mach_msg_type_t threadType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t wiredType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_BOOLEAN, | |
@@ -110,7 +109,7 @@ | |
InP->threadType = threadType; | |
- InP->thread = thread; | |
+ InP->thread.name = thread; | |
InP->wiredType = wiredType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_data_supply.c 2023-11-24 15:41:06.491141510 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_data_supply.c 2023-11-24 15:49:27.472107550 -0500 | |
@@ -67,8 +67,7 @@ | |
boolean_t precious; | |
char preciousPad[4]; | |
mach_msg_type_t reply_toType; | |
- mach_port_t reply_to; | |
- char reply_toPad[4]; | |
+ mach_port_name_inlined_t reply_to; | |
} Request; | |
union { | |
@@ -125,14 +124,14 @@ | |
const mach_msg_type_t reply_toType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->offsetType = offsetType; | |
@@ -156,7 +155,7 @@ | |
InP->reply_toType = reply_toType; | |
- InP->reply_to = reply_to; | |
+ InP->reply_to.name = reply_to; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_thread_assign.c 2023-11-24 15:41:06.411143271 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_thread_assign.c 2023-11-24 15:49:27.360110017 -0500 | |
@@ -51,8 +51,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t new_setType; | |
- mach_port_t new_set; | |
- char new_setPad[4]; | |
+ mach_port_name_inlined_t new_set; | |
} Request; | |
typedef struct { | |
@@ -74,14 +73,14 @@ | |
const mach_msg_type_t new_setType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -95,7 +94,7 @@ | |
InP->new_setType = new_setType; | |
- InP->new_set = new_set; | |
+ InP->new_set.name = new_set; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_thread_terminate_release.c 2023-11-24 15:41:06.359144415 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_thread_terminate_release.c 2023-11-24 15:49:27.308111163 -0500 | |
@@ -56,8 +56,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t thread_nameType; | |
mach_port_name_t thread_name; | |
char thread_namePad[4]; | |
@@ -79,14 +78,14 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t thread_nameType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_NAME, | |
@@ -134,7 +133,7 @@ | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->thread_nameType = thread_nameType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_processor_set_info.c 2023-11-24 15:41:06.583139485 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_processor_set_info.c 2023-11-24 15:49:27.460107814 -0500 | |
@@ -67,8 +67,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t hostType; | |
- mach_port_t host; | |
- char hostPad[4]; | |
+ mach_port_name_inlined_t host; | |
mach_msg_type_t info_outType; | |
union { | |
integer_t info_out[1024]; | |
@@ -126,7 +125,7 @@ | |
const mach_msg_type_t hostCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -196,7 +195,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *host = OutP->host; | |
+ *host = OutP->host.name; | |
#if TypeCheck | |
if (mig_unlikely ((OutP->info_outType.msgt_inline != TRUE) || | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_vm_wire_all.c 2023-11-24 15:41:06.387143799 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_vm_wire_all.c 2023-11-24 15:49:27.332110634 -0500 | |
@@ -53,8 +53,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t flagsType; | |
vm_wire_t flags; | |
char flagsPad[4]; | |
@@ -79,14 +78,14 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t flagsType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -111,7 +110,7 @@ | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->flagsType = flagsType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_mach_port_request_notification.c 2023-11-24 15:41:06.419143095 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_mach_port_request_notification.c 2023-11-24 15:49:27.384109489 -0500 | |
@@ -65,8 +65,7 @@ | |
mach_port_mscount_t sync; | |
char syncPad[4]; | |
mach_msg_type_t notifyType; | |
- mach_port_t notify; | |
- char notifyPad[4]; | |
+ mach_port_name_inlined_t notify; | |
} Request; | |
typedef struct { | |
@@ -75,8 +74,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t previousType; | |
- mach_port_t previous; | |
- char previousPad[4]; | |
+ mach_port_name_inlined_t previous; | |
} Reply; | |
union { | |
@@ -128,14 +126,14 @@ | |
const mach_msg_type_t notifyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -149,7 +147,7 @@ | |
const mach_msg_type_t previousCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -171,7 +169,7 @@ | |
InP->notifyType = notifyType; | |
- InP->notify = notify; | |
+ InP->notify.name = notify; | |
if (MACH_MSG_TYPE_PORT_ANY(notifyPoly)) | |
msgh_simple = FALSE; | |
@@ -231,7 +229,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *previous = OutP->previous; | |
+ *previous = OutP->previous.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_thread_create.c 2023-11-24 15:41:06.455142302 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_thread_create.c 2023-11-24 15:49:27.412108871 -0500 | |
@@ -58,8 +58,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t child_threadType; | |
- mach_port_t child_thread; | |
- char child_threadPad[4]; | |
+ mach_port_name_inlined_t child_thread; | |
} Reply; | |
union { | |
@@ -90,7 +89,7 @@ | |
const mach_msg_type_t child_threadCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -149,7 +148,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *child_thread = OutP->child_thread; | |
+ *child_thread = OutP->child_thread.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_change_attributes.c 2023-11-24 15:41:06.499141333 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_change_attributes.c 2023-11-24 15:49:27.484107285 -0500 | |
@@ -59,8 +59,7 @@ | |
memory_object_copy_strategy_t copy_strategy; | |
char copy_strategyPad[4]; | |
mach_msg_type_t reply_toType; | |
- mach_port_t reply_to; | |
- char reply_toPad[4]; | |
+ mach_port_name_inlined_t reply_to; | |
} Request; | |
union { | |
@@ -94,14 +93,14 @@ | |
const mach_msg_type_t reply_toType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->may_cacheType = may_cacheType; | |
@@ -113,7 +112,7 @@ | |
InP->reply_toType = reply_toType; | |
- InP->reply_to = reply_to; | |
+ InP->reply_to.name = reply_to; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_copy.c 2023-11-24 15:41:06.363144328 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_memory_object_copy.c 2023-11-24 15:49:27.316110987 -0500 | |
@@ -54,15 +54,13 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t old_memory_controlType; | |
- mach_port_t old_memory_control; | |
- char old_memory_controlPad[4]; | |
+ mach_port_name_inlined_t old_memory_control; | |
mach_msg_type_t offsetType; | |
vm_offset_t offset; | |
mach_msg_type_t lengthType; | |
vm_size_t length; | |
mach_msg_type_t new_memory_objectType; | |
- mach_port_t new_memory_object; | |
- char new_memory_objectPad[4]; | |
+ mach_port_name_inlined_t new_memory_object; | |
} Request; | |
union { | |
@@ -74,14 +72,14 @@ | |
const mach_msg_type_t old_memory_controlType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t offsetType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -107,18 +105,18 @@ | |
const mach_msg_type_t new_memory_objectType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MOVE_RECEIVE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->old_memory_controlType = old_memory_controlType; | |
- InP->old_memory_control = old_memory_control; | |
+ InP->old_memory_control.name = old_memory_control; | |
InP->offsetType = offsetType; | |
@@ -130,7 +128,7 @@ | |
InP->new_memory_objectType = new_memory_objectType; | |
- InP->new_memory_object = new_memory_object; | |
+ InP->new_memory_object.name = new_memory_object; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_device_map.c 2023-11-24 15:41:06.419143095 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_device_map.c 2023-11-24 15:49:27.364109928 -0500 | |
@@ -74,8 +74,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t pagerType; | |
- mach_port_t pager; | |
- char pagerPad[4]; | |
+ mach_port_name_inlined_t pager; | |
} Reply; | |
union { | |
@@ -150,7 +149,7 @@ | |
const mach_msg_type_t pagerCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -225,7 +224,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *pager = OutP->pager; | |
+ *pager = OutP->pager.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_vm_set_default_memory_manager.c 2023-11-24 15:41:06.431142830 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_vm_set_default_memory_manager.c 2023-11-24 15:49:27.388109401 -0500 | |
@@ -51,8 +51,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t default_managerType; | |
- mach_port_t default_manager; | |
- char default_managerPad[4]; | |
+ mach_port_name_inlined_t default_manager; | |
} Request; | |
typedef struct { | |
@@ -61,8 +60,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t default_managerType; | |
- mach_port_t default_manager; | |
- char default_managerPad[4]; | |
+ mach_port_name_inlined_t default_manager; | |
} Reply; | |
union { | |
@@ -83,14 +81,14 @@ | |
const mach_msg_type_t default_managerType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -104,7 +102,7 @@ | |
const mach_msg_type_t default_managerCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -114,7 +112,7 @@ | |
InP->default_managerType = default_managerType; | |
- InP->default_manager = *default_manager; | |
+ InP->default_manager.name = *default_manager; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -167,7 +165,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *default_manager = OutP->default_manager; | |
+ *default_manager = OutP->default_manager.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_device_open.c 2023-11-24 15:41:06.387143799 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_device_open.c 2023-11-24 15:49:27.328110722 -0500 | |
@@ -67,8 +67,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t deviceType; | |
- mach_port_t device; | |
- char devicePad[4]; | |
+ mach_port_name_inlined_t device; | |
} Reply; | |
union { | |
@@ -122,7 +121,7 @@ | |
const mach_msg_type_t deviceCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -189,7 +188,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *device = OutP->device; | |
+ *device = OutP->device.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_processor_set_tasks.c 2023-11-24 15:41:06.511141069 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_processor_set_tasks.c 2023-11-24 15:49:27.412108871 -0500 | |
@@ -138,7 +138,8 @@ | |
if (mig_unlikely ((OutP->task_listType.msgtl_header.msgt_inline != FALSE) || | |
(OutP->task_listType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->task_listType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->task_listType.msgtl_size != 32))) | |
+ (OutP->task_listType.msgtl_size != 64 && OutP->task_listType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->task_listType.msgtl_size != 32 && OutP->task_listType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_register_new_task_notification.c 2023-11-24 15:41:06.367144240 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_register_new_task_notification.c 2023-11-24 15:49:27.316110987 -0500 | |
@@ -53,8 +53,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t notificationType; | |
- mach_port_t notification; | |
- char notificationPad[4]; | |
+ mach_port_name_inlined_t notification; | |
} Request; | |
typedef struct { | |
@@ -77,14 +76,14 @@ | |
const mach_msg_type_t notificationType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -98,7 +97,7 @@ | |
InP->notificationType = notificationType; | |
- InP->notification = notification; | |
+ InP->notification.name = notification; | |
if (MACH_MSG_TYPE_PORT_ANY(notificationPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_thread_get_assignment.c 2023-11-24 15:41:06.419143095 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_thread_get_assignment.c 2023-11-24 15:49:27.368109841 -0500 | |
@@ -58,8 +58,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t assigned_setType; | |
- mach_port_t assigned_set; | |
- char assigned_setPad[4]; | |
+ mach_port_name_inlined_t assigned_set; | |
} Reply; | |
union { | |
@@ -90,7 +89,7 @@ | |
const mach_msg_type_t assigned_setCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -149,7 +148,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *assigned_set = OutP->assigned_set; | |
+ *assigned_set = OutP->assigned_set.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_vm_wire.c 2023-11-24 15:41:06.559140013 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_vm_wire.c 2023-11-24 15:49:27.448108078 -0500 | |
@@ -54,8 +54,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t addressType; | |
vm_address_t address; | |
mach_msg_type_t sizeType; | |
@@ -84,14 +83,14 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t addressType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -138,7 +137,7 @@ | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->addressType = addressType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_processor_set_create.c 2023-11-24 15:41:06.395143623 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_processor_set_create.c 2023-11-24 15:49:27.348110282 -0500 | |
@@ -59,11 +59,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t new_setType; | |
- mach_port_t new_set; | |
- char new_setPad[4]; | |
+ mach_port_name_inlined_t new_set; | |
mach_msg_type_t new_nameType; | |
- mach_port_t new_name; | |
- char new_namePad[4]; | |
+ mach_port_name_inlined_t new_name; | |
} Reply; | |
union { | |
@@ -94,7 +92,7 @@ | |
const mach_msg_type_t new_setCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -104,7 +102,7 @@ | |
const mach_msg_type_t new_nameCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -163,14 +161,14 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *new_set = OutP->new_set; | |
+ *new_set = OutP->new_set.name; | |
#if TypeCheck | |
if (BAD_TYPECHECK (&OutP->new_nameType, &new_nameCheck)) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *new_name = OutP->new_name; | |
+ *new_name = OutP->new_name.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_host_processors.c 2023-11-24 15:41:06.379143976 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_host_processors.c 2023-11-24 15:49:27.332110634 -0500 | |
@@ -138,7 +138,8 @@ | |
if (mig_unlikely ((OutP->processor_listType.msgtl_header.msgt_inline != FALSE) || | |
(OutP->processor_listType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->processor_listType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->processor_listType.msgtl_size != 32))) | |
+ (OutP->processor_listType.msgtl_size != 64 && OutP->processor_listType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->processor_listType.msgtl_size != 32 && OutP->processor_listType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_processor_assign.c 2023-11-24 15:41:06.399143535 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_processor_assign.c 2023-11-24 15:49:27.356110105 -0500 | |
@@ -52,8 +52,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t new_setType; | |
- mach_port_t new_set; | |
- char new_setPad[4]; | |
+ mach_port_name_inlined_t new_set; | |
mach_msg_type_t waitType; | |
boolean_t wait; | |
char waitPad[4]; | |
@@ -78,14 +77,14 @@ | |
const mach_msg_type_t new_setType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t waitType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_BOOLEAN, | |
@@ -110,7 +109,7 @@ | |
InP->new_setType = new_setType; | |
- InP->new_set = new_set; | |
+ InP->new_set.name = new_set; | |
InP->waitType = waitType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_thread_set_special_port.c 2023-11-24 15:41:06.471141949 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_thread_set_special_port.c 2023-11-24 15:49:27.440108255 -0500 | |
@@ -55,8 +55,7 @@ | |
int which_port; | |
char which_portPad[4]; | |
mach_msg_type_t special_portType; | |
- mach_port_t special_port; | |
- char special_portPad[4]; | |
+ mach_port_name_inlined_t special_port; | |
} Request; | |
typedef struct { | |
@@ -89,14 +88,14 @@ | |
const mach_msg_type_t special_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -114,7 +113,7 @@ | |
InP->special_portType = special_portType; | |
- InP->special_port = special_port; | |
+ InP->special_port.name = special_port; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_processor_get_assignment.c 2023-11-24 15:41:06.407143359 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_processor_get_assignment.c 2023-11-24 15:49:27.356110105 -0500 | |
@@ -58,8 +58,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t assigned_setType; | |
- mach_port_t assigned_set; | |
- char assigned_setPad[4]; | |
+ mach_port_name_inlined_t assigned_set; | |
} Reply; | |
union { | |
@@ -90,7 +89,7 @@ | |
const mach_msg_type_t assigned_setCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -149,7 +148,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *assigned_set = OutP->assigned_set; | |
+ *assigned_set = OutP->assigned_set.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_processor_info.c 2023-11-24 15:41:06.575139660 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_processor_info.c 2023-11-24 15:49:27.456107903 -0500 | |
@@ -67,8 +67,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t hostType; | |
- mach_port_t host; | |
- char hostPad[4]; | |
+ mach_port_name_inlined_t host; | |
mach_msg_type_t processor_info_outType; | |
union { | |
integer_t processor_info_out[1024]; | |
@@ -126,7 +125,7 @@ | |
const mach_msg_type_t hostCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -196,7 +195,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *host = OutP->host; | |
+ *host = OutP->host.name; | |
#if TypeCheck | |
if (mig_unlikely ((OutP->processor_info_outType.msgt_inline != TRUE) || | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_vm_region_create_proxy.c 2023-11-24 15:41:06.379143976 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_vm_region_create_proxy.c 2023-11-24 15:49:27.332110634 -0500 | |
@@ -68,8 +68,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t proxyType; | |
- mach_port_t proxy; | |
- char proxyPad[4]; | |
+ mach_port_name_inlined_t proxy; | |
} Reply; | |
union { | |
@@ -133,7 +132,7 @@ | |
const mach_msg_type_t proxyCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -204,7 +203,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *proxy = OutP->proxy; | |
+ *proxy = OutP->proxy.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_vm_region.c 2023-11-24 15:41:06.407143359 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/mach/RPC_vm_region.c 2023-11-24 15:49:27.364109928 -0500 | |
@@ -83,8 +83,7 @@ | |
boolean_t is_shared; | |
char is_sharedPad[4]; | |
mach_msg_type_t object_nameType; | |
- mach_port_t object_name; | |
- char object_namePad[4]; | |
+ mach_port_name_inlined_t object_name; | |
mach_msg_type_t offsetType; | |
vm_offset_t offset; | |
} Reply; | |
@@ -188,7 +187,7 @@ | |
const mach_msg_type_t object_nameCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -303,7 +302,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *object_name = OutP->object_name; | |
+ *object_name = OutP->object_name.name; | |
#if TypeCheck | |
if (BAD_TYPECHECK (&OutP->offsetType, &offsetCheck)) | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_add_auth.c 2023-11-24 15:41:07.191126098 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_add_auth.c 2023-11-24 15:49:28.160092395 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t authType; | |
- auth_t auth; | |
- char authPad[4]; | |
+ mach_port_name_inlined_t auth; | |
} Request; | |
typedef struct { | |
@@ -83,14 +82,14 @@ | |
const mach_msg_type_t authType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(auth_t) == 4 * 1, "expected auth_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -104,7 +103,7 @@ | |
InP->authType = authType; | |
- InP->auth = auth; | |
+ InP->auth.name = auth; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_dostop_request.c 2023-11-24 15:41:07.251124777 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_dostop_request.c 2023-11-24 15:49:28.224090984 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t contthreadType; | |
- mach_port_t contthread; | |
- char contthreadPad[4]; | |
+ mach_port_name_inlined_t contthread; | |
} Request; | |
union { | |
@@ -74,18 +73,18 @@ | |
const mach_msg_type_t contthreadType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->contthreadType = contthreadType; | |
- InP->contthread = contthread; | |
+ InP->contthread.name = contthread; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_sig_post.c 2023-11-24 15:41:07.183126274 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_sig_post.c 2023-11-24 15:49:28.152092570 -0500 | |
@@ -68,8 +68,7 @@ | |
natural_t sigcode; | |
char sigcodePad[4]; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -113,14 +112,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -142,7 +141,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_async.c 2023-11-24 15:41:07.239125042 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_async.c 2023-11-24 15:49:28.224090984 -0500 | |
@@ -63,8 +63,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t notify_portType; | |
- mach_port_t notify_port; | |
- char notify_portPad[4]; | |
+ mach_port_name_inlined_t notify_port; | |
} Request; | |
typedef struct { | |
@@ -73,8 +72,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t async_id_portType; | |
- mach_port_t async_id_port; | |
- char async_id_portPad[4]; | |
+ mach_port_name_inlined_t async_id_port; | |
} Reply; | |
union { | |
@@ -93,14 +91,14 @@ | |
const mach_msg_type_t notify_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -114,7 +112,7 @@ | |
const mach_msg_type_t async_id_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -124,7 +122,7 @@ | |
InP->notify_portType = notify_portType; | |
- InP->notify_port = notify_port; | |
+ InP->notify_port.name = notify_port; | |
if (MACH_MSG_TYPE_PORT_ANY(notify_portPoly)) | |
msgh_simple = FALSE; | |
@@ -184,7 +182,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *async_id_port = OutP->async_id_port; | |
+ *async_id_port = OutP->async_id_port.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_pid2proc.c 2023-11-24 15:41:07.283124073 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_pid2proc.c 2023-11-24 15:49:28.272089927 -0500 | |
@@ -72,8 +72,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t procType; | |
- mach_port_t proc; | |
- char procPad[4]; | |
+ mach_port_name_inlined_t proc; | |
} Reply; | |
union { | |
@@ -115,7 +114,7 @@ | |
const mach_msg_type_t procCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -178,7 +177,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *proc = OutP->proc; | |
+ *proc = OutP->proc.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_exec_init.c 2023-11-24 15:41:07.183126274 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_exec_init.c 2023-11-24 15:49:28.160092395 -0500 | |
@@ -63,11 +63,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t auth_handleType; | |
- auth_t auth_handle; | |
- char auth_handlePad[4]; | |
+ mach_port_name_inlined_t auth_handle; | |
mach_msg_type_t proc_serverType; | |
- mach_port_t proc_server; | |
- char proc_serverPad[4]; | |
+ mach_port_name_inlined_t proc_server; | |
} Request; | |
typedef struct { | |
@@ -89,25 +87,25 @@ | |
const mach_msg_type_t auth_handleType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(auth_t) == 4 * 1, "expected auth_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t proc_serverType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -121,11 +119,11 @@ | |
InP->auth_handleType = auth_handleType; | |
- InP->auth_handle = auth_handle; | |
+ InP->auth_handle.name = auth_handle; | |
InP->proc_serverType = proc_serverType; | |
- InP->proc_server = proc_server; | |
+ InP->proc_server.name = proc_server; | |
InP->proc_serverType.msgt_name = proc_serverPoly; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_setmsgport.c 2023-11-24 15:41:07.199125922 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_setmsgport.c 2023-11-24 15:49:28.176092042 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t newmsgportType; | |
- mach_port_t newmsgport; | |
- char newmsgportPad[4]; | |
+ mach_port_name_inlined_t newmsgport; | |
} Request; | |
typedef struct { | |
@@ -72,8 +71,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t oldmsgportType; | |
- mach_port_t oldmsgport; | |
- char oldmsgportPad[4]; | |
+ mach_port_name_inlined_t oldmsgport; | |
} Reply; | |
union { | |
@@ -94,14 +92,14 @@ | |
const mach_msg_type_t newmsgportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -115,7 +113,7 @@ | |
const mach_msg_type_t oldmsgportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -125,7 +123,7 @@ | |
InP->newmsgportType = newmsgportType; | |
- InP->newmsgport = newmsgport; | |
+ InP->newmsgport.name = newmsgport; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -178,7 +176,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *oldmsgport = OutP->oldmsgport; | |
+ *oldmsgport = OutP->oldmsgport.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_auth_user_authenticate.c 2023-11-24 15:41:07.159126803 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_auth_user_authenticate.c 2023-11-24 15:49:28.128093099 -0500 | |
@@ -63,8 +63,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t rendezvousType; | |
- mach_port_t rendezvous; | |
- char rendezvousPad[4]; | |
+ mach_port_name_inlined_t rendezvous; | |
} Request; | |
typedef struct { | |
@@ -73,8 +72,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t newportType; | |
- mach_port_t newport; | |
- char newportPad[4]; | |
+ mach_port_name_inlined_t newport; | |
} Reply; | |
union { | |
@@ -93,14 +91,14 @@ | |
const mach_msg_type_t rendezvousType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -114,7 +112,7 @@ | |
const mach_msg_type_t newportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -124,7 +122,7 @@ | |
InP->rendezvousType = rendezvousType; | |
- InP->rendezvous = rendezvous; | |
+ InP->rendezvous.name = rendezvous; | |
if (MACH_MSG_TYPE_PORT_ANY(rendezvousPoly)) | |
msgh_simple = FALSE; | |
@@ -184,7 +182,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *newport = OutP->newport; | |
+ *newport = OutP->newport.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_seek_request.c 2023-11-24 15:41:07.247124865 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_seek_request.c 2023-11-24 15:49:28.228090897 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
mach_msg_type_t offsetType; | |
loff_t offset; | |
mach_msg_type_t whenceType; | |
@@ -80,14 +79,14 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t offsetType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -113,7 +112,7 @@ | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->offsetType = offsetType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_getopt.c 2023-11-24 15:41:07.295123809 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_getopt.c 2023-11-24 15:49:28.288089575 -0500 | |
@@ -198,14 +198,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->optvalType.msgtl_header.msgt_inline) | |
- *optval = OutP->optvalP; | |
+ *optval = OutP->optvalP; | |
else if (OutP->optvalType.msgtl_number > *optvalCnt) { | |
- __mig_allocate((vm_offset_t *)optval, | |
- OutP->optvalType.msgtl_number); | |
- memcpy(*optval, OutP->optval, OutP->optvalType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)optval, OutP->optvalType.msgtl_number); | |
+ memcpy(*optval, OutP->optval, OutP->optvalType.msgtl_number); | |
} | |
else if (OutP->optvalType.msgtl_number) { | |
- memcpy(*optval, OutP->optval, OutP->optvalType.msgtl_number); | |
+ memcpy(*optval, OutP->optval, OutP->optvalType.msgtl_number); | |
} | |
*optvalCnt = OutP->optvalType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_get_icky_async_id_request.c 2023-11-24 15:41:07.283124073 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_get_icky_async_id_request.c 2023-11-24 15:49:28.272089927 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
} Request; | |
union { | |
@@ -73,18 +72,18 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_report_wait.c 2023-11-24 15:41:07.263124512 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_report_wait.c 2023-11-24 15:49:28.252090368 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t threadType; | |
- mach_port_t thread; | |
- char threadPad[4]; | |
+ mach_port_name_inlined_t thread; | |
} Request; | |
typedef struct { | |
@@ -93,14 +92,14 @@ | |
const mach_msg_type_t threadType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -134,7 +133,7 @@ | |
InP->threadType = threadType; | |
- InP->thread = thread; | |
+ InP->thread.name = thread; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_auth_makeauth.c 2023-11-24 15:41:07.155126890 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_auth_makeauth.c 2023-11-24 15:49:28.124093188 -0500 | |
@@ -73,7 +73,7 @@ | |
mach_msg_header_t Head; | |
mach_msg_type_long_t other_handlesType; | |
union { | |
- mach_port_t other_handles[512]; | |
+ mach_port_name_inlined_t other_handles[256]; | |
const mach_port_t *other_handlesP; | |
}; | |
mach_msg_type_long_t euidsType; | |
@@ -104,8 +104,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t newhandleType; | |
- mach_port_t newhandle; | |
- char newhandlePad[4]; | |
+ mach_port_name_inlined_t newhandle; | |
} Reply; | |
union { | |
@@ -124,8 +123,8 @@ | |
const mach_msg_type_long_t other_handlesType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -193,7 +192,7 @@ | |
const mach_msg_type_t newhandleCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -203,13 +202,22 @@ | |
InP->other_handlesType = other_handlesType; | |
- if (other_handlesCnt > 512) { | |
+ if (other_handlesCnt > 256) { | |
InP->other_handlesType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->other_handlesType.msgtl_header.msgt_size = 32; | |
InP->other_handlesP = other_handles; | |
msgh_simple = FALSE; | |
} | |
else if (other_handlesCnt) { | |
- memcpy(InP->other_handles, other_handles, 4 * other_handlesCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_other_handles = (mach_port_name_inlined_t *)InP->other_handles; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < other_handlesCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_other_handles[i].kernel_port_do_not_use = 0; | |
+ inlined_other_handles[i].name = (other_handles)[i]; | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(other_handlesPoly)) | |
@@ -219,7 +227,7 @@ | |
InP->other_handlesType.msgtl_number = other_handlesCnt; | |
- msgh_size_delta = (InP->other_handlesType.msgtl_header.msgt_inline) ? (4 * other_handlesCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (InP->other_handlesType.msgtl_header.msgt_inline) ? 8 * other_handlesCnt : sizeof(mach_port_t *); | |
msgh_size = 72 + msgh_size_delta; | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->euidsType = euidsType; | |
@@ -337,7 +345,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *newhandle = OutP->newhandle; | |
+ *newhandle = OutP->newhandle.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_exec_paths.c 2023-11-24 15:41:07.347122663 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_exec_paths.c 2023-11-24 15:49:28.384087460 -0500 | |
@@ -80,8 +80,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t exec_taskType; | |
- mach_port_t exec_task; | |
- char exec_taskPad[4]; | |
+ mach_port_name_inlined_t exec_task; | |
mach_msg_type_t flagsType; | |
int flags; | |
char flagsPad[4]; | |
@@ -101,12 +100,12 @@ | |
}; | |
mach_msg_type_long_t fdarrayType; | |
union { | |
- mach_port_t fdarray[512]; | |
+ mach_port_name_inlined_t fdarray[256]; | |
const mach_port_t *fdarrayP; | |
}; | |
mach_msg_type_long_t portarrayType; | |
union { | |
- mach_port_t portarray[512]; | |
+ mach_port_name_inlined_t portarray[256]; | |
const mach_port_t *portarrayP; | |
}; | |
mach_msg_type_long_t intarrayType; | |
@@ -147,14 +146,14 @@ | |
const mach_msg_type_t exec_taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t flagsType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -216,8 +215,8 @@ | |
const mach_msg_type_long_t fdarrayType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -228,8 +227,8 @@ | |
const mach_msg_type_long_t portarrayType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -285,7 +284,7 @@ | |
InP->exec_taskType = exec_taskType; | |
- InP->exec_task = exec_task; | |
+ InP->exec_task.name = exec_task; | |
InP->flagsType = flagsType; | |
@@ -331,36 +330,54 @@ | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->fdarrayType = fdarrayType; | |
- if (fdarrayCnt > 512) { | |
+ if (fdarrayCnt > 256) { | |
InP->fdarrayType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->fdarrayType.msgtl_header.msgt_size = 32; | |
InP->fdarrayP = fdarray; | |
} | |
else if (fdarrayCnt) { | |
- memcpy(InP->fdarray, fdarray, 4 * fdarrayCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_fdarray = (mach_port_name_inlined_t *)InP->fdarray; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < fdarrayCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_fdarray[i].kernel_port_do_not_use = 0; | |
+ inlined_fdarray[i].name = (fdarray)[i]; | |
+ } | |
} | |
InP->fdarrayType.msgtl_name = fdarrayPoly; | |
InP->fdarrayType.msgtl_number = fdarrayCnt; | |
- msgh_size_delta = (InP->fdarrayType.msgtl_header.msgt_inline) ? (4 * fdarrayCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (InP->fdarrayType.msgtl_header.msgt_inline) ? 8 * fdarrayCnt : sizeof(mach_port_t *); | |
msgh_size += msgh_size_delta; | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->portarrayType = portarrayType; | |
- if (portarrayCnt > 512) { | |
+ if (portarrayCnt > 256) { | |
InP->portarrayType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->portarrayType.msgtl_header.msgt_size = 32; | |
InP->portarrayP = portarray; | |
} | |
else if (portarrayCnt) { | |
- memcpy(InP->portarray, portarray, 4 * portarrayCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_portarray = (mach_port_name_inlined_t *)InP->portarray; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < portarrayCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_portarray[i].kernel_port_do_not_use = 0; | |
+ inlined_portarray[i].name = (portarray)[i]; | |
+ } | |
} | |
InP->portarrayType.msgtl_name = portarrayPoly; | |
InP->portarrayType.msgtl_number = portarrayCnt; | |
- msgh_size_delta = (InP->portarrayType.msgtl_header.msgt_inline) ? (4 * portarrayCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (InP->portarrayType.msgtl_header.msgt_inline) ? 8 * portarrayCnt : sizeof(mach_port_t *); | |
msgh_size += msgh_size_delta; | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->intarrayType = intarrayType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_task2pid_request.c 2023-11-24 15:41:07.287123985 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_task2pid_request.c 2023-11-24 15:49:28.276089840 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
} Request; | |
union { | |
@@ -74,18 +73,18 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_dir_link.c 2023-11-24 15:41:07.303123632 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_dir_link.c 2023-11-24 15:49:28.300089311 -0500 | |
@@ -63,8 +63,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t fileType; | |
- file_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
mach_msg_type_t nameType; | |
string_t name; | |
mach_msg_type_t exclType; | |
@@ -91,14 +90,14 @@ | |
const mach_msg_type_t fileType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(file_t) == 4 * 1, "expected file_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t nameType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_STRING_C, | |
@@ -134,7 +133,7 @@ | |
InP->fileType = fileType; | |
- InP->file = file; | |
+ InP->file.name = file; | |
InP->nameType = nameType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_get_fs_options.c 2023-11-24 15:41:07.335122928 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_get_fs_options.c 2023-11-24 15:49:28.360087988 -0500 | |
@@ -160,14 +160,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->optionsType.msgtl_header.msgt_inline) | |
- *options = OutP->optionsP; | |
+ *options = OutP->optionsP; | |
else if (OutP->optionsType.msgtl_number > *optionsCnt) { | |
- __mig_allocate((vm_offset_t *)options, | |
- OutP->optionsType.msgtl_number); | |
- memcpy(*options, OutP->options, OutP->optionsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)options, OutP->optionsType.msgtl_number); | |
+ memcpy(*options, OutP->options, OutP->optionsType.msgtl_number); | |
} | |
else if (OutP->optionsType.msgtl_number) { | |
- memcpy(*options, OutP->options, OutP->optionsType.msgtl_number); | |
+ memcpy(*options, OutP->options, OutP->optionsType.msgtl_number); | |
} | |
*optionsCnt = OutP->optionsType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_term_getctty.c 2023-11-24 15:41:07.239125042 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_term_getctty.c 2023-11-24 15:49:28.208091337 -0500 | |
@@ -68,8 +68,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t cttyType; | |
- mach_port_t ctty; | |
- char cttyPad[4]; | |
+ mach_port_name_inlined_t ctty; | |
} Reply; | |
union { | |
@@ -100,7 +99,7 @@ | |
const mach_msg_type_t cttyCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -159,7 +158,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *ctty = OutP->ctty; | |
+ *ctty = OutP->ctty.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_proc_newids.c 2023-11-24 15:41:07.187126187 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_proc_newids.c 2023-11-24 15:49:28.156092483 -0500 | |
@@ -63,8 +63,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t ppidType; | |
pid_t ppid; | |
char ppidPad[4]; | |
@@ -95,14 +94,14 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t ppidType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -149,7 +148,7 @@ | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->ppidType = ppidType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_dir_rename.c 2023-11-24 15:41:07.307123544 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_dir_rename.c 2023-11-24 15:49:28.320088870 -0500 | |
@@ -66,8 +66,7 @@ | |
mach_msg_type_t oldnameType; | |
string_t oldname; | |
mach_msg_type_t newdirectoryType; | |
- file_t newdirectory; | |
- char newdirectoryPad[4]; | |
+ mach_port_name_inlined_t newdirectory; | |
mach_msg_type_t newnameType; | |
string_t newname; | |
mach_msg_type_t exclType; | |
@@ -105,14 +104,14 @@ | |
const mach_msg_type_t newdirectoryType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(file_t) == 4 * 1, "expected file_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t newnameType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_STRING_C, | |
@@ -152,7 +151,7 @@ | |
InP->newdirectoryType = newdirectoryType; | |
- InP->newdirectory = newdirectory; | |
+ InP->newdirectory.name = newdirectory; | |
InP->newnameType = newnameType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_read.c 2023-11-24 15:41:07.211125657 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_read.c 2023-11-24 15:49:28.188091777 -0500 | |
@@ -196,14 +196,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->dataType.msgtl_header.msgt_inline) | |
- *data = OutP->dataP; | |
+ *data = OutP->dataP; | |
else if (OutP->dataType.msgtl_number > *dataCnt) { | |
- __mig_allocate((vm_offset_t *)data, | |
- OutP->dataType.msgtl_number); | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
else if (OutP->dataType.msgtl_number) { | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
*dataCnt = OutP->dataType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_handle_exceptions_request.c 2023-11-24 15:41:07.255124689 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_handle_exceptions_request.c 2023-11-24 15:49:28.228090897 -0500 | |
@@ -66,11 +66,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t msgportType; | |
- mach_port_t msgport; | |
- char msgportPad[4]; | |
+ mach_port_name_inlined_t msgport; | |
mach_msg_type_t forwardportType; | |
- mach_port_t forwardport; | |
- char forwardportPad[4]; | |
+ mach_port_name_inlined_t forwardport; | |
mach_msg_type_t flavorType; | |
int flavor; | |
char flavorPad[4]; | |
@@ -91,25 +89,25 @@ | |
const mach_msg_type_t msgportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MOVE_RECEIVE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t forwardportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t flavorType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -134,11 +132,11 @@ | |
InP->msgportType = msgportType; | |
- InP->msgport = msgport; | |
+ InP->msgport.name = msgport; | |
InP->forwardportType = forwardportType; | |
- InP->forwardport = forwardport; | |
+ InP->forwardport.name = forwardport; | |
InP->forwardportType.msgt_name = forwardportPoly; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_bind.c 2023-11-24 15:41:07.255124689 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_bind.c 2023-11-24 15:49:28.236090720 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t addrType; | |
- addr_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Request; | |
typedef struct { | |
@@ -84,14 +83,14 @@ | |
const mach_msg_type_t addrType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(addr_port_t) == 4 * 1, "expected addr_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -105,7 +104,7 @@ | |
InP->addrType = addrType; | |
- InP->addr = addr; | |
+ InP->addr.name = addr; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_startup_request_notification.c 2023-11-24 15:41:07.155126890 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_startup_request_notification.c 2023-11-24 15:49:28.124093188 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t notify_portType; | |
- mach_port_t notify_port; | |
- char notify_portPad[4]; | |
+ mach_port_name_inlined_t notify_port; | |
mach_msg_type_t nameType; | |
string_t name; | |
} Request; | |
@@ -88,14 +87,14 @@ | |
const mach_msg_type_t notify_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t nameType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_STRING_C, | |
@@ -120,7 +119,7 @@ | |
InP->notify_portType = notify_portType; | |
- InP->notify_port = notify_port; | |
+ InP->notify_port.name = notify_port; | |
if (MACH_MSG_TYPE_PORT_ANY(notify_portPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_peername.c 2023-11-24 15:41:07.267124425 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_peername.c 2023-11-24 15:49:28.244090544 -0500 | |
@@ -68,8 +68,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t addrType; | |
- mach_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Reply; | |
union { | |
@@ -100,7 +99,7 @@ | |
const mach_msg_type_t addrCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -159,7 +158,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *addr = OutP->addr; | |
+ *addr = OutP->addr.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getprocargs.c 2023-11-24 15:41:07.295123809 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getprocargs.c 2023-11-24 15:49:28.280089751 -0500 | |
@@ -179,14 +179,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->procargsType.msgtl_header.msgt_inline) | |
- *procargs = OutP->procargsP; | |
+ *procargs = OutP->procargsP; | |
else if (OutP->procargsType.msgtl_number > *procargsCnt) { | |
- __mig_allocate((vm_offset_t *)procargs, | |
- OutP->procargsType.msgtl_number); | |
- memcpy(*procargs, OutP->procargs, OutP->procargsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)procargs, OutP->procargsType.msgtl_number); | |
+ memcpy(*procargs, OutP->procargs, OutP->procargsType.msgtl_number); | |
} | |
else if (OutP->procargsType.msgtl_number) { | |
- memcpy(*procargs, OutP->procargs, OutP->procargsType.msgtl_number); | |
+ memcpy(*procargs, OutP->procargs, OutP->procargsType.msgtl_number); | |
} | |
*procargsCnt = OutP->procargsType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_accept.c 2023-11-24 15:41:07.247124865 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_accept.c 2023-11-24 15:49:28.228090897 -0500 | |
@@ -69,11 +69,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t conn_sockType; | |
- mach_port_t conn_sock; | |
- char conn_sockPad[4]; | |
+ mach_port_name_inlined_t conn_sock; | |
mach_msg_type_t peer_addrType; | |
- mach_port_t peer_addr; | |
- char peer_addrPad[4]; | |
+ mach_port_name_inlined_t peer_addr; | |
} Reply; | |
union { | |
@@ -104,7 +102,7 @@ | |
const mach_msg_type_t conn_sockCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -114,7 +112,7 @@ | |
const mach_msg_type_t peer_addrCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -173,14 +171,14 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *conn_sock = OutP->conn_sock; | |
+ *conn_sock = OutP->conn_sock.name; | |
#if TypeCheck | |
if (BAD_TYPECHECK (&OutP->peer_addrType, &peer_addrCheck)) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *peer_addr = OutP->peer_addr; | |
+ *peer_addr = OutP->peer_addr.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_login_get_input_devices.c 2023-11-24 15:41:07.263124512 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_login_get_input_devices.c 2023-11-24 15:49:28.232090808 -0500 | |
@@ -159,14 +159,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->devicesType.msgtl_header.msgt_inline) | |
- *devices = OutP->devicesP; | |
+ *devices = OutP->devicesP; | |
else if (OutP->devicesType.msgtl_number > *devicesCnt) { | |
- __mig_allocate((vm_offset_t *)devices, | |
- OutP->devicesType.msgtl_number); | |
- memcpy(*devices, OutP->devices, OutP->devicesType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)devices, OutP->devicesType.msgtl_number); | |
+ memcpy(*devices, OutP->devices, OutP->devicesType.msgtl_number); | |
} | |
else if (OutP->devicesType.msgtl_number) { | |
- memcpy(*devices, OutP->devices, OutP->devicesType.msgtl_number); | |
+ memcpy(*devices, OutP->devices, OutP->devicesType.msgtl_number); | |
} | |
*devicesCnt = OutP->devicesType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_map_cntl_reply.c 2023-11-24 15:41:07.319123279 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_map_cntl_reply.c 2023-11-24 15:49:28.296089399 -0500 | |
@@ -66,8 +66,7 @@ | |
kern_return_t return_code; | |
char return_codePad[4]; | |
mach_msg_type_t memobjType; | |
- mach_port_t memobj; | |
- char memobjPad[4]; | |
+ mach_port_name_inlined_t memobj; | |
} Request; | |
union { | |
@@ -91,14 +90,14 @@ | |
const mach_msg_type_t memobjType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
if (MACH_MSG_TYPE_PORT_ANY(replyPoly)) | |
msgh_simple = FALSE; | |
@@ -109,7 +108,7 @@ | |
InP->memobjType = memobjType; | |
- InP->memobj = memobj; | |
+ InP->memobj.name = memobj; | |
if (MACH_MSG_TYPE_PORT_ANY(memobjPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_proc2task.c 2023-11-24 15:41:07.279124160 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_proc2task.c 2023-11-24 15:49:28.264090104 -0500 | |
@@ -68,8 +68,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
} Reply; | |
union { | |
@@ -100,7 +99,7 @@ | |
const mach_msg_type_t taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -159,7 +158,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *task = OutP->task; | |
+ *task = OutP->task.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_setexecdata_request.c 2023-11-24 15:41:07.187126187 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_setexecdata_request.c 2023-11-24 15:49:28.160092395 -0500 | |
@@ -66,7 +66,7 @@ | |
mach_msg_header_t Head; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
const mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t intsType; | |
@@ -89,8 +89,8 @@ | |
const mach_msg_type_long_t portsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -112,13 +112,22 @@ | |
InP->portsType = portsType; | |
- if (portsCnt > 512) { | |
+ if (portsCnt > 256) { | |
InP->portsType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->portsType.msgtl_header.msgt_size = 32; | |
InP->portsP = ports; | |
msgh_simple = FALSE; | |
} | |
else if (portsCnt) { | |
- memcpy(InP->ports, ports, 4 * portsCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)InP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < portsCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_ports[i].kernel_port_do_not_use = 0; | |
+ inlined_ports[i].name = (ports)[i]; | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(portsPoly)) | |
@@ -128,7 +137,7 @@ | |
InP->portsType.msgtl_number = portsCnt; | |
- msgh_size_delta = (InP->portsType.msgtl_header.msgt_inline) ? (4 * portsCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (InP->portsType.msgtl_header.msgt_inline) ? 8 * portsCnt : sizeof(mach_port_t *); | |
msgh_size = 48 + msgh_size_delta; | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->intsType = intsType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_dir_mkfile.c 2023-11-24 15:41:07.311123457 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_dir_mkfile.c 2023-11-24 15:49:28.324088781 -0500 | |
@@ -76,8 +76,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t newnodeType; | |
- mach_port_t newnode; | |
- char newnodePad[4]; | |
+ mach_port_name_inlined_t newnode; | |
} Reply; | |
union { | |
@@ -130,7 +129,7 @@ | |
const mach_msg_type_t newnodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -197,7 +196,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *newnode = OutP->newnode; | |
+ *newnode = OutP->newnode.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_dir_notice_changes.c 2023-11-24 15:41:07.319123279 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_dir_notice_changes.c 2023-11-24 15:49:28.332088606 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -86,14 +85,14 @@ | |
const mach_msg_type_t portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -107,7 +106,7 @@ | |
InP->portType = portType; | |
- InP->port = port; | |
+ InP->port.name = port; | |
if (MACH_MSG_TYPE_PORT_ANY(portPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_pfinet_siocgifconf.c 2023-11-24 15:41:07.247124865 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_pfinet_siocgifconf.c 2023-11-24 15:49:28.224090984 -0500 | |
@@ -178,14 +178,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->bufType.msgtl_header.msgt_inline) | |
- *buf = OutP->bufP; | |
+ *buf = OutP->bufP; | |
else if (OutP->bufType.msgtl_number > *bufCnt) { | |
- __mig_allocate((vm_offset_t *)buf, | |
- OutP->bufType.msgtl_number); | |
- memcpy(*buf, OutP->buf, OutP->bufType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)buf, OutP->bufType.msgtl_number); | |
+ memcpy(*buf, OutP->buf, OutP->bufType.msgtl_number); | |
} | |
else if (OutP->bufType.msgtl_number) { | |
- memcpy(*buf, OutP->buf, OutP->bufType.msgtl_number); | |
+ memcpy(*buf, OutP->buf, OutP->bufType.msgtl_number); | |
} | |
*bufCnt = OutP->bufType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_pathconf_request.c 2023-11-24 15:41:07.347122663 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_pathconf_request.c 2023-11-24 15:49:28.364087901 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
mach_msg_type_t nameType; | |
int name; | |
char namePad[4]; | |
@@ -77,14 +76,14 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t nameType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -99,7 +98,7 @@ | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->nameType = nameType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_setexecdata.c 2023-11-24 15:41:07.171126539 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_setexecdata.c 2023-11-24 15:49:28.148092659 -0500 | |
@@ -66,7 +66,7 @@ | |
mach_msg_header_t Head; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
const mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t intsType; | |
@@ -99,8 +99,8 @@ | |
const mach_msg_type_long_t portsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -132,13 +132,22 @@ | |
InP->portsType = portsType; | |
- if (portsCnt > 512) { | |
+ if (portsCnt > 256) { | |
InP->portsType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->portsType.msgtl_header.msgt_size = 32; | |
InP->portsP = ports; | |
msgh_simple = FALSE; | |
} | |
else if (portsCnt) { | |
- memcpy(InP->ports, ports, 4 * portsCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)InP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < portsCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_ports[i].kernel_port_do_not_use = 0; | |
+ inlined_ports[i].name = (ports)[i]; | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(portsPoly)) | |
@@ -148,7 +157,7 @@ | |
InP->portsType.msgtl_number = portsCnt; | |
- msgh_size_delta = (InP->portsType.msgtl_header.msgt_inline) ? (4 * portsCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (InP->portsType.msgtl_header.msgt_inline) ? 8 * portsCnt : sizeof(mach_port_t *); | |
msgh_size = 48 + msgh_size_delta; | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->intsType = intsType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_password_check_user.c 2023-11-24 15:41:07.247124865 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_password_check_user.c 2023-11-24 15:49:28.220091073 -0500 | |
@@ -74,8 +74,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t authType; | |
- mach_port_t auth; | |
- char authPad[4]; | |
+ mach_port_name_inlined_t auth; | |
} Reply; | |
union { | |
@@ -128,7 +127,7 @@ | |
const mach_msg_type_t authCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -195,7 +194,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *auth = OutP->auth; | |
+ *auth = OutP->auth.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_execdata_notify_request.c 2023-11-24 15:41:07.195126010 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_execdata_notify_request.c 2023-11-24 15:49:28.164092306 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t notifyType; | |
- mach_port_t notify; | |
- char notifyPad[4]; | |
+ mach_port_name_inlined_t notify; | |
} Request; | |
union { | |
@@ -76,18 +75,18 @@ | |
const mach_msg_type_t notifyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->notifyType = notifyType; | |
- InP->notify = notify; | |
+ InP->notify.name = notify; | |
if (MACH_MSG_TYPE_PORT_ANY(notifyPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_readable_request.c 2023-11-24 15:41:07.251124777 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_readable_request.c 2023-11-24 15:49:28.232090808 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
} Request; | |
union { | |
@@ -73,18 +72,18 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_set_init_task_request.c 2023-11-24 15:41:07.423120991 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_set_init_task_request.c 2023-11-24 15:49:28.400087108 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
} Request; | |
union { | |
@@ -74,18 +73,18 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_readsleep_request.c 2023-11-24 15:41:07.339122840 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_readsleep_request.c 2023-11-24 15:49:28.352088165 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
} Request; | |
union { | |
@@ -73,18 +72,18 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_register_version.c 2023-11-24 15:41:07.187126187 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_register_version.c 2023-11-24 15:49:28.164092306 -0500 | |
@@ -64,8 +64,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t credentialType; | |
- mach_port_t credential; | |
- char credentialPad[4]; | |
+ mach_port_name_inlined_t credential; | |
mach_msg_type_t nameType; | |
string_t name; | |
mach_msg_type_t releaseType; | |
@@ -93,14 +92,14 @@ | |
const mach_msg_type_t credentialType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t nameType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_STRING_C, | |
@@ -147,7 +146,7 @@ | |
InP->credentialType = credentialType; | |
- InP->credential = credential; | |
+ InP->credential.name = credential; | |
InP->nameType = nameType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_sig_post_untraced_request.c 2023-11-24 15:41:07.187126187 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_sig_post_untraced_request.c 2023-11-24 15:49:28.160092395 -0500 | |
@@ -70,8 +70,7 @@ | |
natural_t sigcode; | |
char sigcodePad[4]; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
union { | |
@@ -105,14 +104,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->signalType = signalType; | |
@@ -124,7 +123,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, reply_portPoly); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_dir_readdir.c 2023-11-24 15:41:07.287123985 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_dir_readdir.c 2023-11-24 15:49:28.284089663 -0500 | |
@@ -232,14 +232,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->dataType.msgtl_header.msgt_inline) | |
- *data = OutP->dataP; | |
+ *data = OutP->dataP; | |
else if (OutP->dataType.msgtl_number > *dataCnt) { | |
- __mig_allocate((vm_offset_t *)data, | |
- OutP->dataType.msgtl_number); | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
else if (OutP->dataType.msgtl_number) { | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
*dataCnt = OutP->dataType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_revoke_request.c 2023-11-24 15:41:07.359122399 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_revoke_request.c 2023-11-24 15:49:28.376087636 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
} Request; | |
union { | |
@@ -73,18 +72,18 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_read_request.c 2023-11-24 15:41:07.243124954 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_read_request.c 2023-11-24 15:49:28.216091161 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
mach_msg_type_t offsetType; | |
loff_t offset; | |
mach_msg_type_t amountType; | |
@@ -79,14 +78,14 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t offsetType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -112,7 +111,7 @@ | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->offsetType = offsetType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_get_conch_request.c 2023-11-24 15:41:07.311123457 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_get_conch_request.c 2023-11-24 15:49:28.324088781 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
} Request; | |
union { | |
@@ -73,18 +72,18 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_duplicate_request.c 2023-11-24 15:41:07.295123809 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_duplicate_request.c 2023-11-24 15:49:28.296089399 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
} Request; | |
union { | |
@@ -73,18 +72,18 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_get_translator_cntl.c 2023-11-24 15:41:07.331123015 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_get_translator_cntl.c 2023-11-24 15:49:28.352088165 -0500 | |
@@ -68,8 +68,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t translator_cntlType; | |
- mach_port_t translator_cntl; | |
- char translator_cntlPad[4]; | |
+ mach_port_name_inlined_t translator_cntl; | |
} Reply; | |
union { | |
@@ -100,7 +99,7 @@ | |
const mach_msg_type_t translator_cntlCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -159,7 +158,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *translator_cntl = OutP->translator_cntl; | |
+ *translator_cntl = OutP->translator_cntl.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_auth_getids.c 2023-11-24 15:41:07.151126979 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_auth_getids.c 2023-11-24 15:49:28.124093188 -0500 | |
@@ -184,14 +184,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->euidsType.msgtl_header.msgt_inline) | |
- *euids = OutP->euidsP; | |
+ *euids = OutP->euidsP; | |
else if (OutP->euidsType.msgtl_number > *euidsCnt) { | |
- __mig_allocate((vm_offset_t *)euids, | |
- 4 * OutP->euidsType.msgtl_number); | |
- memcpy(*euids, OutP->euids, 4 * OutP->euidsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)euids, 4 * OutP->euidsType.msgtl_number); | |
+ memcpy(*euids, OutP->euids, 4 * OutP->euidsType.msgtl_number); | |
} | |
else if (OutP->euidsType.msgtl_number) { | |
- memcpy(*euids, OutP->euids, 4 * OutP->euidsType.msgtl_number); | |
+ memcpy(*euids, OutP->euids, 4 * OutP->euidsType.msgtl_number); | |
} | |
*euidsCnt = OutP->euidsType.msgtl_number; | |
@@ -213,14 +212,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->auidsType.msgtl_header.msgt_inline) | |
- *auids = OutP->auidsP; | |
+ *auids = OutP->auidsP; | |
else if (OutP->auidsType.msgtl_number > *auidsCnt) { | |
- __mig_allocate((vm_offset_t *)auids, | |
- 4 * OutP->auidsType.msgtl_number); | |
- memcpy(*auids, OutP->auids, 4 * OutP->auidsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)auids, 4 * OutP->auidsType.msgtl_number); | |
+ memcpy(*auids, OutP->auids, 4 * OutP->auidsType.msgtl_number); | |
} | |
else if (OutP->auidsType.msgtl_number) { | |
- memcpy(*auids, OutP->auids, 4 * OutP->auidsType.msgtl_number); | |
+ memcpy(*auids, OutP->auids, 4 * OutP->auidsType.msgtl_number); | |
} | |
*auidsCnt = OutP->auidsType.msgtl_number; | |
@@ -242,14 +240,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->egidsType.msgtl_header.msgt_inline) | |
- *egids = OutP->egidsP; | |
+ *egids = OutP->egidsP; | |
else if (OutP->egidsType.msgtl_number > *egidsCnt) { | |
- __mig_allocate((vm_offset_t *)egids, | |
- 4 * OutP->egidsType.msgtl_number); | |
- memcpy(*egids, OutP->egids, 4 * OutP->egidsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)egids, 4 * OutP->egidsType.msgtl_number); | |
+ memcpy(*egids, OutP->egids, 4 * OutP->egidsType.msgtl_number); | |
} | |
else if (OutP->egidsType.msgtl_number) { | |
- memcpy(*egids, OutP->egids, 4 * OutP->egidsType.msgtl_number); | |
+ memcpy(*egids, OutP->egids, 4 * OutP->egidsType.msgtl_number); | |
} | |
*egidsCnt = OutP->egidsType.msgtl_number; | |
@@ -269,14 +266,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->agidsType.msgtl_header.msgt_inline) | |
- *agids = OutP->agidsP; | |
+ *agids = OutP->agidsP; | |
else if (OutP->agidsType.msgtl_number > *agidsCnt) { | |
- __mig_allocate((vm_offset_t *)agids, | |
- 4 * OutP->agidsType.msgtl_number); | |
- memcpy(*agids, OutP->agids, 4 * OutP->agidsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)agids, 4 * OutP->agidsType.msgtl_number); | |
+ memcpy(*agids, OutP->agids, 4 * OutP->agidsType.msgtl_number); | |
} | |
else if (OutP->agidsType.msgtl_number) { | |
- memcpy(*agids, OutP->agids, 4 * OutP->agidsType.msgtl_number); | |
+ memcpy(*agids, OutP->agids, 4 * OutP->agidsType.msgtl_number); | |
} | |
*agidsCnt = OutP->agidsType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_fsys_forward.c 2023-11-24 15:41:07.231125218 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_fsys_forward.c 2023-11-24 15:49:28.204091425 -0500 | |
@@ -64,8 +64,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t requestorType; | |
- mach_port_t requestor; | |
- char requestorPad[4]; | |
+ mach_port_name_inlined_t requestor; | |
mach_msg_type_long_t argvType; | |
union { | |
char argv[2048]; | |
@@ -94,14 +93,14 @@ | |
const mach_msg_type_t requestorType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t argvType = { | |
.msgtl_header = { | |
@@ -127,7 +126,7 @@ | |
InP->requestorType = requestorType; | |
- InP->requestor = requestor; | |
+ InP->requestor.name = requestor; | |
if (MACH_MSG_TYPE_PORT_ANY(requestorPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_name.c 2023-11-24 15:41:07.259124601 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_name.c 2023-11-24 15:49:28.240090632 -0500 | |
@@ -68,8 +68,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t addrType; | |
- mach_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Reply; | |
union { | |
@@ -100,7 +99,7 @@ | |
const mach_msg_type_t addrCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -159,7 +158,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *addr = OutP->addr; | |
+ *addr = OutP->addr.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_map_reply.c 2023-11-24 15:41:07.315123368 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_map_reply.c 2023-11-24 15:49:28.280089751 -0500 | |
@@ -68,11 +68,9 @@ | |
kern_return_t return_code; | |
char return_codePad[4]; | |
mach_msg_type_t rdobjectType; | |
- mach_port_t rdobject; | |
- char rdobjectPad[4]; | |
+ mach_port_name_inlined_t rdobject; | |
mach_msg_type_t wrobjectType; | |
- mach_port_t wrobject; | |
- char wrobjectPad[4]; | |
+ mach_port_name_inlined_t wrobject; | |
} Request; | |
union { | |
@@ -96,25 +94,25 @@ | |
const mach_msg_type_t rdobjectType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t wrobjectType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
if (MACH_MSG_TYPE_PORT_ANY(replyPoly)) | |
msgh_simple = FALSE; | |
@@ -125,7 +123,7 @@ | |
InP->rdobjectType = rdobjectType; | |
- InP->rdobject = rdobject; | |
+ InP->rdobject.name = rdobject; | |
if (MACH_MSG_TYPE_PORT_ANY(rdobjectPoly)) | |
msgh_simple = FALSE; | |
@@ -134,7 +132,7 @@ | |
InP->wrobjectType = wrobjectType; | |
- InP->wrobject = wrobject; | |
+ InP->wrobject.name = wrobject; | |
if (MACH_MSG_TYPE_PORT_ANY(wrobjectPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_reassign_request.c 2023-11-24 15:41:07.215125570 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_reassign_request.c 2023-11-24 15:49:28.188091777 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t newtaskType; | |
- mach_port_t newtask; | |
- char newtaskPad[4]; | |
+ mach_port_name_inlined_t newtask; | |
} Request; | |
union { | |
@@ -74,18 +73,18 @@ | |
const mach_msg_type_t newtaskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->newtaskType = newtaskType; | |
- InP->newtask = newtask; | |
+ InP->newtask.name = newtask; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_ifsock_getsockaddr.c 2023-11-24 15:41:07.267124425 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_ifsock_getsockaddr.c 2023-11-24 15:49:28.216091161 -0500 | |
@@ -67,8 +67,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t sockaddrType; | |
- mach_port_t sockaddr; | |
- char sockaddrPad[4]; | |
+ mach_port_name_inlined_t sockaddr; | |
} Reply; | |
union { | |
@@ -99,7 +98,7 @@ | |
const mach_msg_type_t sockaddrCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -158,7 +157,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *sockaddr = OutP->sockaddr; | |
+ *sockaddr = OutP->sockaddr.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_register_version_request.c 2023-11-24 15:41:07.203125834 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_register_version_request.c 2023-11-24 15:49:28.172092130 -0500 | |
@@ -64,8 +64,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t credentialType; | |
- mach_port_t credential; | |
- char credentialPad[4]; | |
+ mach_port_name_inlined_t credential; | |
mach_msg_type_t nameType; | |
string_t name; | |
mach_msg_type_t releaseType; | |
@@ -83,14 +82,14 @@ | |
const mach_msg_type_t credentialType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t nameType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_STRING_C, | |
@@ -127,7 +126,7 @@ | |
InP->credentialType = credentialType; | |
- InP->credential = credential; | |
+ InP->credential.name = credential; | |
InP->nameType = nameType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_setmsgport_request.c 2023-11-24 15:41:07.211125657 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_setmsgport_request.c 2023-11-24 15:49:28.184091866 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t newmsgportType; | |
- mach_port_t newmsgport; | |
- char newmsgportPad[4]; | |
+ mach_port_name_inlined_t newmsgport; | |
} Request; | |
union { | |
@@ -74,18 +73,18 @@ | |
const mach_msg_type_t newmsgportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->newmsgportType = newmsgportType; | |
- InP->newmsgport = newmsgport; | |
+ InP->newmsgport.name = newmsgport; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_child.c 2023-11-24 15:41:07.195126010 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_child.c 2023-11-24 15:49:28.172092130 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t childType; | |
- mach_port_t child; | |
- char childPad[4]; | |
+ mach_port_name_inlined_t child; | |
} Request; | |
typedef struct { | |
@@ -84,14 +83,14 @@ | |
const mach_msg_type_t childType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -105,7 +104,7 @@ | |
InP->childType = childType; | |
- InP->child = child; | |
+ InP->child.name = child; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_crash_dump_task.c 2023-11-24 15:41:07.191126098 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_crash_dump_task.c 2023-11-24 15:49:28.156092483 -0500 | |
@@ -69,11 +69,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t fileType; | |
- file_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
mach_msg_type_t signoType; | |
int signo; | |
char signoPad[4]; | |
@@ -92,8 +90,7 @@ | |
mach_msg_type_t subcodeType; | |
long_natural_t subcode; | |
mach_msg_type_t cttyid_portType; | |
- mach_port_t cttyid_port; | |
- char cttyid_portPad[4]; | |
+ mach_port_name_inlined_t cttyid_port; | |
} Request; | |
typedef struct { | |
@@ -115,25 +112,25 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t fileType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(file_t) == 4 * 1, "expected file_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t signoType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -203,14 +200,14 @@ | |
const mach_msg_type_t cttyid_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -224,11 +221,11 @@ | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->fileType = fileType; | |
- InP->file = file; | |
+ InP->file.name = file; | |
InP->signoType = signoType; | |
@@ -256,7 +253,7 @@ | |
InP->cttyid_portType = cttyid_portType; | |
- InP->cttyid_port = cttyid_port; | |
+ InP->cttyid_port.name = cttyid_port; | |
InP->cttyid_portType.msgt_name = cttyid_portPoly; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_task2proc_request.c 2023-11-24 15:41:07.291123896 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_task2proc_request.c 2023-11-24 15:49:28.280089751 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
} Request; | |
union { | |
@@ -74,18 +73,18 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_whatis_address.c 2023-11-24 15:41:07.287123985 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_whatis_address.c 2023-11-24 15:49:28.268090015 -0500 | |
@@ -181,14 +181,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->sockaddrType.msgtl_header.msgt_inline) | |
- *sockaddr = OutP->sockaddrP; | |
+ *sockaddr = OutP->sockaddrP; | |
else if (OutP->sockaddrType.msgtl_number > *sockaddrCnt) { | |
- __mig_allocate((vm_offset_t *)sockaddr, | |
- OutP->sockaddrType.msgtl_number); | |
- memcpy(*sockaddr, OutP->sockaddr, OutP->sockaddrType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)sockaddr, OutP->sockaddrType.msgtl_number); | |
+ memcpy(*sockaddr, OutP->sockaddr, OutP->sockaddrType.msgtl_number); | |
} | |
else if (OutP->sockaddrType.msgtl_number) { | |
- memcpy(*sockaddr, OutP->sockaddr, OutP->sockaddrType.msgtl_number); | |
+ memcpy(*sockaddr, OutP->sockaddr, OutP->sockaddrType.msgtl_number); | |
} | |
*sockaddrCnt = OutP->sockaddrType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_pci_get_dev_regions.c 2023-11-24 15:41:07.271124337 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_pci_get_dev_regions.c 2023-11-24 15:49:28.236090720 -0500 | |
@@ -160,14 +160,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->dataType.msgtl_header.msgt_inline) | |
- *data = OutP->dataP; | |
+ *data = OutP->dataP; | |
else if (OutP->dataType.msgtl_number > *dataCnt) { | |
- __mig_allocate((vm_offset_t *)data, | |
- OutP->dataType.msgtl_number); | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
else if (OutP->dataType.msgtl_number) { | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
*dataCnt = OutP->dataType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_eofnotify_request.c 2023-11-24 15:41:07.319123279 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_eofnotify_request.c 2023-11-24 15:49:28.332088606 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
} Request; | |
union { | |
@@ -73,18 +72,18 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_record_lock.c 2023-11-24 15:41:07.355122488 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_record_lock.c 2023-11-24 15:49:28.400087108 -0500 | |
@@ -69,8 +69,7 @@ | |
mach_msg_type_t flock64Type; | |
flock_t flock64; | |
mach_msg_type_t rendezvousType; | |
- mach_port_t rendezvous; | |
- char rendezvousPad[4]; | |
+ mach_port_name_inlined_t rendezvous; | |
} Request; | |
typedef struct { | |
@@ -120,14 +119,14 @@ | |
const mach_msg_type_t rendezvousType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -159,7 +158,7 @@ | |
InP->rendezvousType = rendezvousType; | |
- InP->rendezvous = rendezvous; | |
+ InP->rendezvous.name = rendezvous; | |
if (MACH_MSG_TYPE_PORT_ANY(rendezvousPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_stat_request.c 2023-11-24 15:41:07.291123896 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_stat_request.c 2023-11-24 15:49:28.280089751 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
} Request; | |
union { | |
@@ -73,18 +72,18 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_get_init_ports.c 2023-11-24 15:41:07.203125834 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_get_init_ports.c 2023-11-24 15:49:28.180091954 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -73,7 +72,7 @@ | |
char RetCodePad[4]; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
} Reply; | |
@@ -96,14 +95,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -117,7 +116,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -168,24 +167,34 @@ | |
#if TypeCheck | |
if (mig_unlikely ((OutP->portsType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->portsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->portsType.msgtl_size != 32))) | |
+ (OutP->portsType.msgtl_size != 64 && OutP->portsType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->portsType.msgtl_size != 32 && OutP->portsType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
#if TypeCheck | |
- if (mig_unlikely (msgh_size != 56 + ((OutP->portsType.msgtl_header.msgt_inline) ? (4 * OutP->portsType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *)))) | |
+ if (mig_unlikely (msgh_size != 56 + ((OutP->portsType.msgtl_header.msgt_inline) ? 8 * OutP->portsType.msgtl_number : sizeof(mach_port_t *)))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
if (!OutP->portsType.msgtl_header.msgt_inline) | |
- *ports = OutP->portsP; | |
+ *ports = OutP->portsP; | |
else if (OutP->portsType.msgtl_number > *portsCnt) { | |
- __mig_allocate((vm_offset_t *)ports, | |
- 4 * OutP->portsType.msgtl_number); | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
else if (OutP->portsType.msgtl_number) { | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
*portsCnt = OutP->portsType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_password_check_group.c 2023-11-24 15:41:07.251124777 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_password_check_group.c 2023-11-24 15:49:28.224090984 -0500 | |
@@ -74,8 +74,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t authType; | |
- mach_port_t auth; | |
- char authPad[4]; | |
+ mach_port_name_inlined_t auth; | |
} Reply; | |
union { | |
@@ -128,7 +127,7 @@ | |
const mach_msg_type_t authCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -195,7 +194,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *auth = OutP->auth; | |
+ *auth = OutP->auth.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_async_request.c 2023-11-24 15:41:07.271124337 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_async_request.c 2023-11-24 15:49:28.256090279 -0500 | |
@@ -62,11 +62,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
mach_msg_type_t notify_portType; | |
- mach_port_t notify_port; | |
- char notify_portPad[4]; | |
+ mach_port_name_inlined_t notify_port; | |
} Request; | |
union { | |
@@ -78,33 +76,33 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t notify_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->notify_portType = notify_portType; | |
- InP->notify_port = notify_port; | |
+ InP->notify_port.name = notify_port; | |
InP->notify_portType.msgt_name = notify_portPoly; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getexecdata.c 2023-11-24 15:41:07.175126451 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getexecdata.c 2023-11-24 15:49:28.152092570 -0500 | |
@@ -72,7 +72,7 @@ | |
char RetCodePad[4]; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t intsType; | |
@@ -158,11 +158,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((OutP->portsType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->portsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->portsType.msgtl_size != 32))) | |
+ (OutP->portsType.msgtl_size != 64 && OutP->portsType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->portsType.msgtl_size != 32 && OutP->portsType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? (4 * OutP->portsType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? 8 * OutP->portsType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 64 + msgh_size_delta)) | |
return MIG_TYPE_ERROR; | |
@@ -170,14 +171,23 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->portsType.msgtl_header.msgt_inline) | |
- *ports = OutP->portsP; | |
+ *ports = OutP->portsP; | |
else if (OutP->portsType.msgtl_number > *portsCnt) { | |
- __mig_allocate((vm_offset_t *)ports, | |
- 4 * OutP->portsType.msgtl_number); | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
else if (OutP->portsType.msgtl_number) { | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
*portsCnt = OutP->portsType.msgtl_number; | |
@@ -197,14 +207,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->intsType.msgtl_header.msgt_inline) | |
- *ints = OutP->intsP; | |
+ *ints = OutP->intsP; | |
else if (OutP->intsType.msgtl_number > *intsCnt) { | |
- __mig_allocate((vm_offset_t *)ints, | |
- 4 * OutP->intsType.msgtl_number); | |
- memcpy(*ints, OutP->ints, 4 * OutP->intsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)ints, 4 * OutP->intsType.msgtl_number); | |
+ memcpy(*ints, OutP->ints, 4 * OutP->intsType.msgtl_number); | |
} | |
else if (OutP->intsType.msgtl_number) { | |
- memcpy(*ints, OutP->ints, 4 * OutP->intsType.msgtl_number); | |
+ memcpy(*ints, OutP->ints, 4 * OutP->intsType.msgtl_number); | |
} | |
*intsCnt = OutP->intsType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_sig_post_untraced.c 2023-11-24 15:41:07.259124601 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_sig_post_untraced.c 2023-11-24 15:49:28.248090456 -0500 | |
@@ -68,8 +68,7 @@ | |
natural_t sigcode; | |
char sigcodePad[4]; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -113,14 +112,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -142,7 +141,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_restrict_auth_reply.c 2023-11-24 15:41:07.299123721 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_restrict_auth_reply.c 2023-11-24 15:49:28.264090104 -0500 | |
@@ -66,8 +66,7 @@ | |
kern_return_t return_code; | |
char return_codePad[4]; | |
mach_msg_type_t new_objectType; | |
- mach_port_t new_object; | |
- char new_objectPad[4]; | |
+ mach_port_name_inlined_t new_object; | |
} Request; | |
union { | |
@@ -91,14 +90,14 @@ | |
const mach_msg_type_t new_objectType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
if (MACH_MSG_TYPE_PORT_ANY(replyPoly)) | |
msgh_simple = FALSE; | |
@@ -109,7 +108,7 @@ | |
InP->new_objectType = new_objectType; | |
- InP->new_object = new_object; | |
+ InP->new_object.name = new_object; | |
if (MACH_MSG_TYPE_PORT_ANY(new_objectPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_pci_get_dev_rom.c 2023-11-24 15:41:07.275124249 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_pci_get_dev_rom.c 2023-11-24 15:49:28.240090632 -0500 | |
@@ -160,14 +160,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->dataType.msgtl_header.msgt_inline) | |
- *data = OutP->dataP; | |
+ *data = OutP->dataP; | |
else if (OutP->dataType.msgtl_number > *dataCnt) { | |
- __mig_allocate((vm_offset_t *)data, | |
- OutP->dataType.msgtl_number); | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
else if (OutP->dataType.msgtl_number) { | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
*dataCnt = OutP->dataType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_get_dtable.c 2023-11-24 15:41:07.227125306 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_get_dtable.c 2023-11-24 15:49:28.208091337 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -73,7 +72,7 @@ | |
char RetCodePad[4]; | |
mach_msg_type_long_t dtableType; | |
union { | |
- mach_port_t dtable[512]; | |
+ mach_port_name_inlined_t dtable[256]; | |
mach_port_t *dtableP; | |
}; | |
} Reply; | |
@@ -96,14 +95,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -117,7 +116,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -168,24 +167,34 @@ | |
#if TypeCheck | |
if (mig_unlikely ((OutP->dtableType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->dtableType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->dtableType.msgtl_size != 32))) | |
+ (OutP->dtableType.msgtl_size != 64 && OutP->dtableType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->dtableType.msgtl_size != 32 && OutP->dtableType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
#if TypeCheck | |
- if (mig_unlikely (msgh_size != 56 + ((OutP->dtableType.msgtl_header.msgt_inline) ? (4 * OutP->dtableType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *)))) | |
+ if (mig_unlikely (msgh_size != 56 + ((OutP->dtableType.msgtl_header.msgt_inline) ? 8 * OutP->dtableType.msgtl_number : sizeof(mach_port_t *)))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
if (!OutP->dtableType.msgtl_header.msgt_inline) | |
- *dtable = OutP->dtableP; | |
+ *dtable = OutP->dtableP; | |
else if (OutP->dtableType.msgtl_number > *dtableCnt) { | |
- __mig_allocate((vm_offset_t *)dtable, | |
- 4 * OutP->dtableType.msgtl_number); | |
- memcpy(*dtable, OutP->dtable, 4 * OutP->dtableType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)dtable, 4 * OutP->dtableType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_dtable = (mach_port_name_inlined_t *)OutP->dtable; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->dtableType.msgtl_number; i++) { | |
+ (*dtable)[i] = inlined_dtable[i].name; | |
+ } | |
} | |
else if (OutP->dtableType.msgtl_number) { | |
- memcpy(*dtable, OutP->dtable, 4 * OutP->dtableType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_dtable = (mach_port_name_inlined_t *)OutP->dtable; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->dtableType.msgtl_number; i++) { | |
+ (*dtable)[i] = inlined_dtable[i].name; | |
+ } | |
} | |
*dtableCnt = OutP->dtableType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_identity_reply.c 2023-11-24 15:41:07.367122224 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_identity_reply.c 2023-11-24 15:49:28.360087988 -0500 | |
@@ -69,11 +69,9 @@ | |
kern_return_t return_code; | |
char return_codePad[4]; | |
mach_msg_type_t idportType; | |
- mach_port_t idport; | |
- char idportPad[4]; | |
+ mach_port_name_inlined_t idport; | |
mach_msg_type_t fsidportType; | |
- mach_port_t fsidport; | |
- char fsidportPad[4]; | |
+ mach_port_name_inlined_t fsidport; | |
mach_msg_type_t filenoType; | |
ino64_t fileno; | |
} Request; | |
@@ -99,25 +97,25 @@ | |
const mach_msg_type_t idportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t fsidportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t filenoType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -139,7 +137,7 @@ | |
InP->idportType = idportType; | |
- InP->idport = idport; | |
+ InP->idport.name = idport; | |
if (MACH_MSG_TYPE_PORT_ANY(idportPoly)) | |
msgh_simple = FALSE; | |
@@ -148,7 +146,7 @@ | |
InP->fsidportType = fsidportType; | |
- InP->fsidport = fsidport; | |
+ InP->fsidport.name = fsidport; | |
if (MACH_MSG_TYPE_PORT_ANY(fsidportPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_pfinet_getroutes.c 2023-11-24 15:41:07.251124777 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_pfinet_getroutes.c 2023-11-24 15:49:28.228090897 -0500 | |
@@ -178,14 +178,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->routesType.msgtl_header.msgt_inline) | |
- *routes = OutP->routesP; | |
+ *routes = OutP->routesP; | |
else if (OutP->routesType.msgtl_number > *routesCnt) { | |
- __mig_allocate((vm_offset_t *)routes, | |
- OutP->routesType.msgtl_number); | |
- memcpy(*routes, OutP->routes, OutP->routesType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)routes, OutP->routesType.msgtl_number); | |
+ memcpy(*routes, OutP->routes, OutP->routesType.msgtl_number); | |
} | |
else if (OutP->routesType.msgtl_number) { | |
- memcpy(*routes, OutP->routes, OutP->routesType.msgtl_number); | |
+ memcpy(*routes, OutP->routes, OutP->routesType.msgtl_number); | |
} | |
*routesCnt = OutP->routesType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_startup_essential_task.c 2023-11-24 15:41:07.151126979 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_startup_essential_task.c 2023-11-24 15:49:28.124093188 -0500 | |
@@ -63,16 +63,13 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t excptType; | |
- mach_port_t excpt; | |
- char excptPad[4]; | |
+ mach_port_name_inlined_t excpt; | |
mach_msg_type_t nameType; | |
string_t name; | |
mach_msg_type_t credentialType; | |
- mach_port_t credential; | |
- char credentialPad[4]; | |
+ mach_port_name_inlined_t credential; | |
} Request; | |
typedef struct { | |
@@ -94,25 +91,25 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t excptType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MOVE_RECEIVE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t nameType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_STRING_C, | |
@@ -127,14 +124,14 @@ | |
const mach_msg_type_t credentialType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -148,11 +145,11 @@ | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->excptType = excptType; | |
- InP->excpt = excpt; | |
+ InP->excpt.name = excpt; | |
InP->nameType = nameType; | |
@@ -160,7 +157,7 @@ | |
InP->credentialType = credentialType; | |
- InP->credential = credential; | |
+ InP->credential.name = credential; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_child_request.c 2023-11-24 15:41:07.207125746 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_child_request.c 2023-11-24 15:49:28.180091954 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t childType; | |
- mach_port_t child; | |
- char childPad[4]; | |
+ mach_port_name_inlined_t child; | |
} Request; | |
union { | |
@@ -74,18 +73,18 @@ | |
const mach_msg_type_t childType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->childType = childType; | |
- InP->child = child; | |
+ InP->child.name = child; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_del_auth.c 2023-11-24 15:41:07.195126010 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_del_auth.c 2023-11-24 15:49:28.164092306 -0500 | |
@@ -64,8 +64,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_long_t uidsType; | |
union { | |
int uids[512]; | |
@@ -99,14 +98,14 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t uidsType = { | |
.msgtl_header = { | |
@@ -144,7 +143,7 @@ | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->uidsType = uidsType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_set_dtable.c 2023-11-24 15:41:07.231125218 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_set_dtable.c 2023-11-24 15:49:28.216091161 -0500 | |
@@ -63,11 +63,10 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t dtableType; | |
union { | |
- mach_port_t dtable[512]; | |
+ mach_port_name_inlined_t dtable[256]; | |
const mach_port_t *dtableP; | |
}; | |
} Request; | |
@@ -92,20 +91,20 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t dtableType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -125,23 +124,32 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->dtableType = dtableType; | |
- if (dtableCnt > 512) { | |
+ if (dtableCnt > 256) { | |
InP->dtableType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->dtableType.msgtl_header.msgt_size = 32; | |
InP->dtableP = dtable; | |
} | |
else if (dtableCnt) { | |
- memcpy(InP->dtable, dtable, 4 * dtableCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_dtable = (mach_port_name_inlined_t *)InP->dtable; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < dtableCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_dtable[i].kernel_port_do_not_use = 0; | |
+ inlined_dtable[i].name = (dtable)[i]; | |
+ } | |
} | |
InP->dtableType.msgtl_name = dtablePoly; | |
InP->dtableType.msgtl_number = dtableCnt; | |
- msgh_size = 56 + ((InP->dtableType.msgtl_header.msgt_inline) ? (4 * dtableCnt + 7) & ~7 : sizeof(mach_port_t *)); | |
+ msgh_size = 56 + ((InP->dtableType.msgtl_header.msgt_inline) ? 8 * dtableCnt : sizeof(mach_port_t *)); | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
/* msgh_size filled below */ | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_dostop.c 2023-11-24 15:41:07.227125306 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_dostop.c 2023-11-24 15:49:28.208091337 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t contthreadType; | |
- mach_port_t contthread; | |
- char contthreadPad[4]; | |
+ mach_port_name_inlined_t contthread; | |
} Request; | |
typedef struct { | |
@@ -84,14 +83,14 @@ | |
const mach_msg_type_t contthreadType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -105,7 +104,7 @@ | |
InP->contthreadType = contthreadType; | |
- InP->contthread = contthread; | |
+ InP->contthread.name = contthread; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_set_all_openmodes_request.c 2023-11-24 15:41:07.255124689 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_set_all_openmodes_request.c 2023-11-24 15:49:28.236090720 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
mach_msg_type_t newbitsType; | |
int newbits; | |
char newbitsPad[4]; | |
@@ -77,14 +76,14 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t newbitsType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -99,7 +98,7 @@ | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->newbitsType = newbitsType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_term_on_hurddev.c 2023-11-24 15:41:07.263124512 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_term_on_hurddev.c 2023-11-24 15:49:28.252090368 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t hurddevType; | |
- io_t hurddev; | |
- char hurddevPad[4]; | |
+ mach_port_name_inlined_t hurddev; | |
} Request; | |
typedef struct { | |
@@ -84,14 +83,14 @@ | |
const mach_msg_type_t hurddevType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(io_t) == 4 * 1, "expected io_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -105,7 +104,7 @@ | |
InP->hurddevType = hurddevType; | |
- InP->hurddev = hurddev; | |
+ InP->hurddev.name = hurddev; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_set_fd.c 2023-11-24 15:41:07.235125129 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_set_fd.c 2023-11-24 15:49:28.224090984 -0500 | |
@@ -63,14 +63,12 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t fdType; | |
int fd; | |
char fdPad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -92,14 +90,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t fdType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -114,14 +112,14 @@ | |
const mach_msg_type_t portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -135,7 +133,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->fdType = fdType; | |
@@ -143,7 +141,7 @@ | |
InP->portType = portType; | |
- InP->port = port; | |
+ InP->port.name = port; | |
InP->portType.msgt_name = portPoly; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getpgrppids.c 2023-11-24 15:41:07.371122135 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getpgrppids.c 2023-11-24 15:49:28.368087813 -0500 | |
@@ -179,14 +179,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->pidsetType.msgtl_header.msgt_inline) | |
- *pidset = OutP->pidsetP; | |
+ *pidset = OutP->pidsetP; | |
else if (OutP->pidsetType.msgtl_number > *pidsetCnt) { | |
- __mig_allocate((vm_offset_t *)pidset, | |
- 4 * OutP->pidsetType.msgtl_number); | |
- memcpy(*pidset, OutP->pidset, 4 * OutP->pidsetType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)pidset, 4 * OutP->pidsetType.msgtl_number); | |
+ memcpy(*pidset, OutP->pidset, 4 * OutP->pidsetType.msgtl_number); | |
} | |
else if (OutP->pidsetType.msgtl_number) { | |
- memcpy(*pidset, OutP->pidset, 4 * OutP->pidsetType.msgtl_number); | |
+ memcpy(*pidset, OutP->pidset, 4 * OutP->pidsetType.msgtl_number); | |
} | |
*pidsetCnt = OutP->pidsetType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_reauthenticate.c 2023-11-24 15:41:07.191126098 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_reauthenticate.c 2023-11-24 15:49:28.168092218 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t rendezvousType; | |
- mach_port_t rendezvous; | |
- char rendezvousPad[4]; | |
+ mach_port_name_inlined_t rendezvous; | |
} Request; | |
union { | |
@@ -76,18 +75,18 @@ | |
const mach_msg_type_t rendezvousType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->rendezvousType = rendezvousType; | |
- InP->rendezvous = rendezvous; | |
+ InP->rendezvous.name = rendezvous; | |
if (MACH_MSG_TYPE_PORT_ANY(rendezvousPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_make_task_namespace_request.c 2023-11-24 15:41:07.467120022 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_make_task_namespace_request.c 2023-11-24 15:49:28.436086315 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t notifyType; | |
- mach_port_t notify; | |
- char notifyPad[4]; | |
+ mach_port_name_inlined_t notify; | |
} Request; | |
union { | |
@@ -76,18 +75,18 @@ | |
const mach_msg_type_t notifyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->notifyType = notifyType; | |
- InP->notify = notify; | |
+ InP->notify.name = notify; | |
if (MACH_MSG_TYPE_PORT_ANY(notifyPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_dir_lookup.c 2023-11-24 15:41:07.283124073 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_dir_lookup.c 2023-11-24 15:49:28.280089751 -0500 | |
@@ -86,8 +86,7 @@ | |
mach_msg_type_t retry_nameType; | |
string_t retry_name; | |
mach_msg_type_t resultType; | |
- mach_port_t result; | |
- char resultPad[4]; | |
+ mach_port_name_inlined_t result; | |
} Reply; | |
union { | |
@@ -171,7 +170,7 @@ | |
const mach_msg_type_t resultCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -256,7 +255,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *result = OutP->result; | |
+ *result = OutP->result.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_reauthenticate_request.c 2023-11-24 15:41:07.203125834 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_reauthenticate_request.c 2023-11-24 15:49:28.176092042 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t rendezvousType; | |
- mach_port_t rendezvous; | |
- char rendezvousPad[4]; | |
+ mach_port_name_inlined_t rendezvous; | |
} Request; | |
union { | |
@@ -76,18 +75,18 @@ | |
const mach_msg_type_t rendezvousType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->rendezvousType = rendezvousType; | |
- InP->rendezvous = rendezvous; | |
+ InP->rendezvous.name = rendezvous; | |
if (MACH_MSG_TYPE_PORT_ANY(rendezvousPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_make_task_namespace.c 2023-11-24 15:41:07.419121079 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_make_task_namespace.c 2023-11-24 15:49:28.436086315 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t notifyType; | |
- mach_port_t notify; | |
- char notifyPad[4]; | |
+ mach_port_name_inlined_t notify; | |
} Request; | |
typedef struct { | |
@@ -86,14 +85,14 @@ | |
const mach_msg_type_t notifyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -107,7 +106,7 @@ | |
InP->notifyType = notifyType; | |
- InP->notify = notify; | |
+ InP->notify.name = notify; | |
if (MACH_MSG_TYPE_PORT_ANY(notifyPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_map_cntl_request.c 2023-11-24 15:41:07.307123544 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_map_cntl_request.c 2023-11-24 15:49:28.320088870 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
} Request; | |
union { | |
@@ -73,18 +72,18 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_reassign.c 2023-11-24 15:41:07.203125834 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_reassign.c 2023-11-24 15:49:28.176092042 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t newtaskType; | |
- mach_port_t newtask; | |
- char newtaskPad[4]; | |
+ mach_port_name_inlined_t newtask; | |
} Request; | |
typedef struct { | |
@@ -84,14 +83,14 @@ | |
const mach_msg_type_t newtaskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -105,7 +104,7 @@ | |
InP->newtaskType = newtaskType; | |
- InP->newtask = newtask; | |
+ InP->newtask.name = newtask; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_auth_server_authenticate.c 2023-11-24 15:41:07.159126803 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_auth_server_authenticate.c 2023-11-24 15:49:28.132093011 -0500 | |
@@ -72,11 +72,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t rendezvousType; | |
- mach_port_t rendezvous; | |
- char rendezvousPad[4]; | |
+ mach_port_name_inlined_t rendezvous; | |
mach_msg_type_t newportType; | |
- mach_port_t newport; | |
- char newportPad[4]; | |
+ mach_port_name_inlined_t newport; | |
} Request; | |
typedef struct { | |
@@ -123,25 +121,25 @@ | |
const mach_msg_type_t rendezvousType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t newportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -155,7 +153,7 @@ | |
InP->rendezvousType = rendezvousType; | |
- InP->rendezvous = rendezvous; | |
+ InP->rendezvous.name = rendezvous; | |
if (MACH_MSG_TYPE_PORT_ANY(rendezvousPoly)) | |
msgh_simple = FALSE; | |
@@ -164,7 +162,7 @@ | |
InP->newportType = newportType; | |
- InP->newport = newport; | |
+ InP->newport.name = newport; | |
if (MACH_MSG_TYPE_PORT_ANY(newportPoly)) | |
msgh_simple = FALSE; | |
@@ -234,14 +232,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->euidsType.msgtl_header.msgt_inline) | |
- *euids = OutP->euidsP; | |
+ *euids = OutP->euidsP; | |
else if (OutP->euidsType.msgtl_number > *euidsCnt) { | |
- __mig_allocate((vm_offset_t *)euids, | |
- 4 * OutP->euidsType.msgtl_number); | |
- memcpy(*euids, OutP->euids, 4 * OutP->euidsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)euids, 4 * OutP->euidsType.msgtl_number); | |
+ memcpy(*euids, OutP->euids, 4 * OutP->euidsType.msgtl_number); | |
} | |
else if (OutP->euidsType.msgtl_number) { | |
- memcpy(*euids, OutP->euids, 4 * OutP->euidsType.msgtl_number); | |
+ memcpy(*euids, OutP->euids, 4 * OutP->euidsType.msgtl_number); | |
} | |
*euidsCnt = OutP->euidsType.msgtl_number; | |
@@ -263,14 +260,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->auidsType.msgtl_header.msgt_inline) | |
- *auids = OutP->auidsP; | |
+ *auids = OutP->auidsP; | |
else if (OutP->auidsType.msgtl_number > *auidsCnt) { | |
- __mig_allocate((vm_offset_t *)auids, | |
- 4 * OutP->auidsType.msgtl_number); | |
- memcpy(*auids, OutP->auids, 4 * OutP->auidsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)auids, 4 * OutP->auidsType.msgtl_number); | |
+ memcpy(*auids, OutP->auids, 4 * OutP->auidsType.msgtl_number); | |
} | |
else if (OutP->auidsType.msgtl_number) { | |
- memcpy(*auids, OutP->auids, 4 * OutP->auidsType.msgtl_number); | |
+ memcpy(*auids, OutP->auids, 4 * OutP->auidsType.msgtl_number); | |
} | |
*auidsCnt = OutP->auidsType.msgtl_number; | |
@@ -292,14 +288,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->egidsType.msgtl_header.msgt_inline) | |
- *egids = OutP->egidsP; | |
+ *egids = OutP->egidsP; | |
else if (OutP->egidsType.msgtl_number > *egidsCnt) { | |
- __mig_allocate((vm_offset_t *)egids, | |
- 4 * OutP->egidsType.msgtl_number); | |
- memcpy(*egids, OutP->egids, 4 * OutP->egidsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)egids, 4 * OutP->egidsType.msgtl_number); | |
+ memcpy(*egids, OutP->egids, 4 * OutP->egidsType.msgtl_number); | |
} | |
else if (OutP->egidsType.msgtl_number) { | |
- memcpy(*egids, OutP->egids, 4 * OutP->egidsType.msgtl_number); | |
+ memcpy(*egids, OutP->egids, 4 * OutP->egidsType.msgtl_number); | |
} | |
*egidsCnt = OutP->egidsType.msgtl_number; | |
@@ -319,14 +314,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->agidsType.msgtl_header.msgt_inline) | |
- *agids = OutP->agidsP; | |
+ *agids = OutP->agidsP; | |
else if (OutP->agidsType.msgtl_number > *agidsCnt) { | |
- __mig_allocate((vm_offset_t *)agids, | |
- 4 * OutP->agidsType.msgtl_number); | |
- memcpy(*agids, OutP->agids, 4 * OutP->agidsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)agids, 4 * OutP->agidsType.msgtl_number); | |
+ memcpy(*agids, OutP->agids, 4 * OutP->agidsType.msgtl_number); | |
} | |
else if (OutP->agidsType.msgtl_number) { | |
- memcpy(*agids, OutP->agids, 4 * OutP->agidsType.msgtl_number); | |
+ memcpy(*agids, OutP->agids, 4 * OutP->agidsType.msgtl_number); | |
} | |
*agidsCnt = OutP->agidsType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_reauthenticate.c 2023-11-24 15:41:07.271124337 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_reauthenticate.c 2023-11-24 15:49:28.260090192 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t rendezvous2Type; | |
- mach_port_t rendezvous2; | |
- char rendezvous2Pad[4]; | |
+ mach_port_name_inlined_t rendezvous2; | |
} Request; | |
union { | |
@@ -76,18 +75,18 @@ | |
const mach_msg_type_t rendezvous2Type = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->rendezvous2Type = rendezvous2Type; | |
- InP->rendezvous2 = rendezvous2; | |
+ InP->rendezvous2.name = rendezvous2; | |
if (MACH_MSG_TYPE_PORT_ANY(rendezvous2Poly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_connect2.c 2023-11-24 15:41:07.271124337 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_connect2.c 2023-11-24 15:49:28.248090456 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t sock2Type; | |
- socket_t sock2; | |
- char sock2Pad[4]; | |
+ mach_port_name_inlined_t sock2; | |
} Request; | |
typedef struct { | |
@@ -84,14 +83,14 @@ | |
const mach_msg_type_t sock2Type = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(socket_t) == 4 * 1, "expected socket_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -105,7 +104,7 @@ | |
InP->sock2Type = sock2Type; | |
- InP->sock2 = sock2; | |
+ InP->sock2.name = sock2; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getprocenv.c 2023-11-24 15:41:07.299123721 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getprocenv.c 2023-11-24 15:49:28.284089663 -0500 | |
@@ -179,14 +179,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->procenvType.msgtl_header.msgt_inline) | |
- *procenv = OutP->procenvP; | |
+ *procenv = OutP->procenvP; | |
else if (OutP->procenvType.msgtl_number > *procenvCnt) { | |
- __mig_allocate((vm_offset_t *)procenv, | |
- OutP->procenvType.msgtl_number); | |
- memcpy(*procenv, OutP->procenv, OutP->procenvType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)procenv, OutP->procenvType.msgtl_number); | |
+ memcpy(*procenv, OutP->procenv, OutP->procenvType.msgtl_number); | |
} | |
else if (OutP->procenvType.msgtl_number) { | |
- memcpy(*procenv, OutP->procenv, OutP->procenvType.msgtl_number); | |
+ memcpy(*procenv, OutP->procenv, OutP->procenvType.msgtl_number); | |
} | |
*procenvCnt = OutP->procenvType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_sig_post_request.c 2023-11-24 15:41:07.183126274 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_sig_post_request.c 2023-11-24 15:49:28.156092483 -0500 | |
@@ -70,8 +70,7 @@ | |
natural_t sigcode; | |
char sigcodePad[4]; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
union { | |
@@ -105,14 +104,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->signalType = signalType; | |
@@ -124,7 +123,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, reply_portPoly); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_fsys_init.c 2023-11-24 15:41:07.227125306 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_fsys_init.c 2023-11-24 15:49:28.200091513 -0500 | |
@@ -63,11 +63,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t proc_serverType; | |
- mach_port_t proc_server; | |
- char proc_serverPad[4]; | |
+ mach_port_name_inlined_t proc_server; | |
mach_msg_type_t auth_handleType; | |
- auth_t auth_handle; | |
- char auth_handlePad[4]; | |
+ mach_port_name_inlined_t auth_handle; | |
} Request; | |
typedef struct { | |
@@ -89,25 +87,25 @@ | |
const mach_msg_type_t proc_serverType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t auth_handleType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(auth_t) == 4 * 1, "expected auth_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -121,13 +119,13 @@ | |
InP->proc_serverType = proc_serverType; | |
- InP->proc_server = proc_server; | |
+ InP->proc_server.name = proc_server; | |
InP->proc_serverType.msgt_name = proc_serverPoly; | |
InP->auth_handleType = auth_handleType; | |
- InP->auth_handle = auth_handle; | |
+ InP->auth_handle.name = auth_handle; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_fsys_getfile.c 2023-11-24 15:41:07.211125657 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_fsys_getfile.c 2023-11-24 15:49:28.184091866 -0500 | |
@@ -89,8 +89,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t fileType; | |
- mach_port_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
} Reply; | |
union { | |
@@ -154,7 +153,7 @@ | |
const mach_msg_type_t fileCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -261,7 +260,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *file = OutP->file; | |
+ *file = OutP->file.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_sigio_request.c 2023-11-24 15:41:07.343122752 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_sigio_request.c 2023-11-24 15:49:28.360087988 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
} Request; | |
union { | |
@@ -73,18 +72,18 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_set_init_ints.c 2023-11-24 15:41:07.223125393 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_set_init_ints.c 2023-11-24 15:49:28.200091513 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t valuesType; | |
union { | |
int values[512]; | |
@@ -91,14 +90,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t valuesType = { | |
.msgtl_header = { | |
@@ -124,7 +123,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->valuesType = valuesType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_startup_procinit.c 2023-11-24 15:41:07.159126803 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_startup_procinit.c 2023-11-24 15:49:28.132093011 -0500 | |
@@ -64,8 +64,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t startup_procType; | |
- process_t startup_proc; | |
- char startup_procPad[4]; | |
+ mach_port_name_inlined_t startup_proc; | |
} Request; | |
typedef struct { | |
@@ -74,17 +73,13 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t startup_taskType; | |
- mach_port_t startup_task; | |
- char startup_taskPad[4]; | |
+ mach_port_name_inlined_t startup_task; | |
mach_msg_type_t authType; | |
- auth_t auth; | |
- char authPad[4]; | |
+ mach_port_name_inlined_t auth; | |
mach_msg_type_t host_privType; | |
- mach_port_t host_priv; | |
- char host_privPad[4]; | |
+ mach_port_name_inlined_t host_priv; | |
mach_msg_type_t device_masterType; | |
- mach_port_t device_master; | |
- char device_masterPad[4]; | |
+ mach_port_name_inlined_t device_master; | |
} Reply; | |
union { | |
@@ -105,14 +100,14 @@ | |
const mach_msg_type_t startup_procType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(process_t) == 4 * 1, "expected process_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -126,7 +121,7 @@ | |
const mach_msg_type_t startup_taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -136,7 +131,7 @@ | |
const mach_msg_type_t authCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -146,7 +141,7 @@ | |
const mach_msg_type_t host_privCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -156,7 +151,7 @@ | |
const mach_msg_type_t device_masterCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -166,7 +161,7 @@ | |
InP->startup_procType = startup_procType; | |
- InP->startup_proc = startup_proc; | |
+ InP->startup_proc.name = startup_proc; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -219,28 +214,28 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *startup_task = OutP->startup_task; | |
+ *startup_task = OutP->startup_task.name; | |
#if TypeCheck | |
if (BAD_TYPECHECK (&OutP->authType, &authCheck)) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *auth = OutP->auth; | |
+ *auth = OutP->auth.name; | |
#if TypeCheck | |
if (BAD_TYPECHECK (&OutP->host_privType, &host_privCheck)) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *host_priv = OutP->host_priv; | |
+ *host_priv = OutP->host_priv.name; | |
#if TypeCheck | |
if (BAD_TYPECHECK (&OutP->device_masterType, &device_masterCheck)) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *device_master = OutP->device_master; | |
+ *device_master = OutP->device_master.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_term_set_filenode.c 2023-11-24 15:41:07.255124689 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_term_set_filenode.c 2023-11-24 15:49:28.232090808 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t filenodeType; | |
- file_t filenode; | |
- char filenodePad[4]; | |
+ mach_port_name_inlined_t filenode; | |
} Request; | |
typedef struct { | |
@@ -84,14 +83,14 @@ | |
const mach_msg_type_t filenodeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(file_t) == 4 * 1, "expected file_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -105,7 +104,7 @@ | |
InP->filenodeType = filenodeType; | |
- InP->filenode = filenode; | |
+ InP->filenode.name = filenode; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_prenotify_request.c 2023-11-24 15:41:07.323123192 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_prenotify_request.c 2023-11-24 15:49:28.336088517 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
mach_msg_type_t write_startType; | |
vm_offset_t write_start; | |
mach_msg_type_t write_endType; | |
@@ -79,14 +78,14 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t write_startType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -112,7 +111,7 @@ | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->write_startType = write_startType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_clear_some_openmodes_request.c 2023-11-24 15:41:07.267124425 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_clear_some_openmodes_request.c 2023-11-24 15:49:28.252090368 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
mach_msg_type_t bits_to_clearType; | |
int bits_to_clear; | |
char bits_to_clearPad[4]; | |
@@ -77,14 +76,14 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t bits_to_clearType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -99,7 +98,7 @@ | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->bits_to_clearType = bits_to_clearType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_set_init_port.c 2023-11-24 15:41:07.203125834 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_set_init_port.c 2023-11-24 15:49:28.176092042 -0500 | |
@@ -63,14 +63,12 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -92,14 +90,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t whichType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -114,14 +112,14 @@ | |
const mach_msg_type_t portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -135,7 +133,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->whichType = whichType; | |
@@ -143,7 +141,7 @@ | |
InP->portType = portType; | |
- InP->port = port; | |
+ InP->port.name = port; | |
InP->portType.msgt_name = portPoly; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_handle_exceptions.c 2023-11-24 15:41:07.231125218 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_handle_exceptions.c 2023-11-24 15:49:28.216091161 -0500 | |
@@ -66,11 +66,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t msgportType; | |
- mach_port_t msgport; | |
- char msgportPad[4]; | |
+ mach_port_name_inlined_t msgport; | |
mach_msg_type_t forwardportType; | |
- mach_port_t forwardport; | |
- char forwardportPad[4]; | |
+ mach_port_name_inlined_t forwardport; | |
mach_msg_type_t flavorType; | |
int flavor; | |
char flavorPad[4]; | |
@@ -101,25 +99,25 @@ | |
const mach_msg_type_t msgportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MOVE_RECEIVE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t forwardportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t flavorType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -154,11 +152,11 @@ | |
InP->msgportType = msgportType; | |
- InP->msgport = msgport; | |
+ InP->msgport.name = msgport; | |
InP->forwardportType = forwardportType; | |
- InP->forwardport = forwardport; | |
+ InP->forwardport.name = forwardport; | |
InP->forwardportType.msgt_name = forwardportPoly; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_set_init_int.c 2023-11-24 15:41:07.215125570 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_set_init_int.c 2023-11-24 15:49:28.192091690 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
@@ -91,14 +90,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t whichType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -134,7 +133,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->whichType = whichType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_get_storage_info.c 2023-11-24 15:41:07.271124337 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_get_storage_info.c 2023-11-24 15:49:28.256090279 -0500 | |
@@ -76,7 +76,7 @@ | |
char RetCodePad[4]; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t intsType; | |
@@ -172,11 +172,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((OutP->portsType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->portsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->portsType.msgtl_size != 32))) | |
+ (OutP->portsType.msgtl_size != 64 && OutP->portsType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->portsType.msgtl_size != 32 && OutP->portsType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? (4 * OutP->portsType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? 8 * OutP->portsType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 80 + msgh_size_delta)) | |
return MIG_TYPE_ERROR; | |
@@ -184,14 +185,23 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->portsType.msgtl_header.msgt_inline) | |
- *ports = OutP->portsP; | |
+ *ports = OutP->portsP; | |
else if (OutP->portsType.msgtl_number > *portsCnt) { | |
- __mig_allocate((vm_offset_t *)ports, | |
- 4 * OutP->portsType.msgtl_number); | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
else if (OutP->portsType.msgtl_number) { | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
*portsCnt = OutP->portsType.msgtl_number; | |
@@ -213,14 +223,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->intsType.msgtl_header.msgt_inline) | |
- *ints = OutP->intsP; | |
+ *ints = OutP->intsP; | |
else if (OutP->intsType.msgtl_number > *intsCnt) { | |
- __mig_allocate((vm_offset_t *)ints, | |
- 4 * OutP->intsType.msgtl_number); | |
- memcpy(*ints, OutP->ints, 4 * OutP->intsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)ints, 4 * OutP->intsType.msgtl_number); | |
+ memcpy(*ints, OutP->ints, 4 * OutP->intsType.msgtl_number); | |
} | |
else if (OutP->intsType.msgtl_number) { | |
- memcpy(*ints, OutP->ints, 4 * OutP->intsType.msgtl_number); | |
+ memcpy(*ints, OutP->ints, 4 * OutP->intsType.msgtl_number); | |
} | |
*intsCnt = OutP->intsType.msgtl_number; | |
@@ -242,14 +251,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->offsetsType.msgtl_header.msgt_inline) | |
- *offsets = OutP->offsetsP; | |
+ *offsets = OutP->offsetsP; | |
else if (OutP->offsetsType.msgtl_number > *offsetsCnt) { | |
- __mig_allocate((vm_offset_t *)offsets, | |
- 8 * OutP->offsetsType.msgtl_number); | |
- memcpy(*offsets, OutP->offsets, 8 * OutP->offsetsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)offsets, 8 * OutP->offsetsType.msgtl_number); | |
+ memcpy(*offsets, OutP->offsets, 8 * OutP->offsetsType.msgtl_number); | |
} | |
else if (OutP->offsetsType.msgtl_number) { | |
- memcpy(*offsets, OutP->offsets, 8 * OutP->offsetsType.msgtl_number); | |
+ memcpy(*offsets, OutP->offsets, 8 * OutP->offsetsType.msgtl_number); | |
} | |
*offsetsCnt = OutP->offsetsType.msgtl_number; | |
@@ -269,14 +277,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->dataType.msgtl_header.msgt_inline) | |
- *data = OutP->dataP; | |
+ *data = OutP->dataP; | |
else if (OutP->dataType.msgtl_number > *dataCnt) { | |
- __mig_allocate((vm_offset_t *)data, | |
- OutP->dataType.msgtl_number); | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
else if (OutP->dataType.msgtl_number) { | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
*dataCnt = OutP->dataType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getsessionpids.c 2023-11-24 15:41:07.339122840 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getsessionpids.c 2023-11-24 15:49:28.332088606 -0500 | |
@@ -179,14 +179,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->pidsetType.msgtl_header.msgt_inline) | |
- *pidset = OutP->pidsetP; | |
+ *pidset = OutP->pidsetP; | |
else if (OutP->pidsetType.msgtl_number > *pidsetCnt) { | |
- __mig_allocate((vm_offset_t *)pidset, | |
- 4 * OutP->pidsetType.msgtl_number); | |
- memcpy(*pidset, OutP->pidset, 4 * OutP->pidsetType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)pidset, 4 * OutP->pidsetType.msgtl_number); | |
+ memcpy(*pidset, OutP->pidset, 4 * OutP->pidsetType.msgtl_number); | |
} | |
else if (OutP->pidsetType.msgtl_number) { | |
- memcpy(*pidset, OutP->pidset, 4 * OutP->pidsetType.msgtl_number); | |
+ memcpy(*pidset, OutP->pidset, 4 * OutP->pidsetType.msgtl_number); | |
} | |
*pidsetCnt = OutP->pidsetType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_readnotify_request.c 2023-11-24 15:41:07.335122928 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_readnotify_request.c 2023-11-24 15:49:28.348088253 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
} Request; | |
union { | |
@@ -73,18 +72,18 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_set_some_openmodes_request.c 2023-11-24 15:41:07.263124512 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_set_some_openmodes_request.c 2023-11-24 15:49:28.248090456 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
mach_msg_type_t bits_to_setType; | |
int bits_to_set; | |
char bits_to_setPad[4]; | |
@@ -77,14 +76,14 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t bits_to_setType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -99,7 +98,7 @@ | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->bits_to_setType = bits_to_setType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_get_tty.c 2023-11-24 15:41:07.375122046 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_get_tty.c 2023-11-24 15:49:28.376087636 -0500 | |
@@ -72,8 +72,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t ttyType; | |
- mach_port_t tty; | |
- char ttyPad[4]; | |
+ mach_port_name_inlined_t tty; | |
} Reply; | |
union { | |
@@ -115,7 +114,7 @@ | |
const mach_msg_type_t ttyCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -178,7 +177,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *tty = OutP->tty; | |
+ *tty = OutP->tty.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_reparent.c 2023-11-24 15:41:07.343122752 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_reparent.c 2023-11-24 15:49:28.376087636 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t parentType; | |
- mach_port_t parent; | |
- char parentPad[4]; | |
+ mach_port_name_inlined_t parent; | |
} Request; | |
typedef struct { | |
@@ -72,8 +71,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t new_fileType; | |
- mach_port_t new_file; | |
- char new_filePad[4]; | |
+ mach_port_name_inlined_t new_file; | |
} Reply; | |
union { | |
@@ -94,14 +92,14 @@ | |
const mach_msg_type_t parentType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -115,7 +113,7 @@ | |
const mach_msg_type_t new_fileCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -125,7 +123,7 @@ | |
InP->parentType = parentType; | |
- InP->parent = parent; | |
+ InP->parent.name = parent; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -178,7 +176,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *new_file = OutP->new_file; | |
+ *new_file = OutP->new_file.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_mod_owner_request.c 2023-11-24 15:41:07.275124249 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_mod_owner_request.c 2023-11-24 15:49:28.260090192 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
mach_msg_type_t ownerType; | |
pid_t owner; | |
char ownerPad[4]; | |
@@ -77,14 +76,14 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t ownerType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -99,7 +98,7 @@ | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->ownerType = ownerType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_connect.c 2023-11-24 15:41:07.251124777 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_connect.c 2023-11-24 15:49:28.232090808 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t addrType; | |
- addr_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Request; | |
typedef struct { | |
@@ -84,14 +83,14 @@ | |
const mach_msg_type_t addrType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(addr_port_t) == 4 * 1, "expected addr_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -105,7 +104,7 @@ | |
InP->addrType = addrType; | |
- InP->addr = addr; | |
+ InP->addr.name = addr; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getallpids.c 2023-11-24 15:41:07.167126626 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getallpids.c 2023-11-24 15:49:28.144092747 -0500 | |
@@ -160,14 +160,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->pidarrayType.msgtl_header.msgt_inline) | |
- *pidarray = OutP->pidarrayP; | |
+ *pidarray = OutP->pidarrayP; | |
else if (OutP->pidarrayType.msgtl_number > *pidarrayCnt) { | |
- __mig_allocate((vm_offset_t *)pidarray, | |
- 4 * OutP->pidarrayType.msgtl_number); | |
- memcpy(*pidarray, OutP->pidarray, 4 * OutP->pidarrayType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)pidarray, 4 * OutP->pidarrayType.msgtl_number); | |
+ memcpy(*pidarray, OutP->pidarray, 4 * OutP->pidarrayType.msgtl_number); | |
} | |
else if (OutP->pidarrayType.msgtl_number) { | |
- memcpy(*pidarray, OutP->pidarray, 4 * OutP->pidarrayType.msgtl_number); | |
+ memcpy(*pidarray, OutP->pidarray, 4 * OutP->pidarrayType.msgtl_number); | |
} | |
*pidarrayCnt = OutP->pidarrayType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_execdata_notify.c 2023-11-24 15:41:07.179126362 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_execdata_notify.c 2023-11-24 15:49:28.156092483 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t notifyType; | |
- mach_port_t notify; | |
- char notifyPad[4]; | |
+ mach_port_name_inlined_t notify; | |
} Request; | |
typedef struct { | |
@@ -86,14 +85,14 @@ | |
const mach_msg_type_t notifyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -107,7 +106,7 @@ | |
InP->notifyType = notifyType; | |
- InP->notify = notify; | |
+ InP->notify.name = notify; | |
if (MACH_MSG_TYPE_PORT_ANY(notifyPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_async_reply.c 2023-11-24 15:41:07.255124689 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_async_reply.c 2023-11-24 15:49:28.220091073 -0500 | |
@@ -66,8 +66,7 @@ | |
kern_return_t return_code; | |
char return_codePad[4]; | |
mach_msg_type_t async_id_portType; | |
- mach_port_t async_id_port; | |
- char async_id_portPad[4]; | |
+ mach_port_name_inlined_t async_id_port; | |
} Request; | |
union { | |
@@ -91,14 +90,14 @@ | |
const mach_msg_type_t async_id_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
if (MACH_MSG_TYPE_PORT_ANY(replyPoly)) | |
msgh_simple = FALSE; | |
@@ -109,7 +108,7 @@ | |
InP->async_id_portType = async_id_portType; | |
- InP->async_id_port = async_id_port; | |
+ InP->async_id_port.name = async_id_port; | |
if (MACH_MSG_TYPE_PORT_ANY(async_id_portPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_login_get_location.c 2023-11-24 15:41:07.255124689 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_login_get_location.c 2023-11-24 15:49:28.224090984 -0500 | |
@@ -159,14 +159,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->locationType.msgtl_header.msgt_inline) | |
- *location = OutP->locationP; | |
+ *location = OutP->locationP; | |
else if (OutP->locationType.msgtl_number > *locationCnt) { | |
- __mig_allocate((vm_offset_t *)location, | |
- OutP->locationType.msgtl_number); | |
- memcpy(*location, OutP->location, OutP->locationType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)location, OutP->locationType.msgtl_number); | |
+ memcpy(*location, OutP->location, OutP->locationType.msgtl_number); | |
} | |
else if (OutP->locationType.msgtl_number) { | |
- memcpy(*location, OutP->location, OutP->locationType.msgtl_number); | |
+ memcpy(*location, OutP->location, OutP->locationType.msgtl_number); | |
} | |
*locationCnt = OutP->locationType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_get_fd.c 2023-11-24 15:41:07.231125218 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_get_fd.c 2023-11-24 15:49:28.220091073 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t fdType; | |
int fd; | |
char fdPad[4]; | |
@@ -75,8 +74,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Reply; | |
union { | |
@@ -97,14 +95,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t fdType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -129,7 +127,7 @@ | |
const mach_msg_type_t portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -139,7 +137,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->fdType = fdType; | |
@@ -196,7 +194,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *port = OutP->port; | |
+ *port = OutP->port.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_term_open_ctty.c 2023-11-24 15:41:07.243124954 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_term_open_ctty.c 2023-11-24 15:49:28.216091161 -0500 | |
@@ -76,8 +76,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t newttyType; | |
- mach_port_t newtty; | |
- char newttyPad[4]; | |
+ mach_port_name_inlined_t newtty; | |
} Reply; | |
union { | |
@@ -130,7 +129,7 @@ | |
const mach_msg_type_t newttyCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -197,7 +196,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *newtty = OutP->newtty; | |
+ *newtty = OutP->newtty.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_identity_request.c 2023-11-24 15:41:07.351122576 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_identity_request.c 2023-11-24 15:49:28.372087724 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
} Request; | |
union { | |
@@ -73,18 +72,18 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getloginpids.c 2023-11-24 15:41:07.315123368 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getloginpids.c 2023-11-24 15:49:28.296089399 -0500 | |
@@ -179,14 +179,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->pidsType.msgtl_header.msgt_inline) | |
- *pids = OutP->pidsP; | |
+ *pids = OutP->pidsP; | |
else if (OutP->pidsType.msgtl_number > *pidsCnt) { | |
- __mig_allocate((vm_offset_t *)pids, | |
- 4 * OutP->pidsType.msgtl_number); | |
- memcpy(*pids, OutP->pids, 4 * OutP->pidsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)pids, 4 * OutP->pidsType.msgtl_number); | |
+ memcpy(*pids, OutP->pids, 4 * OutP->pidsType.msgtl_number); | |
} | |
else if (OutP->pidsType.msgtl_number) { | |
- memcpy(*pids, OutP->pids, 4 * OutP->pidsType.msgtl_number); | |
+ memcpy(*pids, OutP->pids, 4 * OutP->pidsType.msgtl_number); | |
} | |
*pidsCnt = OutP->pidsType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_exec.c 2023-11-24 15:41:07.203125834 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_exec.c 2023-11-24 15:49:28.180091954 -0500 | |
@@ -78,8 +78,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t exec_taskType; | |
- mach_port_t exec_task; | |
- char exec_taskPad[4]; | |
+ mach_port_name_inlined_t exec_task; | |
mach_msg_type_t flagsType; | |
int flags; | |
char flagsPad[4]; | |
@@ -95,12 +94,12 @@ | |
}; | |
mach_msg_type_long_t fdarrayType; | |
union { | |
- mach_port_t fdarray[512]; | |
+ mach_port_name_inlined_t fdarray[256]; | |
const mach_port_t *fdarrayP; | |
}; | |
mach_msg_type_long_t portarrayType; | |
union { | |
- mach_port_t portarray[512]; | |
+ mach_port_name_inlined_t portarray[256]; | |
const mach_port_t *portarrayP; | |
}; | |
mach_msg_type_long_t intarrayType; | |
@@ -141,14 +140,14 @@ | |
const mach_msg_type_t exec_taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t flagsType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -188,8 +187,8 @@ | |
const mach_msg_type_long_t fdarrayType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -200,8 +199,8 @@ | |
const mach_msg_type_long_t portarrayType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -257,7 +256,7 @@ | |
InP->exec_taskType = exec_taskType; | |
- InP->exec_task = exec_task; | |
+ InP->exec_task.name = exec_task; | |
InP->flagsType = flagsType; | |
@@ -295,36 +294,54 @@ | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->fdarrayType = fdarrayType; | |
- if (fdarrayCnt > 512) { | |
+ if (fdarrayCnt > 256) { | |
InP->fdarrayType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->fdarrayType.msgtl_header.msgt_size = 32; | |
InP->fdarrayP = fdarray; | |
} | |
else if (fdarrayCnt) { | |
- memcpy(InP->fdarray, fdarray, 4 * fdarrayCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_fdarray = (mach_port_name_inlined_t *)InP->fdarray; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < fdarrayCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_fdarray[i].kernel_port_do_not_use = 0; | |
+ inlined_fdarray[i].name = (fdarray)[i]; | |
+ } | |
} | |
InP->fdarrayType.msgtl_name = fdarrayPoly; | |
InP->fdarrayType.msgtl_number = fdarrayCnt; | |
- msgh_size_delta = (InP->fdarrayType.msgtl_header.msgt_inline) ? (4 * fdarrayCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (InP->fdarrayType.msgtl_header.msgt_inline) ? 8 * fdarrayCnt : sizeof(mach_port_t *); | |
msgh_size += msgh_size_delta; | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->portarrayType = portarrayType; | |
- if (portarrayCnt > 512) { | |
+ if (portarrayCnt > 256) { | |
InP->portarrayType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->portarrayType.msgtl_header.msgt_size = 32; | |
InP->portarrayP = portarray; | |
} | |
else if (portarrayCnt) { | |
- memcpy(InP->portarray, portarray, 4 * portarrayCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_portarray = (mach_port_name_inlined_t *)InP->portarray; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < portarrayCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_portarray[i].kernel_port_do_not_use = 0; | |
+ inlined_portarray[i].name = (portarray)[i]; | |
+ } | |
} | |
InP->portarrayType.msgtl_name = portarrayPoly; | |
InP->portarrayType.msgtl_number = portarrayCnt; | |
- msgh_size_delta = (InP->portarrayType.msgtl_header.msgt_inline) ? (4 * portarrayCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (InP->portarrayType.msgtl_header.msgt_inline) ? 8 * portarrayCnt : sizeof(mach_port_t *); | |
msgh_size += msgh_size_delta; | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->intarrayType = intarrayType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_restrict_auth_request.c 2023-11-24 15:41:07.295123809 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_restrict_auth_request.c 2023-11-24 15:49:28.292089486 -0500 | |
@@ -64,8 +64,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
mach_msg_type_long_t uidsType; | |
union { | |
uid_t uids[512]; | |
@@ -89,14 +88,14 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t uidsType = { | |
.msgtl_header = { | |
@@ -124,7 +123,7 @@ | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->uidsType = uidsType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_pci_conf_read.c 2023-11-24 15:41:07.255124689 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_pci_conf_read.c 2023-11-24 15:49:28.224090984 -0500 | |
@@ -197,14 +197,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->dataType.msgtl_header.msgt_inline) | |
- *data = OutP->dataP; | |
+ *data = OutP->dataP; | |
else if (OutP->dataType.msgtl_number > *dataCnt) { | |
- __mig_allocate((vm_offset_t *)data, | |
- OutP->dataType.msgtl_number); | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
else if (OutP->dataType.msgtl_number) { | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
*dataCnt = OutP->dataType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_fsys_get_children.c 2023-11-24 15:41:07.243124954 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_fsys_get_children.c 2023-11-24 15:49:28.216091161 -0500 | |
@@ -77,7 +77,7 @@ | |
}; | |
mach_msg_type_long_t controlsType; | |
union { | |
- mach_port_t controls[512]; | |
+ mach_port_name_inlined_t controls[256]; | |
mach_port_t *controlsP; | |
}; | |
} Reply; | |
@@ -170,14 +170,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->namesType.msgtl_header.msgt_inline) | |
- *names = OutP->namesP; | |
+ *names = OutP->namesP; | |
else if (OutP->namesType.msgtl_number > *namesCnt) { | |
- __mig_allocate((vm_offset_t *)names, | |
- OutP->namesType.msgtl_number); | |
- memcpy(*names, OutP->names, OutP->namesType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)names, OutP->namesType.msgtl_number); | |
+ memcpy(*names, OutP->names, OutP->namesType.msgtl_number); | |
} | |
else if (OutP->namesType.msgtl_number) { | |
- memcpy(*names, OutP->names, OutP->namesType.msgtl_number); | |
+ memcpy(*names, OutP->names, OutP->namesType.msgtl_number); | |
} | |
*namesCnt = OutP->namesType.msgtl_number; | |
@@ -187,24 +186,34 @@ | |
#if TypeCheck | |
if (mig_unlikely ((OutP->controlsType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->controlsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->controlsType.msgtl_size != 32))) | |
+ (OutP->controlsType.msgtl_size != 64 && OutP->controlsType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->controlsType.msgtl_size != 32 && OutP->controlsType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
#if TypeCheck | |
- if (mig_unlikely (msgh_size != 64 + ((OutP->controlsType.msgtl_header.msgt_inline) ? (4 * OutP->controlsType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *)))) | |
+ if (mig_unlikely (msgh_size != 64 + ((OutP->controlsType.msgtl_header.msgt_inline) ? 8 * OutP->controlsType.msgtl_number : sizeof(mach_port_t *)))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
if (!OutP->controlsType.msgtl_header.msgt_inline) | |
- *controls = OutP->controlsP; | |
+ *controls = OutP->controlsP; | |
else if (OutP->controlsType.msgtl_number > *controlsCnt) { | |
- __mig_allocate((vm_offset_t *)controls, | |
- 4 * OutP->controlsType.msgtl_number); | |
- memcpy(*controls, OutP->controls, 4 * OutP->controlsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)controls, 4 * OutP->controlsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_controls = (mach_port_name_inlined_t *)OutP->controls; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->controlsType.msgtl_number; i++) { | |
+ (*controls)[i] = inlined_controls[i].name; | |
+ } | |
} | |
else if (OutP->controlsType.msgtl_number) { | |
- memcpy(*controls, OutP->controls, 4 * OutP->controlsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_controls = (mach_port_name_inlined_t *)OutP->controls; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->controlsType.msgtl_number; i++) { | |
+ (*controls)[i] = inlined_controls[i].name; | |
+ } | |
} | |
*controlsCnt = OutP->controlsType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_recv.c 2023-11-24 15:41:07.307123544 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_recv.c 2023-11-24 15:49:28.300089311 -0500 | |
@@ -82,8 +82,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t addrType; | |
- mach_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
mach_msg_type_long_t dataType; | |
union { | |
char data[2048]; | |
@@ -91,7 +90,7 @@ | |
}; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t controlType; | |
@@ -155,7 +154,7 @@ | |
const mach_msg_type_t addrCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -232,7 +231,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *addr = OutP->addr; | |
+ *addr = OutP->addr.name; | |
#if TypeCheck | |
if (mig_unlikely ((OutP->dataType.msgtl_header.msgt_longform != TRUE) || | |
@@ -249,14 +248,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->dataType.msgtl_header.msgt_inline) | |
- *data = OutP->dataP; | |
+ *data = OutP->dataP; | |
else if (OutP->dataType.msgtl_number > *dataCnt) { | |
- __mig_allocate((vm_offset_t *)data, | |
- OutP->dataType.msgtl_number); | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
else if (OutP->dataType.msgtl_number) { | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
*dataCnt = OutP->dataType.msgtl_number; | |
@@ -266,11 +264,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((OutP->portsType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->portsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->portsType.msgtl_size != 32))) | |
+ (OutP->portsType.msgtl_size != 64 && OutP->portsType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->portsType.msgtl_size != 32 && OutP->portsType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? (4 * OutP->portsType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? 8 * OutP->portsType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 104 + msgh_size_delta)) | |
return MIG_TYPE_ERROR; | |
@@ -278,14 +277,23 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->portsType.msgtl_header.msgt_inline) | |
- *ports = OutP->portsP; | |
+ *ports = OutP->portsP; | |
else if (OutP->portsType.msgtl_number > *portsCnt) { | |
- __mig_allocate((vm_offset_t *)ports, | |
- 4 * OutP->portsType.msgtl_number); | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
else if (OutP->portsType.msgtl_number) { | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
*portsCnt = OutP->portsType.msgtl_number; | |
@@ -306,14 +314,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->controlType.msgtl_header.msgt_inline) | |
- *control = OutP->controlP; | |
+ *control = OutP->controlP; | |
else if (OutP->controlType.msgtl_number > *controlCnt) { | |
- __mig_allocate((vm_offset_t *)control, | |
- OutP->controlType.msgtl_number); | |
- memcpy(*control, OutP->control, OutP->controlType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)control, OutP->controlType.msgtl_number); | |
+ memcpy(*control, OutP->control, OutP->controlType.msgtl_number); | |
} | |
else if (OutP->controlType.msgtl_number) { | |
- memcpy(*control, OutP->control, OutP->controlType.msgtl_number); | |
+ memcpy(*control, OutP->control, OutP->controlType.msgtl_number); | |
} | |
*controlCnt = OutP->controlType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_send.c 2023-11-24 15:41:07.303123632 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_send.c 2023-11-24 15:49:28.296089399 -0500 | |
@@ -70,8 +70,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t addrType; | |
- addr_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
mach_msg_type_t flagsType; | |
int flags; | |
char flagsPad[4]; | |
@@ -82,7 +81,7 @@ | |
}; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
const mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t controlType; | |
@@ -115,14 +114,14 @@ | |
const mach_msg_type_t addrType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(addr_port_t) == 4 * 1, "expected addr_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t flagsType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -150,8 +149,8 @@ | |
const mach_msg_type_long_t portsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -193,7 +192,7 @@ | |
InP->addrType = addrType; | |
- InP->addr = addr; | |
+ InP->addr.name = addr; | |
InP->flagsType = flagsType; | |
@@ -216,19 +215,28 @@ | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->portsType = portsType; | |
- if (portsCnt > 512) { | |
+ if (portsCnt > 256) { | |
InP->portsType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->portsType.msgtl_header.msgt_size = 32; | |
InP->portsP = ports; | |
} | |
else if (portsCnt) { | |
- memcpy(InP->ports, ports, 4 * portsCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)InP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < portsCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_ports[i].kernel_port_do_not_use = 0; | |
+ inlined_ports[i].name = (ports)[i]; | |
+ } | |
} | |
InP->portsType.msgtl_name = portsPoly; | |
InP->portsType.msgtl_number = portsCnt; | |
- msgh_size_delta = (InP->portsType.msgtl_header.msgt_inline) ? (4 * portsCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (InP->portsType.msgtl_header.msgt_inline) ? 8 * portsCnt : sizeof(mach_port_t *); | |
msgh_size += msgh_size_delta; | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->controlType = controlType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_startup_authinit.c 2023-11-24 15:41:07.163126715 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_startup_authinit.c 2023-11-24 15:49:28.136092923 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t authType; | |
- mach_port_t auth; | |
- char authPad[4]; | |
+ mach_port_name_inlined_t auth; | |
} Request; | |
typedef struct { | |
@@ -72,8 +71,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t procType; | |
- mach_port_t proc; | |
- char procPad[4]; | |
+ mach_port_name_inlined_t proc; | |
} Reply; | |
union { | |
@@ -92,14 +90,14 @@ | |
const mach_msg_type_t authType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -113,7 +111,7 @@ | |
const mach_msg_type_t procCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -123,7 +121,7 @@ | |
InP->authType = authType; | |
- InP->auth = auth; | |
+ InP->auth.name = auth; | |
if (MACH_MSG_TYPE_PORT_ANY(authPoly)) | |
msgh_simple = FALSE; | |
@@ -183,7 +181,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *proc = OutP->proc; | |
+ *proc = OutP->proc.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getsidport.c 2023-11-24 15:41:07.343122752 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getsidport.c 2023-11-24 15:49:28.348088253 -0500 | |
@@ -68,8 +68,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t sessportType; | |
- mach_port_t sessport; | |
- char sessportPad[4]; | |
+ mach_port_name_inlined_t sessport; | |
} Reply; | |
union { | |
@@ -100,7 +99,7 @@ | |
const mach_msg_type_t sessportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -159,7 +158,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *sessport = OutP->sessport; | |
+ *sessport = OutP->sessport.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_fsys_getroot.c 2023-11-24 15:41:07.207125746 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_fsys_getroot.c 2023-11-24 15:49:28.180091954 -0500 | |
@@ -70,8 +70,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t dotdot_nodeType; | |
- mach_port_t dotdot_node; | |
- char dotdot_nodePad[4]; | |
+ mach_port_name_inlined_t dotdot_node; | |
mach_msg_type_long_t gen_uidsType; | |
union { | |
uid_t gen_uids[512]; | |
@@ -98,8 +97,7 @@ | |
mach_msg_type_t retry_nameType; | |
string_t retry_name; | |
mach_msg_type_t fileType; | |
- mach_port_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
} Reply; | |
union { | |
@@ -117,14 +115,14 @@ | |
const mach_msg_type_t dotdot_nodeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t gen_uidsType = { | |
.msgtl_header = { | |
@@ -193,7 +191,7 @@ | |
const mach_msg_type_t fileCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -203,7 +201,7 @@ | |
InP->dotdot_nodeType = dotdot_nodeType; | |
- InP->dotdot_node = dotdot_node; | |
+ InP->dotdot_node.name = dotdot_node; | |
if (MACH_MSG_TYPE_PORT_ANY(dotdot_nodePoly)) | |
msgh_simple = FALSE; | |
@@ -313,7 +311,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *file = OutP->file; | |
+ *file = OutP->file.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_exec_exec_paths.c 2023-11-24 15:41:07.191126098 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_exec_exec_paths.c 2023-11-24 15:49:28.168092218 -0500 | |
@@ -82,11 +82,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t fileType; | |
- mach_port_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
mach_msg_type_t oldtaskType; | |
- mach_port_t oldtask; | |
- char oldtaskPad[4]; | |
+ mach_port_name_inlined_t oldtask; | |
mach_msg_type_t flagsType; | |
int flags; | |
char flagsPad[4]; | |
@@ -106,12 +104,12 @@ | |
}; | |
mach_msg_type_long_t dtableType; | |
union { | |
- mach_port_t dtable[512]; | |
+ mach_port_name_inlined_t dtable[256]; | |
const mach_port_t *dtableP; | |
}; | |
mach_msg_type_long_t portarrayType; | |
union { | |
- mach_port_t portarray[512]; | |
+ mach_port_name_inlined_t portarray[256]; | |
const mach_port_t *portarrayP; | |
}; | |
mach_msg_type_long_t intarrayType; | |
@@ -152,25 +150,25 @@ | |
const mach_msg_type_t fileType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t oldtaskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t flagsType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -232,8 +230,8 @@ | |
const mach_msg_type_long_t dtableType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -244,8 +242,8 @@ | |
const mach_msg_type_long_t portarrayType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -301,13 +299,13 @@ | |
InP->fileType = fileType; | |
- InP->file = file; | |
+ InP->file.name = file; | |
InP->fileType.msgt_name = filePoly; | |
InP->oldtaskType = oldtaskType; | |
- InP->oldtask = oldtask; | |
+ InP->oldtask.name = oldtask; | |
InP->flagsType = flagsType; | |
@@ -353,36 +351,54 @@ | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->dtableType = dtableType; | |
- if (dtableCnt > 512) { | |
+ if (dtableCnt > 256) { | |
InP->dtableType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->dtableType.msgtl_header.msgt_size = 32; | |
InP->dtableP = dtable; | |
} | |
else if (dtableCnt) { | |
- memcpy(InP->dtable, dtable, 4 * dtableCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_dtable = (mach_port_name_inlined_t *)InP->dtable; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < dtableCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_dtable[i].kernel_port_do_not_use = 0; | |
+ inlined_dtable[i].name = (dtable)[i]; | |
+ } | |
} | |
InP->dtableType.msgtl_name = dtablePoly; | |
InP->dtableType.msgtl_number = dtableCnt; | |
- msgh_size_delta = (InP->dtableType.msgtl_header.msgt_inline) ? (4 * dtableCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (InP->dtableType.msgtl_header.msgt_inline) ? 8 * dtableCnt : sizeof(mach_port_t *); | |
msgh_size += msgh_size_delta; | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->portarrayType = portarrayType; | |
- if (portarrayCnt > 512) { | |
+ if (portarrayCnt > 256) { | |
InP->portarrayType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->portarrayType.msgtl_header.msgt_size = 32; | |
InP->portarrayP = portarray; | |
} | |
else if (portarrayCnt) { | |
- memcpy(InP->portarray, portarray, 4 * portarrayCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_portarray = (mach_port_name_inlined_t *)InP->portarray; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < portarrayCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_portarray[i].kernel_port_do_not_use = 0; | |
+ inlined_portarray[i].name = (portarray)[i]; | |
+ } | |
} | |
InP->portarrayType.msgtl_name = portarrayPoly; | |
InP->portarrayType.msgtl_number = portarrayCnt; | |
- msgh_size_delta = (InP->portarrayType.msgtl_header.msgt_inline) ? (4 * portarrayCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (InP->portarrayType.msgtl_header.msgt_inline) ? 8 * portarrayCnt : sizeof(mach_port_t *); | |
msgh_size += msgh_size_delta; | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->intarrayType = intarrayType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_identity.c 2023-11-24 15:41:07.351122576 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_identity.c 2023-11-24 15:49:28.340088429 -0500 | |
@@ -70,11 +70,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t idportType; | |
- mach_port_t idport; | |
- char idportPad[4]; | |
+ mach_port_name_inlined_t idport; | |
mach_msg_type_t fsidportType; | |
- mach_port_t fsidport; | |
- char fsidportPad[4]; | |
+ mach_port_name_inlined_t fsidport; | |
mach_msg_type_t filenoType; | |
ino64_t fileno; | |
} Reply; | |
@@ -107,7 +105,7 @@ | |
const mach_msg_type_t idportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -117,7 +115,7 @@ | |
const mach_msg_type_t fsidportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -186,14 +184,14 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *idport = OutP->idport; | |
+ *idport = OutP->idport.name; | |
#if TypeCheck | |
if (BAD_TYPECHECK (&OutP->fsidportType, &fsidportCheck)) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *fsidport = OutP->fsidport; | |
+ *fsidport = OutP->fsidport.name; | |
#if TypeCheck | |
if (BAD_TYPECHECK (&OutP->filenoType, &filenoCheck)) | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_term_on_machdev.c 2023-11-24 15:41:07.263124512 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_term_on_machdev.c 2023-11-24 15:49:28.248090456 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t machdevType; | |
- mach_port_t machdev; | |
- char machdevPad[4]; | |
+ mach_port_name_inlined_t machdev; | |
} Request; | |
typedef struct { | |
@@ -84,14 +83,14 @@ | |
const mach_msg_type_t machdevType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -105,7 +104,7 @@ | |
InP->machdevType = machdevType; | |
- InP->machdev = machdev; | |
+ InP->machdev.name = machdev; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_fsys_get_options.c 2023-11-24 15:41:07.239125042 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_fsys_get_options.c 2023-11-24 15:49:28.208091337 -0500 | |
@@ -160,14 +160,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->optionsType.msgtl_header.msgt_inline) | |
- *options = OutP->optionsP; | |
+ *options = OutP->optionsP; | |
else if (OutP->optionsType.msgtl_number > *optionsCnt) { | |
- __mig_allocate((vm_offset_t *)options, | |
- OutP->optionsType.msgtl_number); | |
- memcpy(*options, OutP->options, OutP->optionsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)options, OutP->optionsType.msgtl_number); | |
+ memcpy(*options, OutP->options, OutP->optionsType.msgtl_number); | |
} | |
else if (OutP->optionsType.msgtl_number) { | |
- memcpy(*options, OutP->options, OutP->optionsType.msgtl_number); | |
+ memcpy(*options, OutP->options, OutP->optionsType.msgtl_number); | |
} | |
*optionsCnt = OutP->optionsType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_release_conch_request.c 2023-11-24 15:41:07.315123368 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_release_conch_request.c 2023-11-24 15:49:28.328088694 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
} Request; | |
union { | |
@@ -73,18 +72,18 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_getfh.c 2023-11-24 15:41:07.279124160 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_getfh.c 2023-11-24 15:49:28.276089840 -0500 | |
@@ -160,14 +160,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->filehandleType.msgtl_header.msgt_inline) | |
- *filehandle = OutP->filehandleP; | |
+ *filehandle = OutP->filehandleP; | |
else if (OutP->filehandleType.msgtl_number > *filehandleCnt) { | |
- __mig_allocate((vm_offset_t *)filehandle, | |
- OutP->filehandleType.msgtl_number); | |
- memcpy(*filehandle, OutP->filehandle, OutP->filehandleType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)filehandle, OutP->filehandleType.msgtl_number); | |
+ memcpy(*filehandle, OutP->filehandle, OutP->filehandleType.msgtl_number); | |
} | |
else if (OutP->filehandleType.msgtl_number) { | |
- memcpy(*filehandle, OutP->filehandle, OutP->filehandleType.msgtl_number); | |
+ memcpy(*filehandle, OutP->filehandle, OutP->filehandleType.msgtl_number); | |
} | |
*filehandleCnt = OutP->filehandleType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_exec_startup_get_info.c 2023-11-24 15:41:07.183126274 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_exec_startup_get_info.c 2023-11-24 15:49:28.156092483 -0500 | |
@@ -106,12 +106,12 @@ | |
}; | |
mach_msg_type_long_t dtableType; | |
union { | |
- mach_port_t dtable[512]; | |
+ mach_port_name_inlined_t dtable[256]; | |
mach_port_t *dtableP; | |
}; | |
mach_msg_type_long_t portarrayType; | |
union { | |
- mach_port_t portarray[512]; | |
+ mach_port_name_inlined_t portarray[256]; | |
mach_port_t *portarrayP; | |
}; | |
mach_msg_type_long_t intarrayType; | |
@@ -311,14 +311,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->argvType.msgtl_header.msgt_inline) | |
- *argv = OutP->argvP; | |
+ *argv = OutP->argvP; | |
else if (OutP->argvType.msgtl_number > *argvCnt) { | |
- __mig_allocate((vm_offset_t *)argv, | |
- OutP->argvType.msgtl_number); | |
- memcpy(*argv, OutP->argv, OutP->argvType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)argv, OutP->argvType.msgtl_number); | |
+ memcpy(*argv, OutP->argv, OutP->argvType.msgtl_number); | |
} | |
else if (OutP->argvType.msgtl_number) { | |
- memcpy(*argv, OutP->argv, OutP->argvType.msgtl_number); | |
+ memcpy(*argv, OutP->argv, OutP->argvType.msgtl_number); | |
} | |
*argvCnt = OutP->argvType.msgtl_number; | |
@@ -340,14 +339,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->envpType.msgtl_header.msgt_inline) | |
- *envp = OutP->envpP; | |
+ *envp = OutP->envpP; | |
else if (OutP->envpType.msgtl_number > *envpCnt) { | |
- __mig_allocate((vm_offset_t *)envp, | |
- OutP->envpType.msgtl_number); | |
- memcpy(*envp, OutP->envp, OutP->envpType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)envp, OutP->envpType.msgtl_number); | |
+ memcpy(*envp, OutP->envp, OutP->envpType.msgtl_number); | |
} | |
else if (OutP->envpType.msgtl_number) { | |
- memcpy(*envp, OutP->envp, OutP->envpType.msgtl_number); | |
+ memcpy(*envp, OutP->envp, OutP->envpType.msgtl_number); | |
} | |
*envpCnt = OutP->envpType.msgtl_number; | |
@@ -357,11 +355,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((OutP->dtableType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->dtableType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->dtableType.msgtl_size != 32))) | |
+ (OutP->dtableType.msgtl_size != 64 && OutP->dtableType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->dtableType.msgtl_size != 32 && OutP->dtableType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (OutP->dtableType.msgtl_header.msgt_inline) ? (4 * OutP->dtableType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (OutP->dtableType.msgtl_header.msgt_inline) ? 8 * OutP->dtableType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 184 + msgh_size_delta)) | |
return MIG_TYPE_ERROR; | |
@@ -369,14 +368,23 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->dtableType.msgtl_header.msgt_inline) | |
- *dtable = OutP->dtableP; | |
+ *dtable = OutP->dtableP; | |
else if (OutP->dtableType.msgtl_number > *dtableCnt) { | |
- __mig_allocate((vm_offset_t *)dtable, | |
- 4 * OutP->dtableType.msgtl_number); | |
- memcpy(*dtable, OutP->dtable, 4 * OutP->dtableType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)dtable, 4 * OutP->dtableType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_dtable = (mach_port_name_inlined_t *)OutP->dtable; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->dtableType.msgtl_number; i++) { | |
+ (*dtable)[i] = inlined_dtable[i].name; | |
+ } | |
} | |
else if (OutP->dtableType.msgtl_number) { | |
- memcpy(*dtable, OutP->dtable, 4 * OutP->dtableType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_dtable = (mach_port_name_inlined_t *)OutP->dtable; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->dtableType.msgtl_number; i++) { | |
+ (*dtable)[i] = inlined_dtable[i].name; | |
+ } | |
} | |
*dtableCnt = OutP->dtableType.msgtl_number; | |
@@ -386,11 +394,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((OutP->portarrayType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->portarrayType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->portarrayType.msgtl_size != 32))) | |
+ (OutP->portarrayType.msgtl_size != 64 && OutP->portarrayType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->portarrayType.msgtl_size != 32 && OutP->portarrayType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (OutP->portarrayType.msgtl_header.msgt_inline) ? (4 * OutP->portarrayType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (OutP->portarrayType.msgtl_header.msgt_inline) ? 8 * OutP->portarrayType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 184 + msgh_size_delta)) | |
return MIG_TYPE_ERROR; | |
@@ -398,14 +407,23 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->portarrayType.msgtl_header.msgt_inline) | |
- *portarray = OutP->portarrayP; | |
+ *portarray = OutP->portarrayP; | |
else if (OutP->portarrayType.msgtl_number > *portarrayCnt) { | |
- __mig_allocate((vm_offset_t *)portarray, | |
- 4 * OutP->portarrayType.msgtl_number); | |
- memcpy(*portarray, OutP->portarray, 4 * OutP->portarrayType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)portarray, 4 * OutP->portarrayType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_portarray = (mach_port_name_inlined_t *)OutP->portarray; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portarrayType.msgtl_number; i++) { | |
+ (*portarray)[i] = inlined_portarray[i].name; | |
+ } | |
} | |
else if (OutP->portarrayType.msgtl_number) { | |
- memcpy(*portarray, OutP->portarray, 4 * OutP->portarrayType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_portarray = (mach_port_name_inlined_t *)OutP->portarray; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portarrayType.msgtl_number; i++) { | |
+ (*portarray)[i] = inlined_portarray[i].name; | |
+ } | |
} | |
*portarrayCnt = OutP->portarrayType.msgtl_number; | |
@@ -425,14 +443,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->intarrayType.msgtl_header.msgt_inline) | |
- *intarray = OutP->intarrayP; | |
+ *intarray = OutP->intarrayP; | |
else if (OutP->intarrayType.msgtl_number > *intarrayCnt) { | |
- __mig_allocate((vm_offset_t *)intarray, | |
- 4 * OutP->intarrayType.msgtl_number); | |
- memcpy(*intarray, OutP->intarray, 4 * OutP->intarrayType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)intarray, 4 * OutP->intarrayType.msgtl_number); | |
+ memcpy(*intarray, OutP->intarray, 4 * OutP->intarrayType.msgtl_number); | |
} | |
else if (OutP->intarrayType.msgtl_number) { | |
- memcpy(*intarray, OutP->intarray, 4 * OutP->intarrayType.msgtl_number); | |
+ memcpy(*intarray, OutP->intarray, 4 * OutP->intarrayType.msgtl_number); | |
} | |
*intarrayCnt = OutP->intarrayType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_getlinknode.c 2023-11-24 15:41:07.275124249 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_getlinknode.c 2023-11-24 15:49:28.260090192 -0500 | |
@@ -68,8 +68,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t linknodeType; | |
- mach_port_t linknode; | |
- char linknodePad[4]; | |
+ mach_port_name_inlined_t linknode; | |
} Reply; | |
union { | |
@@ -100,7 +99,7 @@ | |
const mach_msg_type_t linknodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -159,7 +158,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *linknode = OutP->linknode; | |
+ *linknode = OutP->linknode.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_map_cntl.c 2023-11-24 15:41:07.291123896 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_map_cntl.c 2023-11-24 15:49:28.284089663 -0500 | |
@@ -68,8 +68,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t memobjType; | |
- mach_port_t memobj; | |
- char memobjPad[4]; | |
+ mach_port_name_inlined_t memobj; | |
} Reply; | |
union { | |
@@ -100,7 +99,7 @@ | |
const mach_msg_type_t memobjCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -159,7 +158,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *memobj = OutP->memobj; | |
+ *memobj = OutP->memobj.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_server_version_request.c 2023-11-24 15:41:07.299123721 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_server_version_request.c 2023-11-24 15:49:28.300089311 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
} Request; | |
union { | |
@@ -73,18 +72,18 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getmsgport.c 2023-11-24 15:41:07.219125482 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getmsgport.c 2023-11-24 15:49:28.200091513 -0500 | |
@@ -72,8 +72,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t msgportType; | |
- mach_port_t msgport; | |
- char msgportPad[4]; | |
+ mach_port_name_inlined_t msgport; | |
} Reply; | |
union { | |
@@ -115,7 +114,7 @@ | |
const mach_msg_type_t msgportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -178,7 +177,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *msgport = OutP->msgport; | |
+ *msgport = OutP->msgport.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_fabricate_address.c 2023-11-24 15:41:07.279124160 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_fabricate_address.c 2023-11-24 15:49:28.256090279 -0500 | |
@@ -72,8 +72,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t addrType; | |
- mach_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Reply; | |
union { | |
@@ -115,7 +114,7 @@ | |
const mach_msg_type_t addrCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -178,7 +177,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *addr = OutP->addr; | |
+ *addr = OutP->addr.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_termctty_open_terminal.c 2023-11-24 15:41:07.271124337 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_termctty_open_terminal.c 2023-11-24 15:49:28.260090192 -0500 | |
@@ -72,8 +72,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t terminalType; | |
- mach_port_t terminal; | |
- char terminalPad[4]; | |
+ mach_port_name_inlined_t terminal; | |
} Reply; | |
union { | |
@@ -115,7 +114,7 @@ | |
const mach_msg_type_t terminalCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -178,7 +177,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *terminal = OutP->terminal; | |
+ *terminal = OutP->terminal.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_pid2task.c 2023-11-24 15:41:07.263124512 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_pid2task.c 2023-11-24 15:49:28.248090456 -0500 | |
@@ -72,8 +72,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
} Reply; | |
union { | |
@@ -115,7 +114,7 @@ | |
const mach_msg_type_t taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -178,7 +177,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *task = OutP->task; | |
+ *task = OutP->task.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_startup_reboot.c 2023-11-24 15:41:07.159126803 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_startup_reboot.c 2023-11-24 15:49:28.128093099 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t reboot_codeType; | |
int reboot_code; | |
char reboot_codePad[4]; | |
@@ -87,14 +86,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t reboot_codeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -119,7 +118,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->reboot_codeType = reboot_codeType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_restrict_auth.c 2023-11-24 15:41:07.275124249 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_restrict_auth.c 2023-11-24 15:49:28.264090104 -0500 | |
@@ -82,8 +82,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t new_objectType; | |
- mach_port_t new_object; | |
- char new_objectPad[4]; | |
+ mach_port_name_inlined_t new_object; | |
} Reply; | |
union { | |
@@ -135,7 +134,7 @@ | |
const mach_msg_type_t new_objectCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -226,7 +225,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *new_object = OutP->new_object; | |
+ *new_object = OutP->new_object.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_fsys_startup.c 2023-11-24 15:41:07.199125922 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_fsys_startup.c 2023-11-24 15:49:28.168092218 -0500 | |
@@ -67,8 +67,7 @@ | |
int openflags; | |
char openflagsPad[4]; | |
mach_msg_type_t control_portType; | |
- mach_port_t control_port; | |
- char control_portPad[4]; | |
+ mach_port_name_inlined_t control_port; | |
} Request; | |
typedef struct { | |
@@ -77,8 +76,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t realnodeType; | |
- mach_port_t realnode; | |
- char realnodePad[4]; | |
+ mach_port_name_inlined_t realnode; | |
} Reply; | |
union { | |
@@ -108,14 +106,14 @@ | |
const mach_msg_type_t control_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -129,7 +127,7 @@ | |
const mach_msg_type_t realnodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -143,7 +141,7 @@ | |
InP->control_portType = control_portType; | |
- InP->control_port = control_port; | |
+ InP->control_port.name = control_port; | |
if (MACH_MSG_TYPE_PORT_ANY(control_portPoly)) | |
msgh_simple = FALSE; | |
@@ -203,7 +201,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *realnode = OutP->realnode; | |
+ *realnode = OutP->realnode.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_set_env_variable.c 2023-11-24 15:41:07.255124689 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_set_env_variable.c 2023-11-24 15:49:28.240090632 -0500 | |
@@ -63,8 +63,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t variableType; | |
string_t variable; | |
mach_msg_type_t valueType; | |
@@ -93,14 +92,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t variableType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_STRING_C, | |
@@ -147,7 +146,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->variableType = variableType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_get_openmodes_request.c 2023-11-24 15:41:07.259124601 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_get_openmodes_request.c 2023-11-24 15:49:28.240090632 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
} Request; | |
union { | |
@@ -73,18 +72,18 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_get_owner_request.c 2023-11-24 15:41:07.279124160 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_get_owner_request.c 2023-11-24 15:49:28.268090015 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
} Request; | |
union { | |
@@ -73,18 +72,18 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_getcontrol.c 2023-11-24 15:41:07.251124777 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_getcontrol.c 2023-11-24 15:49:28.236090720 -0500 | |
@@ -68,8 +68,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t controlType; | |
- mach_port_t control; | |
- char controlPad[4]; | |
+ mach_port_name_inlined_t control; | |
} Reply; | |
union { | |
@@ -100,7 +99,7 @@ | |
const mach_msg_type_t controlCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -159,7 +158,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *control = OutP->control; | |
+ *control = OutP->control.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_fsys_getpriv.c 2023-11-24 15:41:07.223125393 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_fsys_getpriv.c 2023-11-24 15:49:28.192091690 -0500 | |
@@ -70,14 +70,11 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t host_privType; | |
- mach_port_t host_priv; | |
- char host_privPad[4]; | |
+ mach_port_name_inlined_t host_priv; | |
mach_msg_type_t device_masterType; | |
- mach_port_t device_master; | |
- char device_masterPad[4]; | |
+ mach_port_name_inlined_t device_master; | |
mach_msg_type_t fstaskType; | |
- mach_port_t fstask; | |
- char fstaskPad[4]; | |
+ mach_port_name_inlined_t fstask; | |
} Reply; | |
union { | |
@@ -108,7 +105,7 @@ | |
const mach_msg_type_t host_privCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -118,7 +115,7 @@ | |
const mach_msg_type_t device_masterCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -128,7 +125,7 @@ | |
const mach_msg_type_t fstaskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -187,21 +184,21 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *host_priv = OutP->host_priv; | |
+ *host_priv = OutP->host_priv.name; | |
#if TypeCheck | |
if (BAD_TYPECHECK (&OutP->device_masterType, &device_masterCheck)) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *device_master = OutP->device_master; | |
+ *device_master = OutP->device_master.name; | |
#if TypeCheck | |
if (BAD_TYPECHECK (&OutP->fstaskType, &fstaskCheck)) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *fstask = OutP->fstask; | |
+ *fstask = OutP->fstask.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_exec_setexecdata.c 2023-11-24 15:41:07.187126187 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_exec_setexecdata.c 2023-11-24 15:49:28.164092306 -0500 | |
@@ -66,7 +66,7 @@ | |
mach_msg_header_t Head; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
const mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t intsType; | |
@@ -89,8 +89,8 @@ | |
const mach_msg_type_long_t portsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -112,13 +112,22 @@ | |
InP->portsType = portsType; | |
- if (portsCnt > 512) { | |
+ if (portsCnt > 256) { | |
InP->portsType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->portsType.msgtl_header.msgt_size = 32; | |
InP->portsP = ports; | |
msgh_simple = FALSE; | |
} | |
else if (portsCnt) { | |
- memcpy(InP->ports, ports, 4 * portsCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)InP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < portsCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_ports[i].kernel_port_do_not_use = 0; | |
+ inlined_ports[i].name = (ports)[i]; | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(portsPoly)) | |
@@ -128,7 +137,7 @@ | |
InP->portsType.msgtl_number = portsCnt; | |
- msgh_size_delta = (InP->portsType.msgtl_header.msgt_inline) ? (4 * portsCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (InP->portsType.msgtl_header.msgt_inline) ? 8 * portsCnt : sizeof(mach_port_t *); | |
msgh_size = 48 + msgh_size_delta; | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->intsType = intsType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_postnotify_request.c 2023-11-24 15:41:07.327123104 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_postnotify_request.c 2023-11-24 15:49:28.344088341 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
mach_msg_type_t write_startType; | |
vm_offset_t write_start; | |
mach_msg_type_t write_endType; | |
@@ -79,14 +78,14 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t write_startType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -112,7 +111,7 @@ | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->write_startType = write_startType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_map_request.c 2023-11-24 15:41:07.307123544 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_map_request.c 2023-11-24 15:49:28.304089222 -0500 | |
@@ -60,8 +60,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
} Request; | |
union { | |
@@ -73,18 +72,18 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_get_translator.c 2023-11-24 15:41:07.327123104 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_get_translator.c 2023-11-24 15:49:28.344088341 -0500 | |
@@ -160,14 +160,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->translatorType.msgtl_header.msgt_inline) | |
- *translator = OutP->translatorP; | |
+ *translator = OutP->translatorP; | |
else if (OutP->translatorType.msgtl_number > *translatorCnt) { | |
- __mig_allocate((vm_offset_t *)translator, | |
- OutP->translatorType.msgtl_number); | |
- memcpy(*translator, OutP->translator, OutP->translatorType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)translator, OutP->translatorType.msgtl_number); | |
+ memcpy(*translator, OutP->translator, OutP->translatorType.msgtl_number); | |
} | |
else if (OutP->translatorType.msgtl_number) { | |
- memcpy(*translator, OutP->translator, OutP->translatorType.msgtl_number); | |
+ memcpy(*translator, OutP->translator, OutP->translatorType.msgtl_number); | |
} | |
*translatorCnt = OutP->translatorType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_get_env_variable.c 2023-11-24 15:41:07.247124865 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_get_env_variable.c 2023-11-24 15:49:28.236090720 -0500 | |
@@ -177,14 +177,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->valueType.msgtl_header.msgt_inline) | |
- *value = OutP->valueP; | |
+ *value = OutP->valueP; | |
else if (OutP->valueType.msgtl_number > *valueCnt) { | |
- __mig_allocate((vm_offset_t *)value, | |
- OutP->valueType.msgtl_number); | |
- memcpy(*value, OutP->value, OutP->valueType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)value, OutP->valueType.msgtl_number); | |
+ memcpy(*value, OutP->value, OutP->valueType.msgtl_number); | |
} | |
else if (OutP->valueType.msgtl_number) { | |
- memcpy(*value, OutP->value, OutP->valueType.msgtl_number); | |
+ memcpy(*value, OutP->value, OutP->valueType.msgtl_number); | |
} | |
*valueCnt = OutP->valueType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_describe_ports.c 2023-11-24 15:41:07.267124425 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_describe_ports.c 2023-11-24 15:49:28.256090279 -0500 | |
@@ -64,8 +64,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t namesType; | |
union { | |
mach_port_name_t names[512]; | |
@@ -101,14 +100,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t namesType = { | |
.msgtl_header = { | |
@@ -134,7 +133,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->namesType = namesType; | |
@@ -207,14 +206,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->descriptionsType.msgtl_header.msgt_inline) | |
- *descriptions = OutP->descriptionsP; | |
+ *descriptions = OutP->descriptionsP; | |
else if (OutP->descriptionsType.msgtl_number > *descriptionsCnt) { | |
- __mig_allocate((vm_offset_t *)descriptions, | |
- OutP->descriptionsType.msgtl_number); | |
- memcpy(*descriptions, OutP->descriptions, OutP->descriptionsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)descriptions, OutP->descriptionsType.msgtl_number); | |
+ memcpy(*descriptions, OutP->descriptions, OutP->descriptionsType.msgtl_number); | |
} | |
else if (OutP->descriptionsType.msgtl_number) { | |
- memcpy(*descriptions, OutP->descriptions, OutP->descriptionsType.msgtl_number); | |
+ memcpy(*descriptions, OutP->descriptions, OutP->descriptionsType.msgtl_number); | |
} | |
*descriptionsCnt = OutP->descriptionsType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getprocinfo.c 2023-11-24 15:41:07.291123896 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getprocinfo.c 2023-11-24 15:49:28.276089840 -0500 | |
@@ -228,14 +228,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->procinfoType.msgtl_header.msgt_inline) | |
- *procinfo = OutP->procinfoP; | |
+ *procinfo = OutP->procinfoP; | |
else if (OutP->procinfoType.msgtl_number > *procinfoCnt) { | |
- __mig_allocate((vm_offset_t *)procinfo, | |
- 4 * OutP->procinfoType.msgtl_number); | |
- memcpy(*procinfo, OutP->procinfo, 4 * OutP->procinfoType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)procinfo, 4 * OutP->procinfoType.msgtl_number); | |
+ memcpy(*procinfo, OutP->procinfo, 4 * OutP->procinfoType.msgtl_number); | |
} | |
else if (OutP->procinfoType.msgtl_number) { | |
- memcpy(*procinfo, OutP->procinfo, 4 * OutP->procinfoType.msgtl_number); | |
+ memcpy(*procinfo, OutP->procinfo, 4 * OutP->procinfoType.msgtl_number); | |
} | |
*procinfoCnt = OutP->procinfoType.msgtl_number; | |
@@ -255,14 +254,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->threadwaitsType.msgtl_header.msgt_inline) | |
- *threadwaits = OutP->threadwaitsP; | |
+ *threadwaits = OutP->threadwaitsP; | |
else if (OutP->threadwaitsType.msgtl_number > *threadwaitsCnt) { | |
- __mig_allocate((vm_offset_t *)threadwaits, | |
- OutP->threadwaitsType.msgtl_number); | |
- memcpy(*threadwaits, OutP->threadwaits, OutP->threadwaitsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)threadwaits, OutP->threadwaitsType.msgtl_number); | |
+ memcpy(*threadwaits, OutP->threadwaits, OutP->threadwaitsType.msgtl_number); | |
} | |
else if (OutP->threadwaitsType.msgtl_number) { | |
- memcpy(*threadwaits, OutP->threadwaits, OutP->threadwaitsType.msgtl_number); | |
+ memcpy(*threadwaits, OutP->threadwaits, OutP->threadwaitsType.msgtl_number); | |
} | |
*threadwaitsCnt = OutP->threadwaitsType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_task2proc.c 2023-11-24 15:41:07.275124249 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_task2proc.c 2023-11-24 15:49:28.260090192 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
} Request; | |
typedef struct { | |
@@ -72,8 +71,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t procType; | |
- mach_port_t proc; | |
- char procPad[4]; | |
+ mach_port_name_inlined_t proc; | |
} Reply; | |
union { | |
@@ -94,14 +92,14 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -115,7 +113,7 @@ | |
const mach_msg_type_t procCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -125,7 +123,7 @@ | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -178,7 +176,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *proc = OutP->proc; | |
+ *proc = OutP->proc.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_get_environment.c 2023-11-24 15:41:07.239125042 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_get_environment.c 2023-11-24 15:49:28.228090897 -0500 | |
@@ -159,14 +159,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->valueType.msgtl_header.msgt_inline) | |
- *value = OutP->valueP; | |
+ *value = OutP->valueP; | |
else if (OutP->valueType.msgtl_number > *valueCnt) { | |
- __mig_allocate((vm_offset_t *)value, | |
- OutP->valueType.msgtl_number); | |
- memcpy(*value, OutP->value, OutP->valueType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)value, OutP->valueType.msgtl_number); | |
+ memcpy(*value, OutP->value, OutP->valueType.msgtl_number); | |
} | |
else if (OutP->valueType.msgtl_number) { | |
- memcpy(*value, OutP->value, OutP->valueType.msgtl_number); | |
+ memcpy(*value, OutP->value, OutP->valueType.msgtl_number); | |
} | |
*valueCnt = OutP->valueType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getsessionpgids.c 2023-11-24 15:41:07.335122928 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getsessionpgids.c 2023-11-24 15:49:28.324088781 -0500 | |
@@ -179,14 +179,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->pgidsetType.msgtl_header.msgt_inline) | |
- *pgidset = OutP->pgidsetP; | |
+ *pgidset = OutP->pgidsetP; | |
else if (OutP->pgidsetType.msgtl_number > *pgidsetCnt) { | |
- __mig_allocate((vm_offset_t *)pgidset, | |
- 4 * OutP->pgidsetType.msgtl_number); | |
- memcpy(*pgidset, OutP->pgidset, 4 * OutP->pgidsetType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)pgidset, 4 * OutP->pgidsetType.msgtl_number); | |
+ memcpy(*pgidset, OutP->pgidset, 4 * OutP->pgidsetType.msgtl_number); | |
} | |
else if (OutP->pgidsetType.msgtl_number) { | |
- memcpy(*pgidset, OutP->pgidset, 4 * OutP->pgidsetType.msgtl_number); | |
+ memcpy(*pgidset, OutP->pgidset, 4 * OutP->pgidsetType.msgtl_number); | |
} | |
*pgidsetCnt = OutP->pgidsetType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_create_address.c 2023-11-24 15:41:07.275124249 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_create_address.c 2023-11-24 15:49:28.252090368 -0500 | |
@@ -79,8 +79,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t addrType; | |
- mach_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Reply; | |
union { | |
@@ -130,7 +129,7 @@ | |
const mach_msg_type_t addrCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -208,7 +207,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *addr = OutP->addr; | |
+ *addr = OutP->addr.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_get_icky_async_id_reply.c 2023-11-24 15:41:07.267124425 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_get_icky_async_id_reply.c 2023-11-24 15:49:28.236090720 -0500 | |
@@ -66,8 +66,7 @@ | |
kern_return_t return_code; | |
char return_codePad[4]; | |
mach_msg_type_t id_portType; | |
- mach_port_t id_port; | |
- char id_portPad[4]; | |
+ mach_port_name_inlined_t id_port; | |
} Request; | |
union { | |
@@ -91,14 +90,14 @@ | |
const mach_msg_type_t id_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
if (MACH_MSG_TYPE_PORT_ANY(replyPoly)) | |
msgh_simple = FALSE; | |
@@ -109,7 +108,7 @@ | |
InP->id_portType = id_portType; | |
- InP->id_port = id_port; | |
+ InP->id_port.name = id_port; | |
if (MACH_MSG_TYPE_PORT_ANY(id_portPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_map.c 2023-11-24 15:41:07.287123985 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_map.c 2023-11-24 15:49:28.276089840 -0500 | |
@@ -69,11 +69,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t memobjrdType; | |
- mach_port_t memobjrd; | |
- char memobjrdPad[4]; | |
+ mach_port_name_inlined_t memobjrd; | |
mach_msg_type_t memobjwtType; | |
- mach_port_t memobjwt; | |
- char memobjwtPad[4]; | |
+ mach_port_name_inlined_t memobjwt; | |
} Reply; | |
union { | |
@@ -104,7 +102,7 @@ | |
const mach_msg_type_t memobjrdCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -114,7 +112,7 @@ | |
const mach_msg_type_t memobjwtCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -173,14 +171,14 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *memobjrd = OutP->memobjrd; | |
+ *memobjrd = OutP->memobjrd.name; | |
#if TypeCheck | |
if (BAD_TYPECHECK (&OutP->memobjwtType, &memobjwtCheck)) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *memobjwt = OutP->memobjwt; | |
+ *memobjwt = OutP->memobjwt.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_get_init_port.c 2023-11-24 15:41:07.195126010 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_get_init_port.c 2023-11-24 15:49:28.168092218 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
@@ -75,8 +74,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Reply; | |
union { | |
@@ -97,14 +95,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t whichType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -129,7 +127,7 @@ | |
const mach_msg_type_t portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -139,7 +137,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->whichType = whichType; | |
@@ -196,7 +194,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *port = OutP->port; | |
+ *port = OutP->port.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_set_init_task.c 2023-11-24 15:41:07.391121695 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_set_init_task.c 2023-11-24 15:49:28.392087284 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
} Request; | |
typedef struct { | |
@@ -84,14 +83,14 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -105,7 +104,7 @@ | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_get_icky_async_id.c 2023-11-24 15:41:07.255124689 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_get_icky_async_id.c 2023-11-24 15:49:28.244090544 -0500 | |
@@ -68,8 +68,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t icky_async_id_portType; | |
- mach_port_t icky_async_id_port; | |
- char icky_async_id_portPad[4]; | |
+ mach_port_name_inlined_t icky_async_id_port; | |
} Reply; | |
union { | |
@@ -100,7 +99,7 @@ | |
const mach_msg_type_t icky_async_id_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -159,7 +158,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *icky_async_id_port = OutP->icky_async_id_port; | |
+ *icky_async_id_port = OutP->icky_async_id_port.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_exec_exec.c 2023-11-24 15:41:07.179126362 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_exec_exec.c 2023-11-24 15:49:28.156092483 -0500 | |
@@ -80,11 +80,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t fileType; | |
- mach_port_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
mach_msg_type_t oldtaskType; | |
- mach_port_t oldtask; | |
- char oldtaskPad[4]; | |
+ mach_port_name_inlined_t oldtask; | |
mach_msg_type_t flagsType; | |
int flags; | |
char flagsPad[4]; | |
@@ -100,12 +98,12 @@ | |
}; | |
mach_msg_type_long_t dtableType; | |
union { | |
- mach_port_t dtable[512]; | |
+ mach_port_name_inlined_t dtable[256]; | |
const mach_port_t *dtableP; | |
}; | |
mach_msg_type_long_t portarrayType; | |
union { | |
- mach_port_t portarray[512]; | |
+ mach_port_name_inlined_t portarray[256]; | |
const mach_port_t *portarrayP; | |
}; | |
mach_msg_type_long_t intarrayType; | |
@@ -146,25 +144,25 @@ | |
const mach_msg_type_t fileType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t oldtaskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t flagsType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -204,8 +202,8 @@ | |
const mach_msg_type_long_t dtableType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -216,8 +214,8 @@ | |
const mach_msg_type_long_t portarrayType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -273,13 +271,13 @@ | |
InP->fileType = fileType; | |
- InP->file = file; | |
+ InP->file.name = file; | |
InP->fileType.msgt_name = filePoly; | |
InP->oldtaskType = oldtaskType; | |
- InP->oldtask = oldtask; | |
+ InP->oldtask.name = oldtask; | |
InP->flagsType = flagsType; | |
@@ -317,36 +315,54 @@ | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->dtableType = dtableType; | |
- if (dtableCnt > 512) { | |
+ if (dtableCnt > 256) { | |
InP->dtableType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->dtableType.msgtl_header.msgt_size = 32; | |
InP->dtableP = dtable; | |
} | |
else if (dtableCnt) { | |
- memcpy(InP->dtable, dtable, 4 * dtableCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_dtable = (mach_port_name_inlined_t *)InP->dtable; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < dtableCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_dtable[i].kernel_port_do_not_use = 0; | |
+ inlined_dtable[i].name = (dtable)[i]; | |
+ } | |
} | |
InP->dtableType.msgtl_name = dtablePoly; | |
InP->dtableType.msgtl_number = dtableCnt; | |
- msgh_size_delta = (InP->dtableType.msgtl_header.msgt_inline) ? (4 * dtableCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (InP->dtableType.msgtl_header.msgt_inline) ? 8 * dtableCnt : sizeof(mach_port_t *); | |
msgh_size += msgh_size_delta; | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->portarrayType = portarrayType; | |
- if (portarrayCnt > 512) { | |
+ if (portarrayCnt > 256) { | |
InP->portarrayType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->portarrayType.msgtl_header.msgt_size = 32; | |
InP->portarrayP = portarray; | |
} | |
else if (portarrayCnt) { | |
- memcpy(InP->portarray, portarray, 4 * portarrayCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_portarray = (mach_port_name_inlined_t *)InP->portarray; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < portarrayCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_portarray[i].kernel_port_do_not_use = 0; | |
+ inlined_portarray[i].name = (portarray)[i]; | |
+ } | |
} | |
InP->portarrayType.msgtl_name = portarrayPoly; | |
InP->portarrayType.msgtl_number = portarrayCnt; | |
- msgh_size_delta = (InP->portarrayType.msgtl_header.msgt_inline) ? (4 * portarrayCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (InP->portarrayType.msgtl_header.msgt_inline) ? 8 * portarrayCnt : sizeof(mach_port_t *); | |
msgh_size += msgh_size_delta; | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->intarrayType = intarrayType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_create.c 2023-11-24 15:41:07.239125042 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_socket_create.c 2023-11-24 15:49:28.216091161 -0500 | |
@@ -76,8 +76,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t sockType; | |
- mach_port_t sock; | |
- char sockPad[4]; | |
+ mach_port_name_inlined_t sock; | |
} Reply; | |
union { | |
@@ -130,7 +129,7 @@ | |
const mach_msg_type_t sockCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -197,7 +196,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *sock = OutP->sock; | |
+ *sock = OutP->sock.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_set_init_ports.c 2023-11-24 15:41:07.207125746 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_set_init_ports.c 2023-11-24 15:49:28.188091777 -0500 | |
@@ -63,11 +63,10 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
const mach_port_t *portsP; | |
}; | |
} Request; | |
@@ -92,20 +91,20 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t portsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -125,23 +124,32 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->portsType = portsType; | |
- if (portsCnt > 512) { | |
+ if (portsCnt > 256) { | |
InP->portsType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->portsType.msgtl_header.msgt_size = 32; | |
InP->portsP = ports; | |
} | |
else if (portsCnt) { | |
- memcpy(InP->ports, ports, 4 * portsCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)InP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < portsCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_ports[i].kernel_port_do_not_use = 0; | |
+ inlined_ports[i].name = (ports)[i]; | |
+ } | |
} | |
InP->portsType.msgtl_name = portsPoly; | |
InP->portsType.msgtl_number = portsCnt; | |
- msgh_size = 56 + ((InP->portsType.msgtl_header.msgt_inline) ? (4 * portsCnt + 7) & ~7 : sizeof(mach_port_t *)); | |
+ msgh_size = 56 + ((InP->portsType.msgtl_header.msgt_inline) ? 8 * portsCnt : sizeof(mach_port_t *)); | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
/* msgh_size filled below */ | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_get_init_ints.c 2023-11-24 15:41:07.219125482 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_get_init_ints.c 2023-11-24 15:49:28.196091602 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -96,14 +95,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -117,7 +116,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -178,14 +177,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->valuesType.msgtl_header.msgt_inline) | |
- *values = OutP->valuesP; | |
+ *values = OutP->valuesP; | |
else if (OutP->valuesType.msgtl_number > *valuesCnt) { | |
- __mig_allocate((vm_offset_t *)values, | |
- 4 * OutP->valuesType.msgtl_number); | |
- memcpy(*values, OutP->values, 4 * OutP->valuesType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)values, 4 * OutP->valuesType.msgtl_number); | |
+ memcpy(*values, OutP->values, 4 * OutP->valuesType.msgtl_number); | |
} | |
else if (OutP->valuesType.msgtl_number) { | |
- memcpy(*values, OutP->values, 4 * OutP->valuesType.msgtl_number); | |
+ memcpy(*values, OutP->values, 4 * OutP->valuesType.msgtl_number); | |
} | |
*valuesCnt = OutP->valuesType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_reauthenticate_reassign.c 2023-11-24 15:41:07.463120110 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_reauthenticate_reassign.c 2023-11-24 15:49:28.544083936 -0500 | |
@@ -63,11 +63,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t rendezvousType; | |
- mach_port_t rendezvous; | |
- char rendezvousPad[4]; | |
+ mach_port_name_inlined_t rendezvous; | |
mach_msg_type_t new_taskType; | |
- mach_port_t new_task; | |
- char new_taskPad[4]; | |
+ mach_port_name_inlined_t new_task; | |
} Request; | |
union { | |
@@ -79,35 +77,35 @@ | |
const mach_msg_type_t rendezvousType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t new_taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->rendezvousType = rendezvousType; | |
- InP->rendezvous = rendezvous; | |
+ InP->rendezvous.name = rendezvous; | |
InP->rendezvousType.msgt_name = rendezvousPoly; | |
InP->new_taskType = new_taskType; | |
- InP->new_task = new_task; | |
+ InP->new_task.name = new_task; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_write_request.c 2023-11-24 15:41:07.239125042 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_write_request.c 2023-11-24 15:49:28.204091425 -0500 | |
@@ -63,8 +63,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t replyType; | |
- mach_port_t reply; | |
- char replyPad[4]; | |
+ mach_port_name_inlined_t reply; | |
mach_msg_type_long_t dataType; | |
union { | |
char data[2048]; | |
@@ -85,14 +84,14 @@ | |
const mach_msg_type_t replyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MAKE_SEND_ONCE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t dataType = { | |
.msgtl_header = { | |
@@ -119,7 +118,7 @@ | |
InP->replyType = replyType; | |
- InP->reply = reply; | |
+ InP->reply.name = reply; | |
InP->dataType = dataType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_get_init_int.c 2023-11-24 15:41:07.211125657 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_get_init_int.c 2023-11-24 15:49:28.188091777 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
@@ -94,14 +93,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t whichType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -136,7 +135,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->whichType = whichType; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_set_translator.c 2023-11-24 15:41:07.323123192 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_set_translator.c 2023-11-24 15:49:28.336088517 -0500 | |
@@ -81,8 +81,7 @@ | |
const char *passiveP; | |
}; | |
mach_msg_type_t activeType; | |
- mach_port_t active; | |
- char activePad[4]; | |
+ mach_port_name_inlined_t active; | |
} Request; | |
typedef struct { | |
@@ -152,14 +151,14 @@ | |
const mach_msg_type_t activeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -201,7 +200,7 @@ | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->activeType = activeType; | |
- InP->active = active; | |
+ InP->active.name = active; | |
if (MACH_MSG_TYPE_PORT_ANY(activePoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_duplicate.c 2023-11-24 15:41:07.279124160 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_duplicate.c 2023-11-24 15:49:28.268090015 -0500 | |
@@ -68,8 +68,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t newportType; | |
- mach_port_t newport; | |
- char newportPad[4]; | |
+ mach_port_name_inlined_t newport; | |
} Reply; | |
union { | |
@@ -100,7 +99,7 @@ | |
const mach_msg_type_t newportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -159,7 +158,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *newport = OutP->newport; | |
+ *newport = OutP->newport.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getprivports.c 2023-11-24 15:41:07.163126715 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_getprivports.c 2023-11-24 15:49:28.140092835 -0500 | |
@@ -69,11 +69,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t host_privType; | |
- mach_port_t host_priv; | |
- char host_privPad[4]; | |
+ mach_port_name_inlined_t host_priv; | |
mach_msg_type_t device_masterType; | |
- mach_port_t device_master; | |
- char device_masterPad[4]; | |
+ mach_port_name_inlined_t device_master; | |
} Reply; | |
union { | |
@@ -104,7 +102,7 @@ | |
const mach_msg_type_t host_privCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -114,7 +112,7 @@ | |
const mach_msg_type_t device_masterCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -173,14 +171,14 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *host_priv = OutP->host_priv; | |
+ *host_priv = OutP->host_priv.name; | |
#if TypeCheck | |
if (BAD_TYPECHECK (&OutP->device_masterType, &device_masterCheck)) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *device_master = OutP->device_master; | |
+ *device_master = OutP->device_master.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_duplicate_reply.c 2023-11-24 15:41:07.303123632 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_io_duplicate_reply.c 2023-11-24 15:49:28.268090015 -0500 | |
@@ -66,8 +66,7 @@ | |
kern_return_t return_code; | |
char return_codePad[4]; | |
mach_msg_type_t newportType; | |
- mach_port_t newport; | |
- char newportPad[4]; | |
+ mach_port_name_inlined_t newport; | |
} Request; | |
union { | |
@@ -91,14 +90,14 @@ | |
const mach_msg_type_t newportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
if (MACH_MSG_TYPE_PORT_ANY(replyPoly)) | |
msgh_simple = FALSE; | |
@@ -109,7 +108,7 @@ | |
InP->newportType = newportType; | |
- InP->newport = newport; | |
+ InP->newport.name = newport; | |
if (MACH_MSG_TYPE_PORT_ANY(newportPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_notice_changes.c 2023-11-24 15:41:07.247124865 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_file_notice_changes.c 2023-11-24 15:49:28.232090808 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -86,14 +85,14 @@ | |
const mach_msg_type_t portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -107,7 +106,7 @@ | |
InP->portType = portType; | |
- InP->port = port; | |
+ InP->port.name = port; | |
if (MACH_MSG_TYPE_PORT_ANY(portPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_task2pid.c 2023-11-24 15:41:07.271124337 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_proc_task2pid.c 2023-11-24 15:49:28.252090368 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
} Request; | |
typedef struct { | |
@@ -91,14 +90,14 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -122,7 +121,7 @@ | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_term_on_pty.c 2023-11-24 15:41:07.271124337 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_term_on_pty.c 2023-11-24 15:49:28.256090279 -0500 | |
@@ -68,8 +68,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t ptymasterType; | |
- io_t ptymaster; | |
- char ptymasterPad[4]; | |
+ mach_port_name_inlined_t ptymaster; | |
} Reply; | |
union { | |
@@ -100,7 +99,7 @@ | |
const mach_msg_type_t ptymasterCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -159,7 +158,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *ptymaster = OutP->ptymaster; | |
+ *ptymaster = OutP->ptymaster.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_set_environment.c 2023-11-24 15:41:07.243124954 -0500 | |
+++ cross-hurd/build-x86_64/bootstrap/glibc.second_obj/hurd/RPC_msg_set_environment.c 2023-11-24 15:49:28.232090808 -0500 | |
@@ -62,8 +62,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t valueType; | |
union { | |
char value[2048]; | |
@@ -91,14 +90,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t valueType = { | |
.msgtl_header = { | |
@@ -124,7 +123,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->valueType = valueType; | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libports/notifyServer.c 2023-11-24 15:42:36.861151651 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libports/notifyServer.c 2023-11-22 01:44:11.417618358 -0500 | |
@@ -180,8 +180,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t rightsType; | |
- mach_port_t rights; | |
- char rightsPad[4]; | |
+ mach_port_name_inlined_t rights; | |
} Request; | |
typedef struct { | |
@@ -198,7 +197,7 @@ | |
const mach_msg_type_t rightsCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_RECEIVE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -224,7 +223,7 @@ | |
else | |
notify = begin_using_port_info_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = ports_do_mach_notify_port_destroyed(notify, In0P->rights); | |
+ OutP->RetCode = ports_do_mach_notify_port_destroyed(notify, In0P->rights.name); | |
end_using_port_info(notify); | |
} | |
@@ -416,14 +415,14 @@ | |
mig_routine_t ports_notify_server_routines[] = { | |
0, | |
- _Xmach_notify_port_deleted, | |
- _Xmach_notify_msg_accepted, | |
+ _Xmach_notify_port_deleted, /* 65 */ | |
+ _Xmach_notify_msg_accepted, /* 66 */ | |
0, | |
0, | |
- _Xmach_notify_port_destroyed, | |
- _Xmach_notify_no_senders, | |
- _Xmach_notify_send_once, | |
- _Xmach_notify_dead_name, | |
+ _Xmach_notify_port_destroyed, /* 69 */ | |
+ _Xmach_notify_no_senders, /* 70 */ | |
+ _Xmach_notify_send_once, /* 71 */ | |
+ _Xmach_notify_dead_name, /* 72 */ | |
}; | |
mig_external boolean_t ports_notify_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libports/interruptServer.c 2023-11-24 15:42:36.853151828 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libports/interruptServer.c 2023-11-22 01:44:11.413618318 -0500 | |
@@ -102,7 +102,7 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t ports_interrupt_server_routines[] = { | |
- _Xinterrupt_operation, | |
+ _Xinterrupt_operation, /* 33000 */ | |
}; | |
mig_external boolean_t ports_interrupt_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/console-client/kdioctlServer.c 2023-11-24 15:42:42.057037233 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/console-client/kdioctlServer.c 2023-11-22 01:44:16.005664361 -0500 | |
@@ -184,8 +184,8 @@ | |
mig_routine_t kdioctl_server_routines[] = { | |
0, | |
- _Xkdioctl_kdskbdmode, | |
- _Xkdioctl_kdgkbdmode, | |
+ _Xkdioctl_kdskbdmode, /* 120001 */ | |
+ _Xkdioctl_kdgkbdmode, /* 120002 */ | |
}; | |
mig_external boolean_t kdioctl_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/devnode/notifyServer.c 2023-11-24 15:42:41.313053616 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/devnode/notifyServer.c 2023-11-22 01:44:15.485659147 -0500 | |
@@ -180,8 +180,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t rightsType; | |
- mach_port_t rights; | |
- char rightsPad[4]; | |
+ mach_port_name_inlined_t rights; | |
} Request; | |
typedef struct { | |
@@ -198,7 +197,7 @@ | |
const mach_msg_type_t rightsCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_RECEIVE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -224,7 +223,7 @@ | |
else | |
notify = begin_using_port_info_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = do_mach_notify_port_destroyed(notify, In0P->rights); | |
+ OutP->RetCode = do_mach_notify_port_destroyed(notify, In0P->rights.name); | |
end_using_port_info(notify); | |
} | |
@@ -416,14 +415,14 @@ | |
mig_routine_t notify_server_routines[] = { | |
0, | |
- _Xmach_notify_port_deleted, | |
- _Xmach_notify_msg_accepted, | |
+ _Xmach_notify_port_deleted, /* 65 */ | |
+ _Xmach_notify_msg_accepted, /* 66 */ | |
0, | |
0, | |
- _Xmach_notify_port_destroyed, | |
- _Xmach_notify_no_senders, | |
- _Xmach_notify_send_once, | |
- _Xmach_notify_dead_name, | |
+ _Xmach_notify_port_destroyed, /* 69 */ | |
+ _Xmach_notify_no_senders, /* 70 */ | |
+ _Xmach_notify_send_once, /* 71 */ | |
+ _Xmach_notify_dead_name, /* 72 */ | |
}; | |
mig_external boolean_t notify_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/devnode/deviceServer.c 2023-11-24 15:42:41.345052912 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/devnode/deviceServer.c 2023-11-22 01:44:15.497659267 -0500 | |
@@ -65,8 +65,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t deviceType; | |
- mach_port_t device; | |
- char devicePad[4]; | |
+ mach_port_name_inlined_t device; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -87,14 +86,14 @@ | |
const mach_msg_type_t deviceType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_port_t master_port; | |
mach_port_t reply_port; | |
@@ -126,7 +125,7 @@ | |
master_port = In0P->Head.msgh_request_port; | |
reply_port = In0P->Head.msgh_reply_port; | |
- OutP->RetCode = ds_device_open(master_port, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->name, &OutP->device, &devicePoly); | |
+ OutP->RetCode = ds_device_open(master_port, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->name, &OutP->device.name, &devicePoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -708,8 +707,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t deviceType; | |
- mach_port_t device; | |
- char devicePad[4]; | |
+ mach_port_name_inlined_t device; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -740,14 +738,14 @@ | |
const mach_msg_type_t deviceType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_port_t master_port; | |
mach_port_t reply_port; | |
@@ -775,7 +773,7 @@ | |
master_port = In0P->Head.msgh_request_port; | |
reply_port = In0P->Head.msgh_reply_port; | |
- OutP->RetCode = ds_device_open_new(master_port, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->name, &OutP->device, &devicePoly); | |
+ OutP->RetCode = ds_device_open_new(master_port, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->name, &OutP->device.name, &devicePoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -832,8 +830,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t pagerType; | |
- mach_port_t pager; | |
- char pagerPad[4]; | |
+ mach_port_name_inlined_t pager; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -883,14 +880,14 @@ | |
const mach_msg_type_t pagerType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
#if TypeCheck | |
if (mig_unlikely ((In0P->Head.msgh_size != 96) || | |
@@ -918,7 +915,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = ds_device_map(In0P->Head.msgh_request_port, In0P->prot, In0P->offset, In0P->size, &OutP->pager, In0P->unmap); | |
+ OutP->RetCode = ds_device_map(In0P->Head.msgh_request_port, In0P->prot, In0P->offset, In0P->size, &OutP->pager.name, In0P->unmap); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1134,8 +1131,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t receive_portType; | |
- mach_port_t receive_port; | |
- char receive_portPad[4]; | |
+ mach_port_name_inlined_t receive_port; | |
mach_msg_type_t priorityType; | |
int priority; | |
char priorityPad[4]; | |
@@ -1162,7 +1158,7 @@ | |
const mach_msg_type_t receive_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1210,7 +1206,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = ds_device_set_filter(In0P->Head.msgh_request_port, In0P->receive_port, In0P->priority, In0P->filter, In0P->filterType.msgt_number); | |
+ OutP->RetCode = ds_device_set_filter(In0P->Head.msgh_request_port, In0P->receive_port.name, In0P->priority, In0P->filter, In0P->filterType.msgt_number); | |
} | |
/* Default implementation of ds_device_set_filter */ | |
@@ -1239,8 +1235,7 @@ | |
int flags; | |
char flagsPad[4]; | |
mach_msg_type_t receive_portType; | |
- mach_port_t receive_port; | |
- char receive_portPad[4]; | |
+ mach_port_name_inlined_t receive_port; | |
} Request; | |
typedef struct { | |
@@ -1277,7 +1272,7 @@ | |
const mach_msg_type_t receive_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1306,7 +1301,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = ds_device_intr_register(In0P->Head.msgh_request_port, In0P->id, In0P->flags, In0P->receive_port); | |
+ OutP->RetCode = ds_device_intr_register(In0P->Head.msgh_request_port, In0P->id, In0P->flags, In0P->receive_port.name); | |
} | |
/* Default implementation of ds_device_intr_register */ | |
@@ -1328,8 +1323,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t receive_portType; | |
- mach_port_t receive_port; | |
- char receive_portPad[4]; | |
+ mach_port_name_inlined_t receive_port; | |
} Request; | |
typedef struct { | |
@@ -1346,7 +1340,7 @@ | |
const mach_msg_type_t receive_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1365,7 +1359,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = ds_device_intr_ack(In0P->Head.msgh_request_port, In0P->receive_port); | |
+ OutP->RetCode = ds_device_intr_ack(In0P->Head.msgh_request_port, In0P->receive_port.name); | |
} | |
/* Default implementation of ds_device_intr_ack */ | |
@@ -1379,21 +1373,21 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t device_server_routines[] = { | |
- _Xdevice_open, | |
- _Xdevice_close, | |
- _Xdevice_write, | |
- _Xdevice_write_inband, | |
- _Xdevice_read, | |
- _Xdevice_read_inband, | |
- _Xdevice_open_new, | |
+ _Xdevice_open, /* 2800 */ | |
+ _Xdevice_close, /* 2801 */ | |
+ _Xdevice_write, /* 2802 */ | |
+ _Xdevice_write_inband, /* 2803 */ | |
+ _Xdevice_read, /* 2804 */ | |
+ _Xdevice_read_inband, /* 2805 */ | |
+ _Xdevice_open_new, /* 2806 */ | |
0, | |
0, | |
- _Xdevice_map, | |
- _Xdevice_set_status, | |
- _Xdevice_get_status, | |
- _Xdevice_set_filter, | |
- _Xdevice_intr_register, | |
- _Xdevice_intr_ack, | |
+ _Xdevice_map, /* 2809 */ | |
+ _Xdevice_set_status, /* 2810 */ | |
+ _Xdevice_get_status, /* 2811 */ | |
+ _Xdevice_set_filter, /* 2812 */ | |
+ _Xdevice_intr_register, /* 2813 */ | |
+ _Xdevice_intr_ack, /* 2814 */ | |
}; | |
mig_external boolean_t device_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libpager/memory_objectServer.c 2023-11-24 15:42:37.881129191 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libpager/memory_objectServer.c 2023-11-22 01:44:12.221626417 -0500 | |
@@ -51,11 +51,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_controlType; | |
- mach_port_t memory_control; | |
- char memory_controlPad[4]; | |
+ mach_port_name_inlined_t memory_control; | |
mach_msg_type_t memory_object_nameType; | |
- mach_port_t memory_object_name; | |
- char memory_object_namePad[4]; | |
+ mach_port_name_inlined_t memory_object_name; | |
mach_msg_type_t memory_object_page_sizeType; | |
vm_size_t memory_object_page_size; | |
} Request; | |
@@ -74,7 +72,7 @@ | |
const mach_msg_type_t memory_controlCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -84,7 +82,7 @@ | |
const mach_msg_type_t memory_object_nameCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -130,7 +128,7 @@ | |
else | |
memory_object = begin_using_pager(In0P->Head.msgh_request_port); | |
- OutP->RetCode = _pager_S_memory_object_init(memory_object, In0P->memory_control, In0P->memory_object_name, In0P->memory_object_page_size); | |
+ OutP->RetCode = _pager_S_memory_object_init(memory_object, In0P->memory_control.name, In0P->memory_object_name.name, In0P->memory_object_page_size); | |
end_using_pager(memory_object); | |
} | |
@@ -153,11 +151,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_controlType; | |
- mach_port_t memory_control; | |
- char memory_controlPad[4]; | |
+ mach_port_name_inlined_t memory_control; | |
mach_msg_type_t memory_object_nameType; | |
- mach_port_t memory_object_name; | |
- char memory_object_namePad[4]; | |
+ mach_port_name_inlined_t memory_object_name; | |
} Request; | |
typedef struct { | |
@@ -174,7 +170,7 @@ | |
const mach_msg_type_t memory_controlCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_RECEIVE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -184,7 +180,7 @@ | |
const mach_msg_type_t memory_object_nameCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_RECEIVE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -215,7 +211,7 @@ | |
else | |
memory_object = begin_using_pager(In0P->Head.msgh_request_port); | |
- OutP->RetCode = _pager_S_memory_object_terminate(memory_object, In0P->memory_control, In0P->memory_object_name); | |
+ OutP->RetCode = _pager_S_memory_object_terminate(memory_object, In0P->memory_control.name, In0P->memory_object_name.name); | |
end_using_pager(memory_object); | |
} | |
@@ -237,15 +233,13 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t old_memory_controlType; | |
- mach_port_t old_memory_control; | |
- char old_memory_controlPad[4]; | |
+ mach_port_name_inlined_t old_memory_control; | |
mach_msg_type_t offsetType; | |
vm_offset_t offset; | |
mach_msg_type_t lengthType; | |
vm_size_t length; | |
mach_msg_type_t new_memory_objectType; | |
- mach_port_t new_memory_object; | |
- char new_memory_objectPad[4]; | |
+ mach_port_name_inlined_t new_memory_object; | |
} Request; | |
typedef struct { | |
@@ -262,7 +256,7 @@ | |
const mach_msg_type_t old_memory_controlCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -292,7 +286,7 @@ | |
const mach_msg_type_t new_memory_objectCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_RECEIVE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -333,7 +327,7 @@ | |
else | |
old_memory_object = begin_using_pager(In0P->Head.msgh_request_port); | |
- OutP->RetCode = _pager_S_memory_object_copy(old_memory_object, In0P->old_memory_control, In0P->offset, In0P->length, In0P->new_memory_object); | |
+ OutP->RetCode = _pager_S_memory_object_copy(old_memory_object, In0P->old_memory_control.name, In0P->offset, In0P->length, In0P->new_memory_object.name); | |
end_using_pager(old_memory_object); | |
} | |
@@ -357,8 +351,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_controlType; | |
- mach_port_t memory_control; | |
- char memory_controlPad[4]; | |
+ mach_port_name_inlined_t memory_control; | |
mach_msg_type_t offsetType; | |
vm_offset_t offset; | |
mach_msg_type_t lengthType; | |
@@ -382,7 +375,7 @@ | |
const mach_msg_type_t memory_controlCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -453,7 +446,7 @@ | |
else | |
memory_object = begin_using_pager(In0P->Head.msgh_request_port); | |
- OutP->RetCode = _pager_S_memory_object_data_request(memory_object, In0P->memory_control, In0P->offset, In0P->length, In0P->desired_access); | |
+ OutP->RetCode = _pager_S_memory_object_data_request(memory_object, In0P->memory_control.name, In0P->offset, In0P->length, In0P->desired_access); | |
end_using_pager(memory_object); | |
} | |
@@ -477,8 +470,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_controlType; | |
- mach_port_t memory_control; | |
- char memory_controlPad[4]; | |
+ mach_port_name_inlined_t memory_control; | |
mach_msg_type_t offsetType; | |
vm_offset_t offset; | |
mach_msg_type_t lengthType; | |
@@ -502,7 +494,7 @@ | |
const mach_msg_type_t memory_controlCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -573,7 +565,7 @@ | |
else | |
memory_object = begin_using_pager(In0P->Head.msgh_request_port); | |
- OutP->RetCode = _pager_S_memory_object_data_unlock(memory_object, In0P->memory_control, In0P->offset, In0P->length, In0P->desired_access); | |
+ OutP->RetCode = _pager_S_memory_object_data_unlock(memory_object, In0P->memory_control.name, In0P->offset, In0P->length, In0P->desired_access); | |
end_using_pager(memory_object); | |
} | |
@@ -597,8 +589,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_controlType; | |
- mach_port_t memory_control; | |
- char memory_controlPad[4]; | |
+ mach_port_name_inlined_t memory_control; | |
mach_msg_type_t offsetType; | |
vm_offset_t offset; | |
mach_msg_type_t lengthType; | |
@@ -619,7 +610,7 @@ | |
const mach_msg_type_t memory_controlCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -675,7 +666,7 @@ | |
else | |
memory_object = begin_using_pager(In0P->Head.msgh_request_port); | |
- OutP->RetCode = _pager_S_memory_object_lock_completed(memory_object, In0P->memory_control, In0P->offset, In0P->length); | |
+ OutP->RetCode = _pager_S_memory_object_lock_completed(memory_object, In0P->memory_control.name, In0P->offset, In0P->length); | |
end_using_pager(memory_object); | |
} | |
@@ -698,8 +689,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_controlType; | |
- mach_port_t memory_control; | |
- char memory_controlPad[4]; | |
+ mach_port_name_inlined_t memory_control; | |
mach_msg_type_t offsetType; | |
vm_offset_t offset; | |
mach_msg_type_t lengthType; | |
@@ -725,7 +715,7 @@ | |
const mach_msg_type_t memory_controlCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -811,7 +801,7 @@ | |
else | |
memory_object = begin_using_pager(In0P->Head.msgh_request_port); | |
- OutP->RetCode = _pager_S_memory_object_supply_completed(memory_object, In0P->memory_control, In0P->offset, In0P->length, In0P->result, In0P->error_offset); | |
+ OutP->RetCode = _pager_S_memory_object_supply_completed(memory_object, In0P->memory_control.name, In0P->offset, In0P->length, In0P->result, In0P->error_offset); | |
end_using_pager(memory_object); | |
} | |
@@ -836,8 +826,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_controlType; | |
- mach_port_t memory_control; | |
- char memory_controlPad[4]; | |
+ mach_port_name_inlined_t memory_control; | |
mach_msg_type_t offsetType; | |
vm_offset_t offset; | |
mach_msg_type_long_t dataType; | |
@@ -864,7 +853,7 @@ | |
const mach_msg_type_t memory_controlCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -943,7 +932,7 @@ | |
else | |
memory_object = begin_using_pager(In0P->Head.msgh_request_port); | |
- OutP->RetCode = _pager_S_memory_object_data_return(memory_object, In0P->memory_control, In0P->offset, In0P->data, In0P->dataType.msgtl_number, In0P->dirty, In0P->kernel_copy); | |
+ OutP->RetCode = _pager_S_memory_object_data_return(memory_object, In0P->memory_control.name, In0P->offset, In0P->data, In0P->dataType.msgtl_number, In0P->dirty, In0P->kernel_copy); | |
end_using_pager(memory_object); | |
} | |
@@ -1047,16 +1036,16 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t _pager_memory_object_server_routines[] = { | |
- _Xmemory_object_init, | |
- _Xmemory_object_terminate, | |
- _Xmemory_object_copy, | |
- _Xmemory_object_data_request, | |
- _Xmemory_object_data_unlock, | |
+ _Xmemory_object_init, /* 2200 */ | |
+ _Xmemory_object_terminate, /* 2201 */ | |
+ _Xmemory_object_copy, /* 2202 */ | |
+ _Xmemory_object_data_request, /* 2203 */ | |
+ _Xmemory_object_data_unlock, /* 2204 */ | |
0, | |
- _Xmemory_object_lock_completed, | |
- _Xmemory_object_supply_completed, | |
- _Xmemory_object_data_return, | |
- _Xmemory_object_change_completed, | |
+ _Xmemory_object_lock_completed, /* 2206 */ | |
+ _Xmemory_object_supply_completed, /* 2207 */ | |
+ _Xmemory_object_data_return, /* 2208 */ | |
+ _Xmemory_object_change_completed, /* 2209 */ | |
}; | |
mig_external boolean_t _pager_memory_object_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/eth-multiplexer/deviceServer.c 2023-11-24 15:42:41.973039083 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/eth-multiplexer/deviceServer.c 2023-11-22 01:44:16.161665926 -0500 | |
@@ -65,8 +65,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t deviceType; | |
- mach_port_t device; | |
- char devicePad[4]; | |
+ mach_port_name_inlined_t device; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -87,14 +86,14 @@ | |
const mach_msg_type_t deviceType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_port_t master_port; | |
mach_port_t reply_port; | |
@@ -126,7 +125,7 @@ | |
master_port = In0P->Head.msgh_request_port; | |
reply_port = In0P->Head.msgh_reply_port; | |
- OutP->RetCode = ds_device_open(master_port, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->name, &OutP->device, &devicePoly); | |
+ OutP->RetCode = ds_device_open(master_port, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->name, &OutP->device.name, &devicePoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -744,8 +743,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t deviceType; | |
- mach_port_t device; | |
- char devicePad[4]; | |
+ mach_port_name_inlined_t device; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -776,14 +774,14 @@ | |
const mach_msg_type_t deviceType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_port_t master_port; | |
mach_port_t reply_port; | |
@@ -811,7 +809,7 @@ | |
master_port = In0P->Head.msgh_request_port; | |
reply_port = In0P->Head.msgh_reply_port; | |
- OutP->RetCode = ds_device_open_new(master_port, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->name, &OutP->device, &devicePoly); | |
+ OutP->RetCode = ds_device_open_new(master_port, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->mode, In0P->name, &OutP->device.name, &devicePoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -868,8 +866,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t pagerType; | |
- mach_port_t pager; | |
- char pagerPad[4]; | |
+ mach_port_name_inlined_t pager; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -919,14 +916,14 @@ | |
const mach_msg_type_t pagerType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
vether_device_t device; | |
@@ -961,7 +958,7 @@ | |
else | |
device = begin_using_device_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = ds_device_map(device, In0P->prot, In0P->offset, In0P->size, &OutP->pager, In0P->unmap); | |
+ OutP->RetCode = ds_device_map(device, In0P->prot, In0P->offset, In0P->size, &OutP->pager.name, In0P->unmap); | |
end_using_device(device); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1193,8 +1190,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t receive_portType; | |
- mach_port_t receive_port; | |
- char receive_portPad[4]; | |
+ mach_port_name_inlined_t receive_port; | |
mach_msg_type_t priorityType; | |
int priority; | |
char priorityPad[4]; | |
@@ -1221,7 +1217,7 @@ | |
const mach_msg_type_t receive_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1276,7 +1272,7 @@ | |
else | |
device = begin_using_device_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = ds_device_set_filter(device, In0P->receive_port, In0P->priority, In0P->filter, In0P->filterType.msgt_number); | |
+ OutP->RetCode = ds_device_set_filter(device, In0P->receive_port.name, In0P->priority, In0P->filter, In0P->filterType.msgt_number); | |
end_using_device(device); | |
} | |
@@ -1306,8 +1302,7 @@ | |
int flags; | |
char flagsPad[4]; | |
mach_msg_type_t receive_portType; | |
- mach_port_t receive_port; | |
- char receive_portPad[4]; | |
+ mach_port_name_inlined_t receive_port; | |
} Request; | |
typedef struct { | |
@@ -1344,7 +1339,7 @@ | |
const mach_msg_type_t receive_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1380,7 +1375,7 @@ | |
else | |
device = begin_using_device_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = ds_device_intr_register(device, In0P->id, In0P->flags, In0P->receive_port); | |
+ OutP->RetCode = ds_device_intr_register(device, In0P->id, In0P->flags, In0P->receive_port.name); | |
end_using_device(device); | |
} | |
@@ -1403,8 +1398,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t receive_portType; | |
- mach_port_t receive_port; | |
- char receive_portPad[4]; | |
+ mach_port_name_inlined_t receive_port; | |
} Request; | |
typedef struct { | |
@@ -1421,7 +1415,7 @@ | |
const mach_msg_type_t receive_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1447,7 +1441,7 @@ | |
else | |
device = begin_using_device_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = ds_device_intr_ack(device, In0P->receive_port); | |
+ OutP->RetCode = ds_device_intr_ack(device, In0P->receive_port.name); | |
end_using_device(device); | |
} | |
@@ -1462,21 +1456,21 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t device_server_routines[] = { | |
- _Xdevice_open, | |
- _Xdevice_close, | |
- _Xdevice_write, | |
- _Xdevice_write_inband, | |
- _Xdevice_read, | |
- _Xdevice_read_inband, | |
- _Xdevice_open_new, | |
+ _Xdevice_open, /* 2800 */ | |
+ _Xdevice_close, /* 2801 */ | |
+ _Xdevice_write, /* 2802 */ | |
+ _Xdevice_write_inband, /* 2803 */ | |
+ _Xdevice_read, /* 2804 */ | |
+ _Xdevice_read_inband, /* 2805 */ | |
+ _Xdevice_open_new, /* 2806 */ | |
0, | |
0, | |
- _Xdevice_map, | |
- _Xdevice_set_status, | |
- _Xdevice_get_status, | |
- _Xdevice_set_filter, | |
- _Xdevice_intr_register, | |
- _Xdevice_intr_ack, | |
+ _Xdevice_map, /* 2809 */ | |
+ _Xdevice_set_status, /* 2810 */ | |
+ _Xdevice_get_status, /* 2811 */ | |
+ _Xdevice_set_filter, /* 2812 */ | |
+ _Xdevice_intr_register, /* 2813 */ | |
+ _Xdevice_intr_ack, /* 2814 */ | |
}; | |
mig_external boolean_t device_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/pfinet/ioServer.c 2023-11-24 15:42:42.517027103 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/pfinet/ioServer.c 2023-11-22 01:44:15.585660149 -0500 | |
@@ -736,8 +736,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t notify_portType; | |
- mach_port_t notify_port; | |
- char notify_portPad[4]; | |
+ mach_port_name_inlined_t notify_port; | |
} Request; | |
typedef struct { | |
@@ -746,8 +745,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t async_id_portType; | |
- mach_port_t async_id_port; | |
- char async_id_portPad[4]; | |
+ mach_port_name_inlined_t async_id_port; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -758,7 +756,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t notify_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -768,14 +766,14 @@ | |
const mach_msg_type_t async_id_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t io_object; | |
mach_msg_type_name_t async_id_portPoly; | |
@@ -796,7 +794,7 @@ | |
else | |
io_object = begin_using_socket_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_io_async(io_object, In0P->notify_port, &OutP->async_id_port, &async_id_portPoly); | |
+ OutP->RetCode = S_io_async(io_object, In0P->notify_port.name, &OutP->async_id_port.name, &async_id_portPoly); | |
end_using_socket_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -973,8 +971,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t icky_async_id_portType; | |
- mach_port_t icky_async_id_port; | |
- char icky_async_id_portPad[4]; | |
+ mach_port_name_inlined_t icky_async_id_port; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -985,14 +982,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t icky_async_id_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t io_object; | |
mach_msg_type_name_t icky_async_id_portPoly; | |
@@ -1008,7 +1005,7 @@ | |
else | |
io_object = begin_using_socket_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_io_get_icky_async_id(io_object, &OutP->icky_async_id_port, &icky_async_id_portPoly); | |
+ OutP->RetCode = S_io_get_icky_async_id(io_object, &OutP->icky_async_id_port.name, &icky_async_id_portPoly); | |
end_using_socket_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1203,8 +1200,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t rendezvous2Type; | |
- mach_port_t rendezvous2; | |
- char rendezvous2Pad[4]; | |
+ mach_port_name_inlined_t rendezvous2; | |
} Request; | |
typedef struct { | |
@@ -1221,7 +1217,7 @@ | |
const mach_msg_type_t rendezvous2Check = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1247,7 +1243,7 @@ | |
else | |
auth_object = begin_using_socket_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_io_reauthenticate(auth_object, In0P->rendezvous2); | |
+ OutP->RetCode = S_io_reauthenticate(auth_object, In0P->rendezvous2.name); | |
end_using_socket_port(auth_object); | |
} | |
@@ -1285,8 +1281,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t new_objectType; | |
- mach_port_t new_object; | |
- char new_objectPad[4]; | |
+ mach_port_name_inlined_t new_object; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1301,14 +1296,14 @@ | |
const mach_msg_type_t new_objectType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t io_object; | |
mach_msg_type_name_t new_objectPoly; | |
@@ -1353,7 +1348,7 @@ | |
else | |
io_object = begin_using_socket_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_io_restrict_auth(io_object, &OutP->new_object, &new_objectPoly, (In0P->uidsType.msgtl_header.msgt_inline) ? In0P->uids : In0P->uidsP, In0P->uidsType.msgtl_number, (In1P->gidsType.msgtl_header.msgt_inline) ? In1P->gids : In1P->gidsP, In1P->gidsType.msgtl_number); | |
+ OutP->RetCode = S_io_restrict_auth(io_object, &OutP->new_object.name, &new_objectPoly, (In0P->uidsType.msgtl_header.msgt_inline) ? In0P->uids : In0P->uidsP, In0P->uidsType.msgtl_number, (In1P->gidsType.msgtl_header.msgt_inline) ? In1P->gids : In1P->gidsP, In1P->gidsType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In1P->gidsType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In1P->gidsP, 4 * In1P->gidsType.msgtl_number); | |
@@ -1407,8 +1402,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t newportType; | |
- mach_port_t newport; | |
- char newportPad[4]; | |
+ mach_port_name_inlined_t newport; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1419,14 +1413,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t newportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t io_object; | |
mach_msg_type_name_t newportPoly; | |
@@ -1442,7 +1436,7 @@ | |
else | |
io_object = begin_using_socket_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_io_duplicate(io_object, &OutP->newport, &newportPoly); | |
+ OutP->RetCode = S_io_duplicate(io_object, &OutP->newport.name, &newportPoly); | |
end_using_socket_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1603,11 +1597,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t memobjrdType; | |
- mach_port_t memobjrd; | |
- char memobjrdPad[4]; | |
+ mach_port_name_inlined_t memobjrd; | |
mach_msg_type_t memobjwtType; | |
- mach_port_t memobjwt; | |
- char memobjwtPad[4]; | |
+ mach_port_name_inlined_t memobjwt; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1618,25 +1610,25 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t memobjrdType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t memobjwtType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t io_object; | |
mach_msg_type_name_t memobjrdPoly; | |
@@ -1653,7 +1645,7 @@ | |
else | |
io_object = begin_using_socket_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_io_map(io_object, &OutP->memobjrd, &memobjrdPoly, &OutP->memobjwt, &memobjwtPoly); | |
+ OutP->RetCode = S_io_map(io_object, &OutP->memobjrd.name, &memobjrdPoly, &OutP->memobjwt.name, &memobjwtPoly); | |
end_using_socket_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1706,8 +1698,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t memobjType; | |
- mach_port_t memobj; | |
- char memobjPad[4]; | |
+ mach_port_name_inlined_t memobj; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1718,14 +1709,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t memobjType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t io_object; | |
mach_msg_type_name_t memobjPoly; | |
@@ -1741,7 +1732,7 @@ | |
else | |
io_object = begin_using_socket_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_io_map_cntl(io_object, &OutP->memobj, &memobjPoly); | |
+ OutP->RetCode = S_io_map_cntl(io_object, &OutP->memobj.name, &memobjPoly); | |
end_using_socket_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2311,11 +2302,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t idportType; | |
- mach_port_t idport; | |
- char idportPad[4]; | |
+ mach_port_name_inlined_t idport; | |
mach_msg_type_t fsidportType; | |
- mach_port_t fsidport; | |
- char fsidportPad[4]; | |
+ mach_port_name_inlined_t fsidport; | |
mach_msg_type_t filenoType; | |
ino64_t fileno; | |
} Reply; | |
@@ -2328,25 +2317,25 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t idportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t fsidportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t filenoType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -2374,7 +2363,7 @@ | |
else | |
io_object = begin_using_socket_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_io_identity(io_object, &OutP->idport, &idportPoly, &OutP->fsidport, &fsidportPoly, &OutP->fileno); | |
+ OutP->RetCode = S_io_identity(io_object, &OutP->idport.name, &idportPoly, &OutP->fsidport.name, &fsidportPoly, &OutP->fileno); | |
end_using_socket_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2573,38 +2562,38 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t io_server_routines[] = { | |
- _Xio_write, | |
- _Xio_read, | |
- _Xio_seek, | |
- _Xio_readable, | |
- _Xio_set_all_openmodes, | |
- _Xio_get_openmodes, | |
- _Xio_set_some_openmodes, | |
- _Xio_clear_some_openmodes, | |
- _Xio_async, | |
- _Xio_mod_owner, | |
- _Xio_get_owner, | |
- _Xio_get_icky_async_id, | |
- _Xio_select, | |
- _Xio_stat, | |
- _Xio_reauthenticate, | |
- _Xio_restrict_auth, | |
- _Xio_duplicate, | |
- _Xio_server_version, | |
- _Xio_map, | |
- _Xio_map_cntl, | |
- _Xio_get_conch, | |
- _Xio_release_conch, | |
- _Xio_eofnotify, | |
- _Xio_prenotify, | |
- _Xio_postnotify, | |
- _Xio_readnotify, | |
- _Xio_readsleep, | |
- _Xio_sigio, | |
- _Xio_pathconf, | |
- _Xio_identity, | |
- _Xio_revoke, | |
- _Xio_select_timeout, | |
+ _Xio_write, /* 21000 */ | |
+ _Xio_read, /* 21001 */ | |
+ _Xio_seek, /* 21002 */ | |
+ _Xio_readable, /* 21003 */ | |
+ _Xio_set_all_openmodes, /* 21004 */ | |
+ _Xio_get_openmodes, /* 21005 */ | |
+ _Xio_set_some_openmodes, /* 21006 */ | |
+ _Xio_clear_some_openmodes, /* 21007 */ | |
+ _Xio_async, /* 21008 */ | |
+ _Xio_mod_owner, /* 21009 */ | |
+ _Xio_get_owner, /* 21010 */ | |
+ _Xio_get_icky_async_id, /* 21011 */ | |
+ _Xio_select, /* 21012 */ | |
+ _Xio_stat, /* 21013 */ | |
+ _Xio_reauthenticate, /* 21014 */ | |
+ _Xio_restrict_auth, /* 21015 */ | |
+ _Xio_duplicate, /* 21016 */ | |
+ _Xio_server_version, /* 21017 */ | |
+ _Xio_map, /* 21018 */ | |
+ _Xio_map_cntl, /* 21019 */ | |
+ _Xio_get_conch, /* 21020 */ | |
+ _Xio_release_conch, /* 21021 */ | |
+ _Xio_eofnotify, /* 21022 */ | |
+ _Xio_prenotify, /* 21023 */ | |
+ _Xio_postnotify, /* 21024 */ | |
+ _Xio_readnotify, /* 21025 */ | |
+ _Xio_readsleep, /* 21026 */ | |
+ _Xio_sigio, /* 21027 */ | |
+ _Xio_pathconf, /* 21028 */ | |
+ _Xio_identity, /* 21029 */ | |
+ _Xio_revoke, /* 21030 */ | |
+ _Xio_select_timeout, /* 21031 */ | |
}; | |
mig_external boolean_t io_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/pfinet/pfinetServer.c 2023-11-24 15:42:42.849019792 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/pfinet/pfinetServer.c 2023-11-22 01:44:15.525659548 -0500 | |
@@ -268,8 +268,8 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t pfinet_server_routines[] = { | |
- _Xpfinet_siocgifconf, | |
- _Xpfinet_getroutes, | |
+ _Xpfinet_siocgifconf, /* 37000 */ | |
+ _Xpfinet_getroutes, /* 37001 */ | |
}; | |
mig_external boolean_t pfinet_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/pfinet/rioctlServer.c 2023-11-24 15:42:42.881019087 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/pfinet/rioctlServer.c 2023-11-22 01:44:15.617660471 -0500 | |
@@ -230,8 +230,8 @@ | |
0, | |
0, | |
0, | |
- _Xrioctl_siocaddrt, | |
- _Xrioctl_siocdelrt, | |
+ _Xrioctl_siocaddrt, /* 148010 */ | |
+ _Xrioctl_siocdelrt, /* 148011 */ | |
}; | |
mig_external boolean_t rioctl_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/pfinet/iioctlServer.c 2023-11-24 15:42:42.821020409 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/pfinet/iioctlServer.c 2023-11-22 01:44:15.521659507 -0500 | |
@@ -1937,20 +1937,20 @@ | |
0, | |
0, | |
0, | |
- _Xiioctl_siocsifaddr, | |
+ _Xiioctl_siocsifaddr, /* 112012 */ | |
0, | |
- _Xiioctl_siocsifdstaddr, | |
+ _Xiioctl_siocsifdstaddr, /* 112014 */ | |
0, | |
- _Xiioctl_siocsifflags, | |
- _Xiioctl_siocgifflags, | |
+ _Xiioctl_siocsifflags, /* 112016 */ | |
+ _Xiioctl_siocgifflags, /* 112017 */ | |
0, | |
- _Xiioctl_siocsifbrdaddr, | |
+ _Xiioctl_siocsifbrdaddr, /* 112019 */ | |
0, | |
0, | |
- _Xiioctl_siocsifnetmask, | |
- _Xiioctl_siocgifmetric, | |
- _Xiioctl_siocsifmetric, | |
- _Xiioctl_siocdifaddr, | |
+ _Xiioctl_siocsifnetmask, /* 112022 */ | |
+ _Xiioctl_siocgifmetric, /* 112023 */ | |
+ _Xiioctl_siocsifmetric, /* 112024 */ | |
+ _Xiioctl_siocdifaddr, /* 112025 */ | |
0, | |
0, | |
0, | |
@@ -1958,13 +1958,13 @@ | |
0, | |
0, | |
0, | |
- _Xiioctl_siocgifaddr, | |
- _Xiioctl_siocgifdstaddr, | |
- _Xiioctl_siocgifbrdaddr, | |
+ _Xiioctl_siocgifaddr, /* 112033 */ | |
+ _Xiioctl_siocgifdstaddr, /* 112034 */ | |
+ _Xiioctl_siocgifbrdaddr, /* 112035 */ | |
0, | |
- _Xiioctl_siocgifnetmask, | |
+ _Xiioctl_siocgifnetmask, /* 112037 */ | |
0, | |
- _Xiioctl_siocgifhwaddr, | |
+ _Xiioctl_siocgifhwaddr, /* 112039 */ | |
0, | |
0, | |
0, | |
@@ -1976,8 +1976,8 @@ | |
0, | |
0, | |
0, | |
- _Xiioctl_siocgifmtu, | |
- _Xiioctl_siocsifmtu, | |
+ _Xiioctl_siocgifmtu, /* 112051 */ | |
+ _Xiioctl_siocsifmtu, /* 112052 */ | |
0, | |
0, | |
0, | |
@@ -2015,8 +2015,8 @@ | |
0, | |
0, | |
0, | |
- _Xiioctl_siocgifindex, | |
- _Xiioctl_siocgifname, | |
+ _Xiioctl_siocgifindex, /* 112090 */ | |
+ _Xiioctl_siocgifname, /* 112091 */ | |
}; | |
mig_external boolean_t iioctl_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/pfinet/socketServer.c 2023-11-24 15:42:42.485027808 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/pfinet/socketServer.c 2023-11-22 01:44:15.585660149 -0500 | |
@@ -75,8 +75,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t sockType; | |
- mach_port_t sock; | |
- char sockPad[4]; | |
+ mach_port_name_inlined_t sock; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -107,14 +106,14 @@ | |
const mach_msg_type_t sockType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
trivfs_protid_t server; | |
mach_msg_type_name_t sockPoly; | |
@@ -140,7 +139,7 @@ | |
else | |
server = trivfs_begin_using_protid(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_socket_create(server, In0P->sock_type, In0P->protocol, &OutP->sock, &sockPoly); | |
+ OutP->RetCode = S_socket_create(server, In0P->sock_type, In0P->protocol, &OutP->sock.name, &sockPoly); | |
trivfs_end_using_protid(server); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -251,11 +250,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t conn_sockType; | |
- mach_port_t conn_sock; | |
- char conn_sockPad[4]; | |
+ mach_port_name_inlined_t conn_sock; | |
mach_msg_type_t peer_addrType; | |
- mach_port_t peer_addr; | |
- char peer_addrPad[4]; | |
+ mach_port_name_inlined_t peer_addr; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -266,25 +263,25 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t conn_sockType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t peer_addrType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t sock; | |
mach_msg_type_name_t conn_sockPoly; | |
@@ -301,7 +298,7 @@ | |
else | |
sock = begin_using_socket_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_socket_accept(sock, &OutP->conn_sock, &conn_sockPoly, &OutP->peer_addr, &peer_addrPoly); | |
+ OutP->RetCode = S_socket_accept(sock, &OutP->conn_sock.name, &conn_sockPoly, &OutP->peer_addr.name, &peer_addrPoly); | |
end_using_socket_port(sock); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -347,8 +344,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t addrType; | |
- addr_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Request; | |
typedef struct { | |
@@ -365,7 +361,7 @@ | |
const mach_msg_type_t addrCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -392,7 +388,7 @@ | |
else | |
sock = begin_using_socket_port(In0P->Head.msgh_request_port); | |
- addr = begin_using_sockaddr_port(In0P->addr); | |
+ addr = begin_using_sockaddr_port(In0P->addr.name); | |
OutP->RetCode = S_socket_connect(sock, addr); | |
end_using_sockaddr_port(addr); | |
@@ -416,8 +412,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t addrType; | |
- addr_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Request; | |
typedef struct { | |
@@ -434,7 +429,7 @@ | |
const mach_msg_type_t addrCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -461,7 +456,7 @@ | |
else | |
sock = begin_using_socket_port(In0P->Head.msgh_request_port); | |
- addr = begin_using_sockaddr_port(In0P->addr); | |
+ addr = begin_using_sockaddr_port(In0P->addr.name); | |
OutP->RetCode = S_socket_bind(sock, addr); | |
end_using_sockaddr_port(addr); | |
@@ -492,8 +487,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t addrType; | |
- mach_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -504,14 +498,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t addrType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t sock; | |
mach_msg_type_name_t addrPoly; | |
@@ -527,7 +521,7 @@ | |
else | |
sock = begin_using_socket_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_socket_name(sock, &OutP->addr, &addrPoly); | |
+ OutP->RetCode = S_socket_name(sock, &OutP->addr.name, &addrPoly); | |
end_using_socket_port(sock); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -571,8 +565,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t addrType; | |
- mach_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -583,14 +576,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t addrType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t sock; | |
mach_msg_type_name_t addrPoly; | |
@@ -606,7 +599,7 @@ | |
else | |
sock = begin_using_socket_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_socket_peername(sock, &OutP->addr, &addrPoly); | |
+ OutP->RetCode = S_socket_peername(sock, &OutP->addr.name, &addrPoly); | |
end_using_socket_port(sock); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -643,8 +636,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t sock2Type; | |
- socket_t sock2; | |
- char sock2Pad[4]; | |
+ mach_port_name_inlined_t sock2; | |
} Request; | |
typedef struct { | |
@@ -661,7 +653,7 @@ | |
const mach_msg_type_t sock2Check = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -688,7 +680,7 @@ | |
else | |
sock1 = begin_using_socket_port(In0P->Head.msgh_request_port); | |
- sock2 = begin_using_socket_port(In0P->sock2); | |
+ sock2 = begin_using_socket_port(In0P->sock2.name); | |
OutP->RetCode = S_socket_connect2(sock1, sock2); | |
end_using_socket_port(sock2); | |
@@ -727,8 +719,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t addrType; | |
- mach_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -751,14 +742,14 @@ | |
const mach_msg_type_t addrType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_port_t server; | |
mach_msg_type_name_t addrPoly; | |
@@ -791,7 +782,7 @@ | |
server = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
server = In0P->Head.msgh_request_port; | |
- OutP->RetCode = S_socket_create_address(server, In0P->sockaddr_type, (In0P->sockaddrType.msgtl_header.msgt_inline) ? In0P->sockaddr : In0P->sockaddrP, In0P->sockaddrType.msgtl_number, &OutP->addr, &addrPoly); | |
+ OutP->RetCode = S_socket_create_address(server, In0P->sockaddr_type, (In0P->sockaddrType.msgtl_header.msgt_inline) ? In0P->sockaddr : In0P->sockaddrP, In0P->sockaddrType.msgtl_number, &OutP->addr.name, &addrPoly); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In0P->sockaddrType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In0P->sockaddrP, In0P->sockaddrType.msgtl_number); | |
@@ -843,8 +834,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t addrType; | |
- mach_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -865,14 +855,14 @@ | |
const mach_msg_type_t addrType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_port_t server; | |
mach_msg_type_name_t addrPoly; | |
@@ -892,7 +882,7 @@ | |
server = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
server = In0P->Head.msgh_request_port; | |
- OutP->RetCode = S_socket_fabricate_address(server, In0P->sockaddr_type, &OutP->addr, &addrPoly); | |
+ OutP->RetCode = S_socket_fabricate_address(server, In0P->sockaddr_type, &OutP->addr.name, &addrPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1342,8 +1332,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t addrType; | |
- addr_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
mach_msg_type_t flagsType; | |
int flags; | |
char flagsPad[4]; | |
@@ -1354,7 +1343,7 @@ | |
}; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t controlType; | |
@@ -1385,7 +1374,7 @@ | |
const mach_msg_type_t addrCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1417,6 +1406,8 @@ | |
sock_user_t sock; | |
sock_addr_t addr; | |
+ mach_port_t *portsP; | |
+ | |
#if TypeCheck | |
msgh_size = In0P->Head.msgh_size; | |
if (mig_unlikely ((msgh_size < 88) || | |
@@ -1453,11 +1444,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In1P->portsType.msgtl_header.msgt_longform != TRUE) || | |
(In1P->portsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In1P->portsType.msgtl_size != 32))) | |
+ (In1P->portsType.msgtl_size != 64 && In1P->portsType.msgtl_header.msgt_inline == TRUE) || | |
+ (In1P->portsType.msgtl_size != 32 && In1P->portsType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In1P->portsType.msgtl_header.msgt_inline) ? (4 * In1P->portsType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In1P->portsType.msgtl_header.msgt_inline) ? 8 * In1P->portsType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 88 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -1483,9 +1475,19 @@ | |
else | |
sock = begin_using_socket_port(In0P->Head.msgh_request_port); | |
- addr = begin_using_sockaddr_port(In0P->addr); | |
+ addr = begin_using_sockaddr_port(In0P->addr.name); | |
- OutP->RetCode = S_socket_send(sock, addr, In0P->flags, (In0P->dataType.msgtl_header.msgt_inline) ? In0P->data : In0P->dataP, In0P->dataType.msgtl_number, (In1P->portsType.msgtl_header.msgt_inline) ? In1P->ports : In1P->portsP, In1P->portsType.msgtl_number, (In2P->controlType.msgtl_header.msgt_inline) ? In2P->control : In2P->controlP, In2P->controlType.msgtl_number, &OutP->amount); | |
+ if (In1P->portsType.msgtl_header.msgt_inline) { | |
+ portsP = (mach_port_t *)In1P->ports; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In1P->portsType.msgtl_number; i++) { | |
+ portsP[i] = In1P->ports[i].name; | |
+ } | |
+ } else { | |
+ portsP = In1P->portsP; | |
+ } | |
+ OutP->RetCode = S_socket_send(sock, addr, In0P->flags, (In0P->dataType.msgtl_header.msgt_inline) ? In0P->data : In0P->dataP, In0P->dataType.msgtl_number, portsP, In1P->portsType.msgtl_number, (In2P->controlType.msgtl_header.msgt_inline) ? In2P->control : In2P->controlP, In2P->controlType.msgtl_number, &OutP->amount); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In2P->controlType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In2P->controlP, In2P->controlType.msgtl_number); | |
@@ -1542,8 +1544,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t addrType; | |
- mach_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
mach_msg_type_long_t dataType; | |
union { | |
char data[2048]; | |
@@ -1551,7 +1552,7 @@ | |
}; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t controlType; | |
@@ -1595,14 +1596,14 @@ | |
const mach_msg_type_t addrType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t dataType = { | |
.msgtl_header = { | |
@@ -1619,8 +1620,8 @@ | |
const mach_msg_type_long_t portsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -1654,7 +1655,7 @@ | |
sock_user_t sock; | |
mach_msg_type_name_t addrPoly; | |
mach_msg_type_number_t dataCnt; | |
- mach_port_t ports[512]; | |
+ mach_port_t ports[256]; | |
mach_msg_type_name_t portsPoly; | |
mach_msg_type_number_t portsCnt; | |
char control[2048]; | |
@@ -1690,12 +1691,12 @@ | |
dataCnt = 2048; | |
portsP = ports; | |
- portsCnt = 512; | |
+ portsCnt = 256; | |
controlP = control; | |
controlCnt = 2048; | |
- OutP->RetCode = S_socket_recv(sock, &OutP->addr, &addrPoly, In0P->flags, &dataP, &dataCnt, &portsP, &portsPoly, &portsCnt, &controlP, &controlCnt, &outflags, In0P->amount); | |
+ OutP->RetCode = S_socket_recv(sock, &OutP->addr.name, &addrPoly, In0P->flags, &dataP, &dataCnt, &portsP, &portsPoly, &portsCnt, &controlP, &controlCnt, &outflags, In0P->amount); | |
end_using_socket_port(sock); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1727,12 +1728,20 @@ | |
if (portsP != ports) { | |
OutP->portsType.msgtl_header.msgt_inline = FALSE; | |
OutP->portsType.msgtl_header.msgt_deallocate = TRUE; | |
+ OutP->portsType.msgtl_header.msgt_size = 32; | |
OutP->portsP = portsP; | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (portsCnt) | |
- memcpy(OutP->ports, ports, 4 * portsCnt); | |
+ if (portsCnt) { | |
+ /* Copy array of mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_msg_type_number_t i; | |
+ for(i = 0; i < portsCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ OutP->ports[i].kernel_port_do_not_use = 0; | |
+ OutP->ports[i].name = ports[i]; | |
+ } | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(portsPoly)) | |
@@ -1741,7 +1750,7 @@ | |
OutP->portsType.msgtl_name = portsPoly; | |
OutP->portsType.msgtl_number = portsCnt; | |
- msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? (4 * portsCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? 8 * portsCnt : sizeof(mach_port_t *); | |
msgh_size += msgh_size_delta; | |
OutP = (Reply *) ((char *) OutP + msgh_size_delta - 2048); | |
@@ -1754,8 +1763,9 @@ | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (controlCnt) | |
+ if (controlCnt) { | |
memcpy(OutP->control, control, controlCnt); | |
+ } | |
} | |
OutP->controlType.msgtl_number = controlCnt; | |
@@ -1795,22 +1805,22 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t socket_server_routines[] = { | |
- _Xsocket_create, | |
- _Xsocket_listen, | |
- _Xsocket_accept, | |
- _Xsocket_connect, | |
- _Xsocket_bind, | |
- _Xsocket_name, | |
- _Xsocket_peername, | |
- _Xsocket_connect2, | |
- _Xsocket_create_address, | |
- _Xsocket_fabricate_address, | |
- _Xsocket_whatis_address, | |
- _Xsocket_shutdown, | |
- _Xsocket_getopt, | |
- _Xsocket_setopt, | |
- _Xsocket_send, | |
- _Xsocket_recv, | |
+ _Xsocket_create, /* 26000 */ | |
+ _Xsocket_listen, /* 26001 */ | |
+ _Xsocket_accept, /* 26002 */ | |
+ _Xsocket_connect, /* 26003 */ | |
+ _Xsocket_bind, /* 26004 */ | |
+ _Xsocket_name, /* 26005 */ | |
+ _Xsocket_peername, /* 26006 */ | |
+ _Xsocket_connect2, /* 26007 */ | |
+ _Xsocket_create_address, /* 26008 */ | |
+ _Xsocket_fabricate_address, /* 26009 */ | |
+ _Xsocket_whatis_address, /* 26010 */ | |
+ _Xsocket_shutdown, /* 26011 */ | |
+ _Xsocket_getopt, /* 26012 */ | |
+ _Xsocket_setopt, /* 26013 */ | |
+ _Xsocket_send, /* 26014 */ | |
+ _Xsocket_recv, /* 26015 */ | |
}; | |
mig_external boolean_t socket_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/pfinet/startup_notifyServer.c 2023-11-24 15:42:42.921018207 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/pfinet/startup_notifyServer.c 2023-11-22 01:44:15.621660511 -0500 | |
@@ -98,7 +98,7 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t startup_notify_server_routines[] = { | |
- _Xstartup_dosync, | |
+ _Xstartup_dosync, /* 29500 */ | |
}; | |
mig_external boolean_t startup_notify_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libcons/fs_notifyServer.c 2023-11-24 15:42:37.841130072 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libcons/fs_notifyServer.c 2023-11-22 01:44:12.281627019 -0500 | |
@@ -277,8 +277,8 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t cons_fs_notify_server_routines[] = { | |
- _Xdir_changed, | |
- _Xfile_changed, | |
+ _Xdir_changed, /* 20500 */ | |
+ _Xfile_changed, /* 20501 */ | |
}; | |
mig_external boolean_t cons_fs_notify_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/proc/processServer.c 2023-11-24 15:42:37.897128839 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/proc/processServer.c 2023-11-22 01:44:12.297627180 -0500 | |
@@ -68,11 +68,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t host_privType; | |
- mach_port_t host_priv; | |
- char host_privPad[4]; | |
+ mach_port_name_inlined_t host_priv; | |
mach_msg_type_t device_masterType; | |
- mach_port_t device_master; | |
- char device_masterPad[4]; | |
+ mach_port_name_inlined_t device_master; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -82,25 +80,25 @@ | |
const mach_msg_type_t host_privType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t device_masterType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
pstruct_t process; | |
@@ -115,7 +113,7 @@ | |
else | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_getprivports(process, &OutP->host_priv, &OutP->device_master); | |
+ OutP->RetCode = S_proc_getprivports(process, &OutP->host_priv.name, &OutP->device_master.name); | |
end_using_proc(process); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -237,7 +235,7 @@ | |
mach_msg_header_t Head; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t intsType; | |
@@ -265,6 +263,8 @@ | |
pstruct_t process; | |
+ mach_port_t *portsP; | |
+ | |
#if TypeCheck | |
msgh_size = In0P->Head.msgh_size; | |
if (mig_unlikely ((msgh_size < 48) || | |
@@ -275,11 +275,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In0P->portsType.msgtl_header.msgt_longform != TRUE) || | |
(In0P->portsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In0P->portsType.msgtl_size != 32))) | |
+ (In0P->portsType.msgtl_size != 64 && In0P->portsType.msgtl_header.msgt_inline == TRUE) || | |
+ (In0P->portsType.msgtl_size != 32 && In0P->portsType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In0P->portsType.msgtl_header.msgt_inline) ? (4 * In0P->portsType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In0P->portsType.msgtl_header.msgt_inline) ? 8 * In0P->portsType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 48 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -305,7 +306,17 @@ | |
else | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_setexecdata(process, (In0P->portsType.msgtl_header.msgt_inline) ? In0P->ports : In0P->portsP, In0P->portsType.msgtl_number, (In1P->intsType.msgtl_header.msgt_inline) ? In1P->ints : In1P->intsP, In1P->intsType.msgtl_number); | |
+ if (In0P->portsType.msgtl_header.msgt_inline) { | |
+ portsP = (mach_port_t *)In0P->ports; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In0P->portsType.msgtl_number; i++) { | |
+ portsP[i] = In0P->ports[i].name; | |
+ } | |
+ } else { | |
+ portsP = In0P->portsP; | |
+ } | |
+ OutP->RetCode = S_proc_setexecdata(process, portsP, In0P->portsType.msgtl_number, (In1P->intsType.msgtl_header.msgt_inline) ? In1P->ints : In1P->intsP, In1P->intsType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In1P->intsType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In1P->intsP, 4 * In1P->intsType.msgtl_number); | |
@@ -343,7 +354,7 @@ | |
char RetCodePad[4]; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t intsType; | |
@@ -365,8 +376,8 @@ | |
const mach_msg_type_long_t portsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -407,7 +418,7 @@ | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
portsP = OutP->ports; | |
- portsCnt = 512; | |
+ portsCnt = 256; | |
intsP = ints; | |
intsCnt = 512; | |
@@ -423,8 +434,19 @@ | |
if (portsP != OutP->ports) { | |
OutP->portsType.msgtl_header.msgt_inline = FALSE; | |
OutP->portsType.msgtl_header.msgt_deallocate = TRUE; | |
+ OutP->portsType.msgtl_header.msgt_size = 32; | |
OutP->portsP = portsP; | |
msgh_simple = FALSE; | |
+ } else { | |
+ /* Resize mach_port_name_t array into mach_port_name_inlined_t. */ | |
+ /* Work in reverse order to avoid overriding subsequent entries. */ | |
+ mach_msg_type_number_t i; | |
+ for(i = portsCnt; i > 0; i--) { | |
+ mach_port_name_t tmp_port_name = portsP[i - 1]; | |
+ /* Clear the whole message with zeros. */ | |
+ OutP->ports[i - 1].kernel_port_do_not_use = 0; | |
+ OutP->ports[i - 1].name = tmp_port_name; | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(portsPoly)) | |
@@ -433,7 +455,7 @@ | |
OutP->portsType.msgtl_name = portsPoly; | |
OutP->portsType.msgtl_number = portsCnt; | |
- msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? (4 * portsCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? 8 * portsCnt : sizeof(mach_port_t *); | |
msgh_size = 64 + msgh_size_delta; | |
OutP = (Reply *) ((char *) OutP + msgh_size_delta - 2048); | |
@@ -446,8 +468,9 @@ | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (intsCnt) | |
+ if (intsCnt) { | |
memcpy(OutP->ints, ints, 4 * intsCnt); | |
+ } | |
} | |
OutP->intsType.msgtl_number = intsCnt; | |
@@ -480,8 +503,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t notifyType; | |
- mach_port_t notify; | |
- char notifyPad[4]; | |
+ mach_port_name_inlined_t notify; | |
} Request; | |
typedef struct { | |
@@ -498,7 +520,7 @@ | |
const mach_msg_type_t notifyCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -524,7 +546,7 @@ | |
else | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_execdata_notify(process, In0P->notify); | |
+ OutP->RetCode = S_proc_execdata_notify(process, In0P->notify.name); | |
end_using_proc(process); | |
} | |
@@ -612,8 +634,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t credentialType; | |
- mach_port_t credential; | |
- char credentialPad[4]; | |
+ mach_port_name_inlined_t credential; | |
mach_msg_type_t nameType; | |
string_t name; | |
mach_msg_type_t releaseType; | |
@@ -636,7 +657,7 @@ | |
const mach_msg_type_t credentialCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -707,7 +728,7 @@ | |
else | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_register_version(process, In0P->credential, In0P->name, In0P->release, In0P->version); | |
+ OutP->RetCode = S_proc_register_version(process, In0P->credential.name, In0P->name, In0P->release, In0P->version); | |
end_using_proc(process); | |
} | |
@@ -731,8 +752,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t rendezvousType; | |
- mach_port_t rendezvous; | |
- char rendezvousPad[4]; | |
+ mach_port_name_inlined_t rendezvous; | |
} Request; | |
typedef struct { | |
@@ -749,7 +769,7 @@ | |
const mach_msg_type_t rendezvousCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -775,7 +795,7 @@ | |
else | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_reauthenticate(process, In0P->rendezvous); | |
+ OutP->RetCode = S_proc_reauthenticate(process, In0P->rendezvous.name); | |
end_using_proc(process); | |
} | |
@@ -796,8 +816,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t childType; | |
- mach_port_t child; | |
- char childPad[4]; | |
+ mach_port_name_inlined_t child; | |
} Request; | |
typedef struct { | |
@@ -814,7 +833,7 @@ | |
const mach_msg_type_t childCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -840,7 +859,7 @@ | |
else | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_child(process, In0P->child); | |
+ OutP->RetCode = S_proc_child(process, In0P->child.name); | |
end_using_proc(process); | |
} | |
@@ -861,8 +880,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t newmsgportType; | |
- mach_port_t newmsgport; | |
- char newmsgportPad[4]; | |
+ mach_port_name_inlined_t newmsgport; | |
} Request; | |
typedef struct { | |
@@ -871,8 +889,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t oldmsgportType; | |
- mach_port_t oldmsgport; | |
- char oldmsgportPad[4]; | |
+ mach_port_name_inlined_t oldmsgport; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -883,7 +900,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t newmsgportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -893,14 +910,14 @@ | |
const mach_msg_type_t oldmsgportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
pstruct_t process; | |
mach_port_t reply_port; | |
@@ -925,9 +942,9 @@ | |
reply_port = In0P->Head.msgh_reply_port; | |
- newmsgport = In0P->newmsgport; | |
+ newmsgport = In0P->newmsgport.name; | |
- OutP->RetCode = S_proc_setmsgport(process, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), newmsgport, &OutP->oldmsgport, &oldmsgportPoly); | |
+ OutP->RetCode = S_proc_setmsgport(process, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), newmsgport, &OutP->oldmsgport.name, &oldmsgportPoly); | |
end_using_proc(process); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -967,8 +984,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t newtaskType; | |
- mach_port_t newtask; | |
- char newtaskPad[4]; | |
+ mach_port_name_inlined_t newtask; | |
} Request; | |
typedef struct { | |
@@ -985,7 +1001,7 @@ | |
const mach_msg_type_t newtaskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1011,7 +1027,7 @@ | |
else | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_reassign(process, In0P->newtask); | |
+ OutP->RetCode = S_proc_reassign(process, In0P->newtask.name); | |
end_using_proc(process); | |
} | |
@@ -1391,8 +1407,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t msgportType; | |
- mach_port_t msgport; | |
- char msgportPad[4]; | |
+ mach_port_name_inlined_t msgport; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1413,14 +1428,14 @@ | |
const mach_msg_type_t msgportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
pstruct_t process; | |
mach_port_t reply_port; | |
@@ -1444,7 +1459,7 @@ | |
reply_port = In0P->Head.msgh_reply_port; | |
- OutP->RetCode = S_proc_getmsgport(process, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->pid, &OutP->msgport, &msgportPoly); | |
+ OutP->RetCode = S_proc_getmsgport(process, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->pid, &OutP->msgport.name, &msgportPoly); | |
end_using_proc(process); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1644,8 +1659,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t contthreadType; | |
- mach_port_t contthread; | |
- char contthreadPad[4]; | |
+ mach_port_name_inlined_t contthread; | |
} Request; | |
typedef struct { | |
@@ -1662,7 +1676,7 @@ | |
const mach_msg_type_t contthreadCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1688,7 +1702,7 @@ | |
else | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_dostop(process, In0P->contthread); | |
+ OutP->RetCode = S_proc_dostop(process, In0P->contthread.name); | |
end_using_proc(process); | |
} | |
@@ -1709,11 +1723,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t msgportType; | |
- mach_port_t msgport; | |
- char msgportPad[4]; | |
+ mach_port_name_inlined_t msgport; | |
mach_msg_type_t forwardportType; | |
- mach_port_t forwardport; | |
- char forwardportPad[4]; | |
+ mach_port_name_inlined_t forwardport; | |
mach_msg_type_t flavorType; | |
int flavor; | |
char flavorPad[4]; | |
@@ -1740,7 +1752,7 @@ | |
const mach_msg_type_t msgportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_RECEIVE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1750,7 +1762,7 @@ | |
const mach_msg_type_t forwardportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1810,7 +1822,7 @@ | |
else | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_handle_exceptions(process, In0P->msgport, In0P->forwardport, In0P->flavor, In0P->new_state, In0P->new_stateType.msgt_number); | |
+ OutP->RetCode = S_proc_handle_exceptions(process, In0P->msgport.name, In0P->forwardport.name, In0P->flavor, In0P->new_state, In0P->new_stateType.msgt_number); | |
end_using_proc(process); | |
} | |
@@ -2216,8 +2228,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -2237,14 +2248,14 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
pstruct_t process; | |
@@ -2264,7 +2275,7 @@ | |
else | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_pid2task(process, In0P->pid, &OutP->task); | |
+ OutP->RetCode = S_proc_pid2task(process, In0P->pid, &OutP->task.name); | |
end_using_proc(process); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2293,8 +2304,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
} Request; | |
typedef struct { | |
@@ -2314,7 +2324,7 @@ | |
const mach_msg_type_t taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2351,7 +2361,7 @@ | |
else | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_task2pid(process, In0P->task, &OutP->pid); | |
+ OutP->RetCode = S_proc_task2pid(process, In0P->task.name, &OutP->pid); | |
end_using_proc(process); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2379,8 +2389,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
} Request; | |
typedef struct { | |
@@ -2389,8 +2398,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t procType; | |
- mach_port_t proc; | |
- char procPad[4]; | |
+ mach_port_name_inlined_t proc; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -2401,7 +2409,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2411,14 +2419,14 @@ | |
const mach_msg_type_t procType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
pstruct_t process; | |
mach_msg_type_name_t procPoly; | |
@@ -2439,7 +2447,7 @@ | |
else | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_task2proc(process, In0P->task, &OutP->proc, &procPoly); | |
+ OutP->RetCode = S_proc_task2proc(process, In0P->task.name, &OutP->proc.name, &procPoly); | |
end_using_proc(process); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2484,8 +2492,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -2495,14 +2502,14 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
pstruct_t process; | |
@@ -2517,7 +2524,7 @@ | |
else | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_proc2task(process, &OutP->task); | |
+ OutP->RetCode = S_proc_proc2task(process, &OutP->task.name); | |
end_using_proc(process); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2555,8 +2562,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t procType; | |
- mach_port_t proc; | |
- char procPad[4]; | |
+ mach_port_name_inlined_t proc; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -2577,14 +2583,14 @@ | |
const mach_msg_type_t procType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
pstruct_t process; | |
mach_msg_type_name_t procPoly; | |
@@ -2605,7 +2611,7 @@ | |
else | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_pid2proc(process, In0P->pid, &OutP->proc, &procPoly); | |
+ OutP->RetCode = S_proc_pid2proc(process, In0P->pid, &OutP->proc.name, &procPoly); | |
end_using_proc(process); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2802,8 +2808,9 @@ | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (threadwaitsCnt) | |
+ if (threadwaitsCnt) { | |
memcpy(OutP->threadwaits, threadwaits, threadwaitsCnt); | |
+ } | |
} | |
OutP->threadwaitsType.msgtl_number = threadwaitsCnt; | |
@@ -3783,8 +3790,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t sessportType; | |
- mach_port_t sessport; | |
- char sessportPad[4]; | |
+ mach_port_name_inlined_t sessport; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -3795,14 +3801,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t sessportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
pstruct_t process; | |
mach_msg_type_name_t sessportPoly; | |
@@ -3818,7 +3824,7 @@ | |
else | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_getsidport(process, &OutP->sessport, &sessportPoly); | |
+ OutP->RetCode = S_proc_getsidport(process, &OutP->sessport.name, &sessportPoly); | |
end_using_proc(process); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -4144,8 +4150,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t ttyType; | |
- mach_port_t tty; | |
- char ttyPad[4]; | |
+ mach_port_name_inlined_t tty; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -4166,14 +4171,14 @@ | |
const mach_msg_type_t ttyType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
pstruct_t calling_process; | |
mach_msg_type_name_t ttyPoly; | |
@@ -4194,7 +4199,7 @@ | |
else | |
calling_process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_get_tty(calling_process, In0P->target_process, &OutP->tty, &ttyPoly); | |
+ OutP->RetCode = S_proc_get_tty(calling_process, In0P->target_process, &OutP->tty.name, &ttyPoly); | |
end_using_proc(calling_process); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -4318,8 +4323,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
} Request; | |
typedef struct { | |
@@ -4336,7 +4340,7 @@ | |
const mach_msg_type_t taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -4362,7 +4366,7 @@ | |
else | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_set_init_task(process, In0P->task); | |
+ OutP->RetCode = S_proc_set_init_task(process, In0P->task.name); | |
end_using_proc(process); | |
} | |
@@ -4660,8 +4664,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t notifyType; | |
- mach_port_t notify; | |
- char notifyPad[4]; | |
+ mach_port_name_inlined_t notify; | |
} Request; | |
typedef struct { | |
@@ -4678,7 +4681,7 @@ | |
const mach_msg_type_t notifyCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -4704,7 +4707,7 @@ | |
else | |
process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_make_task_namespace(process, In0P->notify); | |
+ OutP->RetCode = S_proc_make_task_namespace(process, In0P->notify.name); | |
end_using_proc(process); | |
} | |
@@ -5164,11 +5167,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t rendezvousType; | |
- mach_port_t rendezvous; | |
- char rendezvousPad[4]; | |
+ mach_port_name_inlined_t rendezvous; | |
mach_msg_type_t new_taskType; | |
- mach_port_t new_task; | |
- char new_taskPad[4]; | |
+ mach_port_name_inlined_t new_task; | |
} Request; | |
typedef struct { | |
@@ -5185,7 +5186,7 @@ | |
const mach_msg_type_t rendezvousCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -5195,7 +5196,7 @@ | |
const mach_msg_type_t new_taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -5226,7 +5227,7 @@ | |
else | |
old_process = begin_using_proc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_reauthenticate_reassign(old_process, In0P->rendezvous, In0P->new_task); | |
+ OutP->RetCode = S_proc_reauthenticate_reassign(old_process, In0P->rendezvous.name, In0P->new_task.name); | |
end_using_proc(old_process); | |
} | |
@@ -5292,67 +5293,67 @@ | |
0, | |
0, | |
0, | |
- _Xproc_getprivports, | |
- _Xproc_getallpids, | |
- _Xproc_setexecdata, | |
- _Xproc_getexecdata, | |
- _Xproc_execdata_notify, | |
- _Xproc_uname, | |
- _Xproc_register_version, | |
- _Xproc_reauthenticate, | |
- _Xproc_child, | |
- _Xproc_setmsgport, | |
- _Xproc_reassign, | |
- _Xproc_setowner, | |
- _Xproc_getpids, | |
- _Xproc_set_arg_locations, | |
- _Xproc_get_arg_locations, | |
- _Xproc_getmsgport, | |
- _Xproc_wait, | |
- _Xproc_dostop, | |
- _Xproc_handle_exceptions, | |
- _Xproc_mark_stop, | |
- _Xproc_mark_cont, | |
- _Xproc_mark_exit, | |
- _Xproc_mark_exec, | |
- _Xproc_mark_traced, | |
- _Xproc_mod_stopchild, | |
- _Xproc_pid2task, | |
- _Xproc_task2pid, | |
- _Xproc_task2proc, | |
- _Xproc_proc2task, | |
- _Xproc_pid2proc, | |
- _Xproc_getprocinfo, | |
- _Xproc_getprocargs, | |
- _Xproc_getprocenv, | |
- _Xproc_make_login_coll, | |
- _Xproc_getloginid, | |
- _Xproc_getloginpids, | |
- _Xproc_setlogin, | |
- _Xproc_getlogin, | |
- _Xproc_setsid, | |
- _Xproc_getsid, | |
- _Xproc_getsessionpgids, | |
- _Xproc_getsessionpids, | |
- _Xproc_getsidport, | |
- _Xproc_setpgrp, | |
- _Xproc_getpgrp, | |
- _Xproc_getpgrppids, | |
- _Xproc_get_tty, | |
- _Xproc_getnports, | |
- _Xproc_set_init_task, | |
- _Xproc_mark_important, | |
- _Xproc_is_important, | |
- _Xproc_set_code, | |
- _Xproc_get_code, | |
- _Xproc_make_task_namespace, | |
- _Xproc_set_exe, | |
- _Xproc_get_exe, | |
- _Xproc_set_entry, | |
- _Xproc_get_entry, | |
- _Xproc_waitid, | |
- _Xproc_reauthenticate_reassign, | |
- _Xproc_reauthenticate_complete, | |
+ _Xproc_getprivports, /* 24004 */ | |
+ _Xproc_getallpids, /* 24005 */ | |
+ _Xproc_setexecdata, /* 24006 */ | |
+ _Xproc_getexecdata, /* 24007 */ | |
+ _Xproc_execdata_notify, /* 24008 */ | |
+ _Xproc_uname, /* 24009 */ | |
+ _Xproc_register_version, /* 24010 */ | |
+ _Xproc_reauthenticate, /* 24011 */ | |
+ _Xproc_child, /* 24012 */ | |
+ _Xproc_setmsgport, /* 24013 */ | |
+ _Xproc_reassign, /* 24014 */ | |
+ _Xproc_setowner, /* 24015 */ | |
+ _Xproc_getpids, /* 24016 */ | |
+ _Xproc_set_arg_locations, /* 24017 */ | |
+ _Xproc_get_arg_locations, /* 24018 */ | |
+ _Xproc_getmsgport, /* 24019 */ | |
+ _Xproc_wait, /* 24020 */ | |
+ _Xproc_dostop, /* 24021 */ | |
+ _Xproc_handle_exceptions, /* 24022 */ | |
+ _Xproc_mark_stop, /* 24023 */ | |
+ _Xproc_mark_cont, /* 24024 */ | |
+ _Xproc_mark_exit, /* 24025 */ | |
+ _Xproc_mark_exec, /* 24026 */ | |
+ _Xproc_mark_traced, /* 24027 */ | |
+ _Xproc_mod_stopchild, /* 24028 */ | |
+ _Xproc_pid2task, /* 24029 */ | |
+ _Xproc_task2pid, /* 24030 */ | |
+ _Xproc_task2proc, /* 24031 */ | |
+ _Xproc_proc2task, /* 24032 */ | |
+ _Xproc_pid2proc, /* 24033 */ | |
+ _Xproc_getprocinfo, /* 24034 */ | |
+ _Xproc_getprocargs, /* 24035 */ | |
+ _Xproc_getprocenv, /* 24036 */ | |
+ _Xproc_make_login_coll, /* 24037 */ | |
+ _Xproc_getloginid, /* 24038 */ | |
+ _Xproc_getloginpids, /* 24039 */ | |
+ _Xproc_setlogin, /* 24040 */ | |
+ _Xproc_getlogin, /* 24041 */ | |
+ _Xproc_setsid, /* 24042 */ | |
+ _Xproc_getsid, /* 24043 */ | |
+ _Xproc_getsessionpgids, /* 24044 */ | |
+ _Xproc_getsessionpids, /* 24045 */ | |
+ _Xproc_getsidport, /* 24046 */ | |
+ _Xproc_setpgrp, /* 24047 */ | |
+ _Xproc_getpgrp, /* 24048 */ | |
+ _Xproc_getpgrppids, /* 24049 */ | |
+ _Xproc_get_tty, /* 24050 */ | |
+ _Xproc_getnports, /* 24051 */ | |
+ _Xproc_set_init_task, /* 24052 */ | |
+ _Xproc_mark_important, /* 24053 */ | |
+ _Xproc_is_important, /* 24054 */ | |
+ _Xproc_set_code, /* 24055 */ | |
+ _Xproc_get_code, /* 24056 */ | |
+ _Xproc_make_task_namespace, /* 24057 */ | |
+ _Xproc_set_exe, /* 24058 */ | |
+ _Xproc_get_exe, /* 24059 */ | |
+ _Xproc_set_entry, /* 24060 */ | |
+ _Xproc_get_entry, /* 24061 */ | |
+ _Xproc_waitid, /* 24062 */ | |
+ _Xproc_reauthenticate_reassign, /* 24063 */ | |
+ _Xproc_reauthenticate_complete, /* 24064 */ | |
}; | |
mig_external boolean_t process_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/proc/task_notifyServer.c 2023-11-24 15:42:37.893128927 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/proc/task_notifyServer.c 2023-11-22 01:44:12.225626457 -0500 | |
@@ -51,11 +51,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t parentType; | |
- mach_port_t parent; | |
- char parentPad[4]; | |
+ mach_port_name_inlined_t parent; | |
} Request; | |
typedef struct { | |
@@ -72,7 +70,7 @@ | |
const mach_msg_type_t taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -82,7 +80,7 @@ | |
const mach_msg_type_t parentCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -113,7 +111,7 @@ | |
else | |
notify = begin_using_port_info_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_mach_notify_new_task(notify, In0P->task, In0P->parent); | |
+ OutP->RetCode = S_mach_notify_new_task(notify, In0P->task.name, In0P->parent.name); | |
end_using_port_info(notify); | |
} | |
@@ -129,7 +127,7 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t task_notify_server_routines[] = { | |
- _Xmach_notify_new_task, | |
+ _Xmach_notify_new_task, /* 4400 */ | |
}; | |
mig_external boolean_t task_notify_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/proc/gnumachUser.c 2023-11-24 15:42:37.941127870 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/proc/gnumachUser.c 2023-11-18 23:19:19.473449829 -0500 | |
@@ -166,8 +166,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t thread_nameType; | |
mach_port_name_t thread_name; | |
char thread_namePad[4]; | |
@@ -189,14 +188,14 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t thread_nameType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_NAME, | |
@@ -244,7 +243,7 @@ | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->thread_nameType = thread_nameType; | |
@@ -340,8 +339,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t notificationType; | |
- mach_port_t notification; | |
- char notificationPad[4]; | |
+ mach_port_name_inlined_t notification; | |
} Request; | |
typedef struct { | |
@@ -364,14 +362,14 @@ | |
const mach_msg_type_t notificationType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -385,7 +383,7 @@ | |
InP->notificationType = notificationType; | |
- InP->notification = notification; | |
+ InP->notification.name = notification; | |
if (MACH_MSG_TYPE_PORT_ANY(notificationPoly)) | |
msgh_simple = FALSE; | |
@@ -810,8 +808,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t flagsType; | |
vm_wire_t flags; | |
char flagsPad[4]; | |
@@ -836,14 +833,14 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t flagsType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -868,7 +865,7 @@ | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->flagsType = flagsType; | |
@@ -1235,8 +1232,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t target_taskType; | |
- mach_port_t target_task; | |
- char target_taskPad[4]; | |
+ mach_port_name_inlined_t target_task; | |
mach_msg_type_t sizeType; | |
vm_size_t size; | |
mach_msg_type_t pminType; | |
@@ -1273,14 +1269,14 @@ | |
const mach_msg_type_t target_taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t sizeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -1358,7 +1354,7 @@ | |
InP->target_taskType = target_taskType; | |
- InP->target_task = target_task; | |
+ InP->target_task.name = target_task; | |
InP->sizeType = sizeType; | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/proc/ourmsgUser.c 2023-11-24 15:42:37.881129191 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/proc/ourmsgUser.c 2023-11-22 01:44:12.281627019 -0500 | |
@@ -69,8 +69,7 @@ | |
natural_t sigcode; | |
char sigcodePad[4]; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
union { | |
@@ -104,14 +103,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->signalType = signalType; | |
@@ -123,7 +122,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
@@ -152,8 +151,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t ppidType; | |
pid_t ppid; | |
char ppidPad[4]; | |
@@ -174,14 +172,14 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t ppidType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -218,7 +216,7 @@ | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->ppidType = ppidType; | |
@@ -256,8 +254,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t authType; | |
- auth_t auth; | |
- char authPad[4]; | |
+ mach_port_name_inlined_t auth; | |
} Request; | |
union { | |
@@ -269,18 +266,18 @@ | |
const mach_msg_type_t authType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(auth_t) == 4 * 1, "expected auth_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->authType = authType; | |
- InP->auth = auth; | |
+ InP->auth.name = auth; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
@@ -310,8 +307,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_long_t uidsType; | |
union { | |
int uids[512]; | |
@@ -335,14 +331,14 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t uidsType = { | |
.msgtl_header = { | |
@@ -370,7 +366,7 @@ | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->uidsType = uidsType; | |
@@ -427,14 +423,12 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
union { | |
@@ -446,14 +440,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t whichType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -468,18 +462,18 @@ | |
const mach_msg_type_t portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->whichType = whichType; | |
@@ -487,7 +481,7 @@ | |
InP->portType = portType; | |
- InP->port = port; | |
+ InP->port.name = port; | |
InP->portType.msgt_name = portPoly; | |
@@ -518,14 +512,12 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
union { | |
@@ -537,14 +529,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t whichType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -559,18 +551,18 @@ | |
const mach_msg_type_t portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->whichType = whichType; | |
@@ -578,7 +570,7 @@ | |
InP->portType = portType; | |
- InP->port = port; | |
+ InP->port.name = port; | |
InP->portType.msgt_name = portPoly; | |
@@ -609,11 +601,10 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
const mach_port_t *portsP; | |
}; | |
} Request; | |
@@ -628,20 +619,20 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t portsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -651,24 +642,33 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->portsType = portsType; | |
- if (portsCnt > 512) { | |
+ if (portsCnt > 256) { | |
InP->portsType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->portsType.msgtl_header.msgt_size = 32; | |
InP->portsType.msgtl_header.msgt_deallocate = TRUE; | |
InP->portsP = ports; | |
} | |
else if (portsCnt) { | |
- memcpy(InP->ports, ports, 4 * portsCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)InP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < portsCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_ports[i].kernel_port_do_not_use = 0; | |
+ inlined_ports[i].name = (ports)[i]; | |
+ } | |
} | |
InP->portsType.msgtl_name = portsPoly; | |
InP->portsType.msgtl_number = portsCnt; | |
- msgh_size = 56 + ((InP->portsType.msgtl_header.msgt_inline) ? (4 * portsCnt + 7) & ~7 : sizeof(mach_port_t *)); | |
+ msgh_size = 56 + ((InP->portsType.msgtl_header.msgt_inline) ? 8 * portsCnt : sizeof(mach_port_t *)); | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
/* msgh_size filled below */ | |
@@ -695,11 +695,10 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
const mach_port_t *portsP; | |
}; | |
} Request; | |
@@ -714,20 +713,20 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t portsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -737,23 +736,32 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->portsType = portsType; | |
- if (portsCnt > 512) { | |
+ if (portsCnt > 256) { | |
InP->portsType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->portsType.msgtl_header.msgt_size = 32; | |
InP->portsP = ports; | |
} | |
else if (portsCnt) { | |
- memcpy(InP->ports, ports, 4 * portsCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)InP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < portsCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_ports[i].kernel_port_do_not_use = 0; | |
+ inlined_ports[i].name = (ports)[i]; | |
+ } | |
} | |
InP->portsType.msgtl_name = portsPoly; | |
InP->portsType.msgtl_number = portsCnt; | |
- msgh_size = 56 + ((InP->portsType.msgtl_header.msgt_inline) ? (4 * portsCnt + 7) & ~7 : sizeof(mach_port_t *)); | |
+ msgh_size = 56 + ((InP->portsType.msgtl_header.msgt_inline) ? 8 * portsCnt : sizeof(mach_port_t *)); | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
/* msgh_size filled below */ | |
@@ -779,8 +787,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
@@ -798,14 +805,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t whichType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -831,7 +838,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->whichType = whichType; | |
@@ -867,8 +874,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
@@ -886,14 +892,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t whichType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -919,7 +925,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->whichType = whichType; | |
@@ -955,8 +961,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t valuesType; | |
union { | |
int values[512]; | |
@@ -974,14 +979,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t valuesType = { | |
.msgtl_header = { | |
@@ -997,7 +1002,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->valuesType = valuesType; | |
@@ -1038,8 +1043,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t valuesType; | |
union { | |
int values[512]; | |
@@ -1057,14 +1061,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t valuesType = { | |
.msgtl_header = { | |
@@ -1080,7 +1084,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->valuesType = valuesType; | |
@@ -1121,11 +1125,10 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t dtableType; | |
union { | |
- mach_port_t dtable[512]; | |
+ mach_port_name_inlined_t dtable[256]; | |
const mach_port_t *dtableP; | |
}; | |
} Request; | |
@@ -1140,20 +1143,20 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t dtableType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -1163,24 +1166,33 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->dtableType = dtableType; | |
- if (dtableCnt > 512) { | |
+ if (dtableCnt > 256) { | |
InP->dtableType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->dtableType.msgtl_header.msgt_size = 32; | |
InP->dtableType.msgtl_header.msgt_deallocate = TRUE; | |
InP->dtableP = dtable; | |
} | |
else if (dtableCnt) { | |
- memcpy(InP->dtable, dtable, 4 * dtableCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_dtable = (mach_port_name_inlined_t *)InP->dtable; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < dtableCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_dtable[i].kernel_port_do_not_use = 0; | |
+ inlined_dtable[i].name = (dtable)[i]; | |
+ } | |
} | |
InP->dtableType.msgtl_name = dtablePoly; | |
InP->dtableType.msgtl_number = dtableCnt; | |
- msgh_size = 56 + ((InP->dtableType.msgtl_header.msgt_inline) ? (4 * dtableCnt + 7) & ~7 : sizeof(mach_port_t *)); | |
+ msgh_size = 56 + ((InP->dtableType.msgtl_header.msgt_inline) ? 8 * dtableCnt : sizeof(mach_port_t *)); | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
/* msgh_size filled below */ | |
@@ -1207,11 +1219,10 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t dtableType; | |
union { | |
- mach_port_t dtable[512]; | |
+ mach_port_name_inlined_t dtable[256]; | |
const mach_port_t *dtableP; | |
}; | |
} Request; | |
@@ -1226,20 +1237,20 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t dtableType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -1249,23 +1260,32 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->dtableType = dtableType; | |
- if (dtableCnt > 512) { | |
+ if (dtableCnt > 256) { | |
InP->dtableType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->dtableType.msgtl_header.msgt_size = 32; | |
InP->dtableP = dtable; | |
} | |
else if (dtableCnt) { | |
- memcpy(InP->dtable, dtable, 4 * dtableCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_dtable = (mach_port_name_inlined_t *)InP->dtable; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < dtableCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_dtable[i].kernel_port_do_not_use = 0; | |
+ inlined_dtable[i].name = (dtable)[i]; | |
+ } | |
} | |
InP->dtableType.msgtl_name = dtablePoly; | |
InP->dtableType.msgtl_number = dtableCnt; | |
- msgh_size = 56 + ((InP->dtableType.msgtl_header.msgt_inline) ? (4 * dtableCnt + 7) & ~7 : sizeof(mach_port_t *)); | |
+ msgh_size = 56 + ((InP->dtableType.msgtl_header.msgt_inline) ? 8 * dtableCnt : sizeof(mach_port_t *)); | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
/* msgh_size filled below */ | |
@@ -1292,14 +1312,12 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t fdType; | |
int fd; | |
char fdPad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
union { | |
@@ -1311,14 +1329,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t fdType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -1333,18 +1351,18 @@ | |
const mach_msg_type_t portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->fdType = fdType; | |
@@ -1352,7 +1370,7 @@ | |
InP->portType = portType; | |
- InP->port = port; | |
+ InP->port.name = port; | |
InP->portType.msgt_name = portPoly; | |
@@ -1383,14 +1401,12 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t fdType; | |
int fd; | |
char fdPad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
union { | |
@@ -1402,14 +1418,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t fdType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -1424,18 +1440,18 @@ | |
const mach_msg_type_t portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->fdType = fdType; | |
@@ -1443,7 +1459,7 @@ | |
InP->portType = portType; | |
- InP->port = port; | |
+ InP->port.name = port; | |
InP->portType.msgt_name = portPoly; | |
@@ -1541,8 +1557,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t valueType; | |
union { | |
char value[2048]; | |
@@ -1560,14 +1575,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t valueType = { | |
.msgtl_header = { | |
@@ -1583,7 +1598,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->valueType = valueType; | |
@@ -1710,8 +1725,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t variableType; | |
string_t variable; | |
mach_msg_type_t valueType; | |
@@ -1730,14 +1744,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t variableType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_STRING_C, | |
@@ -1774,7 +1788,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->variableType = variableType; | |
@@ -1820,8 +1834,7 @@ | |
natural_t sigcode; | |
char sigcodePad[4]; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
union { | |
@@ -1855,14 +1868,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->signalType = signalType; | |
@@ -1874,7 +1887,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); | |
@@ -1902,8 +1915,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t threadType; | |
- mach_port_t thread; | |
- char threadPad[4]; | |
+ mach_port_name_inlined_t thread; | |
mach_msg_type_t wait_descType; | |
string_t wait_desc; | |
mach_msg_type_t wait_rpcType; | |
@@ -1920,14 +1932,14 @@ | |
const mach_msg_type_t threadType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t wait_descType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_STRING_C, | |
@@ -1953,7 +1965,7 @@ | |
InP->threadType = threadType; | |
- InP->thread = thread; | |
+ InP->thread.name = thread; | |
InP->wait_descType = wait_descType; | |
@@ -1991,8 +2003,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t namesType; | |
union { | |
mach_port_name_t names[512]; | |
@@ -2016,14 +2027,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t namesType = { | |
.msgtl_header = { | |
@@ -2051,7 +2062,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->namesType = namesType; | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/proc/proc_excServer.c 2023-11-24 15:42:37.853129808 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/proc/proc_excServer.c 2023-11-22 01:44:12.205626257 -0500 | |
@@ -50,11 +50,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t threadType; | |
- mach_port_t thread; | |
- char threadPad[4]; | |
+ mach_port_name_inlined_t thread; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t exceptionType; | |
integer_t exception; | |
char exceptionPad[4]; | |
@@ -79,7 +77,7 @@ | |
const mach_msg_type_t threadCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -89,7 +87,7 @@ | |
const mach_msg_type_t taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -165,7 +163,7 @@ | |
else | |
exception_port = begin_using_exc_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_proc_exception_raise(exception_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->thread, In0P->task, In0P->exception, In0P->code, In0P->subcode); | |
+ OutP->RetCode = S_proc_exception_raise(exception_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->thread.name, In0P->task.name, In0P->exception, In0P->code, In0P->subcode); | |
end_using_exc(exception_port); | |
} | |
@@ -186,7 +184,7 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t proc_exc_server_routines[] = { | |
- _Xproc_exception_raise, | |
+ _Xproc_exception_raise, /* 2400 */ | |
}; | |
mig_external boolean_t proc_exc_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/proc/proc_excUser.c 2023-11-24 15:42:37.881129191 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/proc/proc_excUser.c 2023-11-22 01:44:12.277626979 -0500 | |
@@ -59,11 +59,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t threadType; | |
- mach_port_t thread; | |
- char threadPad[4]; | |
+ mach_port_name_inlined_t thread; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t exceptionType; | |
integer_t exception; | |
char exceptionPad[4]; | |
@@ -93,25 +91,25 @@ | |
const mach_msg_type_t threadType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t exceptionType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -158,11 +156,11 @@ | |
InP->threadType = threadType; | |
- InP->thread = thread; | |
+ InP->thread.name = thread; | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->exceptionType = exceptionType; | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/acpi/acpiServer.c 2023-11-24 15:42:42.817020497 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/acpi/acpiServer.c 2023-11-22 01:44:16.617670500 -0500 | |
@@ -244,8 +244,8 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t acpi_server_routines[] = { | |
- _Xacpi_sleep, | |
- _Xacpi_get_pci_irq, | |
+ _Xacpi_sleep, /* 41000 */ | |
+ _Xacpi_get_pci_irq, /* 41001 */ | |
}; | |
mig_external boolean_t acpi_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/acpi/startup_notifyServer.c 2023-11-24 15:42:43.017016093 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/acpi/startup_notifyServer.c 2023-11-22 01:44:16.577670099 -0500 | |
@@ -98,7 +98,7 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t startup_notify_server_routines[] = { | |
- _Xstartup_dosync, | |
+ _Xstartup_dosync, /* 29500 */ | |
}; | |
mig_external boolean_t startup_notify_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libps/termUser.c 2023-11-24 15:42:36.765153766 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libps/termUser.c 2023-11-22 01:44:11.425618439 -0500 | |
@@ -68,8 +68,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t cttyType; | |
- mach_port_t ctty; | |
- char cttyPad[4]; | |
+ mach_port_name_inlined_t ctty; | |
} Reply; | |
union { | |
@@ -100,7 +99,7 @@ | |
const mach_msg_type_t cttyCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -159,7 +158,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *ctty = OutP->ctty; | |
+ *ctty = OutP->ctty.name; | |
return KERN_SUCCESS; | |
} | |
@@ -189,8 +188,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t newttyType; | |
- mach_port_t newtty; | |
- char newttyPad[4]; | |
+ mach_port_name_inlined_t newtty; | |
} Reply; | |
union { | |
@@ -243,7 +241,7 @@ | |
const mach_msg_type_t newttyCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -310,7 +308,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *newtty = OutP->newtty; | |
+ *newtty = OutP->newtty.name; | |
return KERN_SUCCESS; | |
} | |
@@ -529,8 +527,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t filenodeType; | |
- file_t filenode; | |
- char filenodePad[4]; | |
+ mach_port_name_inlined_t filenode; | |
} Request; | |
typedef struct { | |
@@ -552,14 +549,14 @@ | |
const mach_msg_type_t filenodeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(file_t) == 4 * 1, "expected file_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -573,7 +570,7 @@ | |
InP->filenodeType = filenodeType; | |
- InP->filenode = filenode; | |
+ InP->filenode.name = filenode; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -735,8 +732,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t machdevType; | |
- mach_port_t machdev; | |
- char machdevPad[4]; | |
+ mach_port_name_inlined_t machdev; | |
} Request; | |
typedef struct { | |
@@ -758,14 +754,14 @@ | |
const mach_msg_type_t machdevType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -779,7 +775,7 @@ | |
InP->machdevType = machdevType; | |
- InP->machdev = machdev; | |
+ InP->machdev.name = machdev; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -832,8 +828,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t hurddevType; | |
- io_t hurddev; | |
- char hurddevPad[4]; | |
+ mach_port_name_inlined_t hurddev; | |
} Request; | |
typedef struct { | |
@@ -855,14 +850,14 @@ | |
const mach_msg_type_t hurddevType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(io_t) == 4 * 1, "expected io_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -876,7 +871,7 @@ | |
InP->hurddevType = hurddevType; | |
- InP->hurddev = hurddev; | |
+ InP->hurddev.name = hurddev; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -936,8 +931,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t ptymasterType; | |
- io_t ptymaster; | |
- char ptymasterPad[4]; | |
+ mach_port_name_inlined_t ptymaster; | |
} Reply; | |
union { | |
@@ -968,7 +962,7 @@ | |
const mach_msg_type_t ptymasterCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1027,7 +1021,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *ptymaster = OutP->ptymaster; | |
+ *ptymaster = OutP->ptymaster.name; | |
return KERN_SUCCESS; | |
} | |
@@ -1053,8 +1047,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t terminalType; | |
- mach_port_t terminal; | |
- char terminalPad[4]; | |
+ mach_port_name_inlined_t terminal; | |
} Reply; | |
union { | |
@@ -1096,7 +1089,7 @@ | |
const mach_msg_type_t terminalCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1159,7 +1152,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *terminal = OutP->terminal; | |
+ *terminal = OutP->terminal.name; | |
return KERN_SUCCESS; | |
} | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libps/msgUser.c 2023-11-24 15:42:36.765153766 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libps/msgUser.c 2023-11-22 01:44:11.429618478 -0500 | |
@@ -69,8 +69,7 @@ | |
natural_t sigcode; | |
char sigcodePad[4]; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -114,14 +113,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -143,7 +142,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -199,8 +198,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t ppidType; | |
pid_t ppid; | |
char ppidPad[4]; | |
@@ -231,14 +229,14 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t ppidType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -285,7 +283,7 @@ | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->ppidType = ppidType; | |
@@ -350,8 +348,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t authType; | |
- auth_t auth; | |
- char authPad[4]; | |
+ mach_port_name_inlined_t auth; | |
} Request; | |
typedef struct { | |
@@ -373,14 +370,14 @@ | |
const mach_msg_type_t authType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(auth_t) == 4 * 1, "expected auth_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -394,7 +391,7 @@ | |
InP->authType = authType; | |
- InP->auth = auth; | |
+ InP->auth.name = auth; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -451,8 +448,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_long_t uidsType; | |
union { | |
int uids[512]; | |
@@ -486,14 +482,14 @@ | |
const mach_msg_type_t taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t uidsType = { | |
.msgtl_header = { | |
@@ -531,7 +527,7 @@ | |
InP->taskType = taskType; | |
- InP->task = task; | |
+ InP->task.name = task; | |
InP->uidsType = uidsType; | |
@@ -614,8 +610,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
@@ -627,8 +622,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Reply; | |
union { | |
@@ -649,14 +643,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t whichType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -681,7 +675,7 @@ | |
const mach_msg_type_t portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -691,7 +685,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->whichType = whichType; | |
@@ -748,7 +742,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *port = OutP->port; | |
+ *port = OutP->port.name; | |
return KERN_SUCCESS; | |
} | |
@@ -766,14 +760,12 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -795,14 +787,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t whichType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -817,14 +809,14 @@ | |
const mach_msg_type_t portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -838,7 +830,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->whichType = whichType; | |
@@ -846,7 +838,7 @@ | |
InP->portType = portType; | |
- InP->port = port; | |
+ InP->port.name = port; | |
InP->portType.msgt_name = portPoly; | |
@@ -903,8 +895,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -914,7 +905,7 @@ | |
char RetCodePad[4]; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
} Reply; | |
@@ -937,14 +928,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -958,7 +949,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -1009,24 +1000,34 @@ | |
#if TypeCheck | |
if (mig_unlikely ((OutP->portsType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->portsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->portsType.msgtl_size != 32))) | |
+ (OutP->portsType.msgtl_size != 64 && OutP->portsType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->portsType.msgtl_size != 32 && OutP->portsType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
#if TypeCheck | |
- if (mig_unlikely (msgh_size != 56 + ((OutP->portsType.msgtl_header.msgt_inline) ? (4 * OutP->portsType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *)))) | |
+ if (mig_unlikely (msgh_size != 56 + ((OutP->portsType.msgtl_header.msgt_inline) ? 8 * OutP->portsType.msgtl_number : sizeof(mach_port_t *)))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
if (!OutP->portsType.msgtl_header.msgt_inline) | |
- *ports = OutP->portsP; | |
+ *ports = OutP->portsP; | |
else if (OutP->portsType.msgtl_number > *portsCnt) { | |
- __mig_allocate((vm_offset_t *)ports, | |
- 4 * OutP->portsType.msgtl_number); | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
else if (OutP->portsType.msgtl_number) { | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
*portsCnt = OutP->portsType.msgtl_number; | |
@@ -1047,11 +1048,10 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
const mach_port_t *portsP; | |
}; | |
} Request; | |
@@ -1076,20 +1076,20 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t portsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -1109,23 +1109,32 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->portsType = portsType; | |
- if (portsCnt > 512) { | |
+ if (portsCnt > 256) { | |
InP->portsType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->portsType.msgtl_header.msgt_size = 32; | |
InP->portsP = ports; | |
} | |
else if (portsCnt) { | |
- memcpy(InP->ports, ports, 4 * portsCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)InP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < portsCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_ports[i].kernel_port_do_not_use = 0; | |
+ inlined_ports[i].name = (ports)[i]; | |
+ } | |
} | |
InP->portsType.msgtl_name = portsPoly; | |
InP->portsType.msgtl_number = portsCnt; | |
- msgh_size = 56 + ((InP->portsType.msgtl_header.msgt_inline) ? (4 * portsCnt + 7) & ~7 : sizeof(mach_port_t *)); | |
+ msgh_size = 56 + ((InP->portsType.msgtl_header.msgt_inline) ? 8 * portsCnt : sizeof(mach_port_t *)); | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
/* msgh_size filled below */ | |
@@ -1178,8 +1187,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
@@ -1210,14 +1218,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t whichType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -1252,7 +1260,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->whichType = whichType; | |
@@ -1325,8 +1333,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
@@ -1354,14 +1361,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t whichType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -1397,7 +1404,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->whichType = whichType; | |
@@ -1460,8 +1467,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -1494,14 +1500,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -1515,7 +1521,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -1576,14 +1582,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->valuesType.msgtl_header.msgt_inline) | |
- *values = OutP->valuesP; | |
+ *values = OutP->valuesP; | |
else if (OutP->valuesType.msgtl_number > *valuesCnt) { | |
- __mig_allocate((vm_offset_t *)values, | |
- 4 * OutP->valuesType.msgtl_number); | |
- memcpy(*values, OutP->values, 4 * OutP->valuesType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)values, 4 * OutP->valuesType.msgtl_number); | |
+ memcpy(*values, OutP->values, 4 * OutP->valuesType.msgtl_number); | |
} | |
else if (OutP->valuesType.msgtl_number) { | |
- memcpy(*values, OutP->values, 4 * OutP->valuesType.msgtl_number); | |
+ memcpy(*values, OutP->values, 4 * OutP->valuesType.msgtl_number); | |
} | |
*valuesCnt = OutP->valuesType.msgtl_number; | |
@@ -1603,8 +1608,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t valuesType; | |
union { | |
int values[512]; | |
@@ -1632,14 +1636,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t valuesType = { | |
.msgtl_header = { | |
@@ -1665,7 +1669,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->valuesType = valuesType; | |
@@ -1732,8 +1736,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -1743,7 +1746,7 @@ | |
char RetCodePad[4]; | |
mach_msg_type_long_t dtableType; | |
union { | |
- mach_port_t dtable[512]; | |
+ mach_port_name_inlined_t dtable[256]; | |
mach_port_t *dtableP; | |
}; | |
} Reply; | |
@@ -1766,14 +1769,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -1787,7 +1790,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -1838,24 +1841,34 @@ | |
#if TypeCheck | |
if (mig_unlikely ((OutP->dtableType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->dtableType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->dtableType.msgtl_size != 32))) | |
+ (OutP->dtableType.msgtl_size != 64 && OutP->dtableType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->dtableType.msgtl_size != 32 && OutP->dtableType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
#if TypeCheck | |
- if (mig_unlikely (msgh_size != 56 + ((OutP->dtableType.msgtl_header.msgt_inline) ? (4 * OutP->dtableType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *)))) | |
+ if (mig_unlikely (msgh_size != 56 + ((OutP->dtableType.msgtl_header.msgt_inline) ? 8 * OutP->dtableType.msgtl_number : sizeof(mach_port_t *)))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
if (!OutP->dtableType.msgtl_header.msgt_inline) | |
- *dtable = OutP->dtableP; | |
+ *dtable = OutP->dtableP; | |
else if (OutP->dtableType.msgtl_number > *dtableCnt) { | |
- __mig_allocate((vm_offset_t *)dtable, | |
- 4 * OutP->dtableType.msgtl_number); | |
- memcpy(*dtable, OutP->dtable, 4 * OutP->dtableType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)dtable, 4 * OutP->dtableType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_dtable = (mach_port_name_inlined_t *)OutP->dtable; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->dtableType.msgtl_number; i++) { | |
+ (*dtable)[i] = inlined_dtable[i].name; | |
+ } | |
} | |
else if (OutP->dtableType.msgtl_number) { | |
- memcpy(*dtable, OutP->dtable, 4 * OutP->dtableType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_dtable = (mach_port_name_inlined_t *)OutP->dtable; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->dtableType.msgtl_number; i++) { | |
+ (*dtable)[i] = inlined_dtable[i].name; | |
+ } | |
} | |
*dtableCnt = OutP->dtableType.msgtl_number; | |
@@ -1876,11 +1889,10 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t dtableType; | |
union { | |
- mach_port_t dtable[512]; | |
+ mach_port_name_inlined_t dtable[256]; | |
const mach_port_t *dtableP; | |
}; | |
} Request; | |
@@ -1905,20 +1917,20 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t dtableType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -1938,23 +1950,32 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->dtableType = dtableType; | |
- if (dtableCnt > 512) { | |
+ if (dtableCnt > 256) { | |
InP->dtableType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->dtableType.msgtl_header.msgt_size = 32; | |
InP->dtableP = dtable; | |
} | |
else if (dtableCnt) { | |
- memcpy(InP->dtable, dtable, 4 * dtableCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_dtable = (mach_port_name_inlined_t *)InP->dtable; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < dtableCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_dtable[i].kernel_port_do_not_use = 0; | |
+ inlined_dtable[i].name = (dtable)[i]; | |
+ } | |
} | |
InP->dtableType.msgtl_name = dtablePoly; | |
InP->dtableType.msgtl_number = dtableCnt; | |
- msgh_size = 56 + ((InP->dtableType.msgtl_header.msgt_inline) ? (4 * dtableCnt + 7) & ~7 : sizeof(mach_port_t *)); | |
+ msgh_size = 56 + ((InP->dtableType.msgtl_header.msgt_inline) ? 8 * dtableCnt : sizeof(mach_port_t *)); | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
/* msgh_size filled below */ | |
@@ -2007,8 +2028,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t fdType; | |
int fd; | |
char fdPad[4]; | |
@@ -2020,8 +2040,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Reply; | |
union { | |
@@ -2042,14 +2061,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t fdType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -2074,7 +2093,7 @@ | |
const mach_msg_type_t portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2084,7 +2103,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->fdType = fdType; | |
@@ -2141,7 +2160,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *port = OutP->port; | |
+ *port = OutP->port.name; | |
return KERN_SUCCESS; | |
} | |
@@ -2159,14 +2178,12 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t fdType; | |
int fd; | |
char fdPad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -2188,14 +2205,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t fdType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -2210,14 +2227,14 @@ | |
const mach_msg_type_t portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -2231,7 +2248,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->fdType = fdType; | |
@@ -2239,7 +2256,7 @@ | |
InP->portType = portType; | |
- InP->port = port; | |
+ InP->port.name = port; | |
InP->portType.msgt_name = portPoly; | |
@@ -2393,14 +2410,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->valueType.msgtl_header.msgt_inline) | |
- *value = OutP->valueP; | |
+ *value = OutP->valueP; | |
else if (OutP->valueType.msgtl_number > *valueCnt) { | |
- __mig_allocate((vm_offset_t *)value, | |
- OutP->valueType.msgtl_number); | |
- memcpy(*value, OutP->value, OutP->valueType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)value, OutP->valueType.msgtl_number); | |
+ memcpy(*value, OutP->value, OutP->valueType.msgtl_number); | |
} | |
else if (OutP->valueType.msgtl_number) { | |
- memcpy(*value, OutP->value, OutP->valueType.msgtl_number); | |
+ memcpy(*value, OutP->value, OutP->valueType.msgtl_number); | |
} | |
*valueCnt = OutP->valueType.msgtl_number; | |
@@ -2420,8 +2436,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t valueType; | |
union { | |
char value[2048]; | |
@@ -2449,14 +2464,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t valueType = { | |
.msgtl_header = { | |
@@ -2482,7 +2497,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->valueType = valueType; | |
@@ -2664,14 +2679,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->valueType.msgtl_header.msgt_inline) | |
- *value = OutP->valueP; | |
+ *value = OutP->valueP; | |
else if (OutP->valueType.msgtl_number > *valueCnt) { | |
- __mig_allocate((vm_offset_t *)value, | |
- OutP->valueType.msgtl_number); | |
- memcpy(*value, OutP->value, OutP->valueType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)value, OutP->valueType.msgtl_number); | |
+ memcpy(*value, OutP->value, OutP->valueType.msgtl_number); | |
} | |
else if (OutP->valueType.msgtl_number) { | |
- memcpy(*value, OutP->value, OutP->valueType.msgtl_number); | |
+ memcpy(*value, OutP->value, OutP->valueType.msgtl_number); | |
} | |
*valueCnt = OutP->valueType.msgtl_number; | |
@@ -2692,8 +2706,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t variableType; | |
string_t variable; | |
mach_msg_type_t valueType; | |
@@ -2722,14 +2735,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t variableType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_STRING_C, | |
@@ -2776,7 +2789,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->variableType = variableType; | |
@@ -2849,8 +2862,7 @@ | |
natural_t sigcode; | |
char sigcodePad[4]; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -2894,14 +2906,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -2923,7 +2935,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -2978,8 +2990,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t threadType; | |
- mach_port_t thread; | |
- char threadPad[4]; | |
+ mach_port_name_inlined_t thread; | |
} Request; | |
typedef struct { | |
@@ -3009,14 +3020,14 @@ | |
const mach_msg_type_t threadType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -3050,7 +3061,7 @@ | |
InP->threadType = threadType; | |
- InP->thread = thread; | |
+ InP->thread.name = thread; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -3128,8 +3139,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t namesType; | |
union { | |
mach_port_name_t names[512]; | |
@@ -3165,14 +3175,14 @@ | |
const mach_msg_type_t refportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t namesType = { | |
.msgtl_header = { | |
@@ -3198,7 +3208,7 @@ | |
InP->refportType = refportType; | |
- InP->refport = refport; | |
+ InP->refport.name = refport; | |
InP->namesType = namesType; | |
@@ -3271,14 +3281,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->descriptionsType.msgtl_header.msgt_inline) | |
- *descriptions = OutP->descriptionsP; | |
+ *descriptions = OutP->descriptionsP; | |
else if (OutP->descriptionsType.msgtl_number > *descriptionsCnt) { | |
- __mig_allocate((vm_offset_t *)descriptions, | |
- OutP->descriptionsType.msgtl_number); | |
- memcpy(*descriptions, OutP->descriptions, OutP->descriptionsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)descriptions, OutP->descriptionsType.msgtl_number); | |
+ memcpy(*descriptions, OutP->descriptions, OutP->descriptionsType.msgtl_number); | |
} | |
else if (OutP->descriptionsType.msgtl_number) { | |
- memcpy(*descriptions, OutP->descriptions, OutP->descriptionsType.msgtl_number); | |
+ memcpy(*descriptions, OutP->descriptions, OutP->descriptionsType.msgtl_number); | |
} | |
*descriptionsCnt = OutP->descriptionsType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/trans/ifsockServer.c 2023-11-24 15:42:42.833020144 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/trans/ifsockServer.c 2023-11-22 01:44:16.401668334 -0500 | |
@@ -68,8 +68,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t sockaddrType; | |
- mach_port_t sockaddr; | |
- char sockaddrPad[4]; | |
+ mach_port_name_inlined_t sockaddr; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -79,14 +78,14 @@ | |
const mach_msg_type_t sockaddrType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
trivfs_protid_t file; | |
@@ -101,7 +100,7 @@ | |
else | |
file = trivfs_begin_using_protid(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_ifsock_getsockaddr(file, &OutP->sockaddr); | |
+ OutP->RetCode = S_ifsock_getsockaddr(file, &OutP->sockaddr.name); | |
trivfs_end_using_protid(file); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -123,7 +122,7 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t ifsock_server_routines[] = { | |
- _Xifsock_getsockaddr, | |
+ _Xifsock_getsockaddr, /* 34000 */ | |
}; | |
mig_external boolean_t ifsock_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/trans/msgServer.c 2023-11-24 15:42:42.821020409 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/trans/msgServer.c 2023-11-22 01:44:16.249666808 -0500 | |
@@ -66,8 +66,7 @@ | |
natural_t sigcode; | |
char sigcodePad[4]; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -104,7 +103,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -143,7 +142,7 @@ | |
process = In0P->Head.msgh_request_port; | |
reply_port = In0P->Head.msgh_reply_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
OutP->RetCode = S_msg_sig_post(process, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->signal, In0P->sigcode, refport); | |
} | |
@@ -169,8 +168,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t ppidType; | |
pid_t ppid; | |
char ppidPad[4]; | |
@@ -196,7 +194,7 @@ | |
const mach_msg_type_t taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -266,7 +264,7 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- OutP->RetCode = S_msg_proc_newids(process, In0P->task, In0P->ppid, In0P->pgrp, In0P->orphaned); | |
+ OutP->RetCode = S_msg_proc_newids(process, In0P->task.name, In0P->ppid, In0P->pgrp, In0P->orphaned); | |
} | |
/* Default implementation of S_msg_proc_newids */ | |
@@ -289,8 +287,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t authType; | |
- auth_t auth; | |
- char authPad[4]; | |
+ mach_port_name_inlined_t auth; | |
} Request; | |
typedef struct { | |
@@ -307,7 +304,7 @@ | |
const mach_msg_type_t authCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -333,7 +330,7 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- auth = In0P->auth; | |
+ auth = In0P->auth.name; | |
OutP->RetCode = S_msg_add_auth(process, auth); | |
} | |
@@ -355,8 +352,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_long_t uidsType; | |
union { | |
int uids[512]; | |
@@ -387,7 +383,7 @@ | |
const mach_msg_type_t taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -441,7 +437,7 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- OutP->RetCode = S_msg_del_auth(process, In0P->task, (In0P->uidsType.msgtl_header.msgt_inline) ? In0P->uids : In0P->uidsP, In0P->uidsType.msgtl_number, (In1P->gidsType.msgtl_header.msgt_inline) ? In1P->gids : In1P->gidsP, In1P->gidsType.msgtl_number); | |
+ OutP->RetCode = S_msg_del_auth(process, In0P->task.name, (In0P->uidsType.msgtl_header.msgt_inline) ? In0P->uids : In0P->uidsP, In0P->uidsType.msgtl_number, (In1P->gidsType.msgtl_header.msgt_inline) ? In1P->gids : In1P->gidsP, In1P->gidsType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In1P->gidsType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In1P->gidsP, 4 * In1P->gidsType.msgtl_number); | |
@@ -471,8 +467,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
@@ -484,8 +479,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -496,7 +490,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -516,14 +510,14 @@ | |
const mach_msg_type_t portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_port_t process; | |
mach_port_t refport; | |
@@ -549,9 +543,9 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
- OutP->RetCode = S_msg_get_init_port(process, refport, In0P->which, &OutP->port, &portPoly); | |
+ OutP->RetCode = S_msg_get_init_port(process, refport, In0P->which, &OutP->port.name, &portPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -589,14 +583,12 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -613,7 +605,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -633,7 +625,7 @@ | |
const mach_msg_type_t portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -669,9 +661,9 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
- OutP->RetCode = S_msg_set_init_port(process, refport, In0P->which, In0P->port); | |
+ OutP->RetCode = S_msg_set_init_port(process, refport, In0P->which, In0P->port.name); | |
} | |
/* Default implementation of S_msg_set_init_port */ | |
@@ -693,8 +685,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -704,7 +695,7 @@ | |
char RetCodePad[4]; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
} Reply; | |
@@ -717,7 +708,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -728,8 +719,8 @@ | |
const mach_msg_type_long_t portsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -759,10 +750,10 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
portsP = OutP->ports; | |
- portsCnt = 512; | |
+ portsCnt = 256; | |
OutP->RetCode = S_msg_get_init_ports(process, refport, &portsP, &portsPoly, &portsCnt); | |
if (OutP->RetCode != KERN_SUCCESS) | |
@@ -774,8 +765,19 @@ | |
if (portsP != OutP->ports) { | |
OutP->portsType.msgtl_header.msgt_inline = FALSE; | |
OutP->portsType.msgtl_header.msgt_deallocate = TRUE; | |
+ OutP->portsType.msgtl_header.msgt_size = 32; | |
OutP->portsP = portsP; | |
msgh_simple = FALSE; | |
+ } else { | |
+ /* Resize mach_port_name_t array into mach_port_name_inlined_t. */ | |
+ /* Work in reverse order to avoid overriding subsequent entries. */ | |
+ mach_msg_type_number_t i; | |
+ for(i = portsCnt; i > 0; i--) { | |
+ mach_port_name_t tmp_port_name = portsP[i - 1]; | |
+ /* Clear the whole message with zeros. */ | |
+ OutP->ports[i - 1].kernel_port_do_not_use = 0; | |
+ OutP->ports[i - 1].name = tmp_port_name; | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(portsPoly)) | |
@@ -784,7 +786,7 @@ | |
OutP->portsType.msgtl_name = portsPoly; | |
OutP->portsType.msgtl_number = portsCnt; | |
- OutP->Head.msgh_size = 56 + ((OutP->portsType.msgtl_header.msgt_inline) ? (4 * portsCnt + 7) & ~7 : sizeof(mach_port_t *)); | |
+ OutP->Head.msgh_size = 56 + ((OutP->portsType.msgtl_header.msgt_inline) ? 8 * portsCnt : sizeof(mach_port_t *)); | |
if (!msgh_simple) | |
OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; | |
@@ -810,11 +812,10 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
} Request; | |
@@ -835,7 +836,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -846,6 +847,8 @@ | |
mach_port_t process; | |
mach_port_t refport; | |
+ mach_port_t *portsP; | |
+ | |
#if TypeCheck | |
msgh_size = In0P->Head.msgh_size; | |
if (mig_unlikely ((msgh_size < 56) || | |
@@ -861,12 +864,13 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In0P->portsType.msgtl_header.msgt_longform != TRUE) || | |
(In0P->portsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In0P->portsType.msgtl_size != 32))) | |
+ (In0P->portsType.msgtl_size != 64 && In0P->portsType.msgtl_header.msgt_inline == TRUE) || | |
+ (In0P->portsType.msgtl_size != 32 && In0P->portsType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
#if TypeCheck | |
- if (mig_unlikely (msgh_size != 56 + ((In0P->portsType.msgtl_header.msgt_inline) ? (4 * In0P->portsType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *)))) | |
+ if (mig_unlikely (msgh_size != 56 + ((In0P->portsType.msgtl_header.msgt_inline) ? 8 * In0P->portsType.msgtl_number : sizeof(mach_port_t *)))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
@@ -874,9 +878,19 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
- OutP->RetCode = S_msg_set_init_ports(process, refport, (In0P->portsType.msgtl_header.msgt_inline) ? In0P->ports : In0P->portsP, In0P->portsType.msgtl_number); | |
+ if (In0P->portsType.msgtl_header.msgt_inline) { | |
+ portsP = (mach_port_t *)In0P->ports; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In0P->portsType.msgtl_number; i++) { | |
+ portsP[i] = In0P->ports[i].name; | |
+ } | |
+ } else { | |
+ portsP = In0P->portsP; | |
+ } | |
+ OutP->RetCode = S_msg_set_init_ports(process, refport, portsP, In0P->portsType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In0P->portsType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In0P->portsP, 4 * In0P->portsType.msgtl_number); | |
@@ -901,8 +915,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
@@ -925,7 +938,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -977,7 +990,7 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
OutP->RetCode = S_msg_get_init_int(process, refport, In0P->which, &OutP->value); | |
if (OutP->RetCode != KERN_SUCCESS) | |
@@ -1007,8 +1020,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
@@ -1031,7 +1043,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1087,7 +1099,7 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
OutP->RetCode = S_msg_set_init_int(process, refport, In0P->which, In0P->value); | |
} | |
@@ -1111,8 +1123,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -1135,7 +1146,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1176,7 +1187,7 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
valuesP = OutP->values; | |
valuesCnt = 512; | |
@@ -1221,8 +1232,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t valuesType; | |
union { | |
int values[512]; | |
@@ -1246,7 +1256,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1285,7 +1295,7 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
OutP->RetCode = S_msg_set_init_ints(process, refport, (In0P->valuesType.msgtl_header.msgt_inline) ? In0P->values : In0P->valuesP, In0P->valuesType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
@@ -1312,8 +1322,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -1323,7 +1332,7 @@ | |
char RetCodePad[4]; | |
mach_msg_type_long_t dtableType; | |
union { | |
- mach_port_t dtable[512]; | |
+ mach_port_name_inlined_t dtable[256]; | |
mach_port_t *dtableP; | |
}; | |
} Reply; | |
@@ -1336,7 +1345,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1347,8 +1356,8 @@ | |
const mach_msg_type_long_t dtableType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -1378,10 +1387,10 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
dtableP = OutP->dtable; | |
- dtableCnt = 512; | |
+ dtableCnt = 256; | |
OutP->RetCode = S_msg_get_dtable(process, refport, &dtableP, &dtablePoly, &dtableCnt); | |
if (OutP->RetCode != KERN_SUCCESS) | |
@@ -1393,8 +1402,19 @@ | |
if (dtableP != OutP->dtable) { | |
OutP->dtableType.msgtl_header.msgt_inline = FALSE; | |
OutP->dtableType.msgtl_header.msgt_deallocate = TRUE; | |
+ OutP->dtableType.msgtl_header.msgt_size = 32; | |
OutP->dtableP = dtableP; | |
msgh_simple = FALSE; | |
+ } else { | |
+ /* Resize mach_port_name_t array into mach_port_name_inlined_t. */ | |
+ /* Work in reverse order to avoid overriding subsequent entries. */ | |
+ mach_msg_type_number_t i; | |
+ for(i = dtableCnt; i > 0; i--) { | |
+ mach_port_name_t tmp_port_name = dtableP[i - 1]; | |
+ /* Clear the whole message with zeros. */ | |
+ OutP->dtable[i - 1].kernel_port_do_not_use = 0; | |
+ OutP->dtable[i - 1].name = tmp_port_name; | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(dtablePoly)) | |
@@ -1403,7 +1423,7 @@ | |
OutP->dtableType.msgtl_name = dtablePoly; | |
OutP->dtableType.msgtl_number = dtableCnt; | |
- OutP->Head.msgh_size = 56 + ((OutP->dtableType.msgtl_header.msgt_inline) ? (4 * dtableCnt + 7) & ~7 : sizeof(mach_port_t *)); | |
+ OutP->Head.msgh_size = 56 + ((OutP->dtableType.msgtl_header.msgt_inline) ? 8 * dtableCnt : sizeof(mach_port_t *)); | |
if (!msgh_simple) | |
OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; | |
@@ -1429,11 +1449,10 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t dtableType; | |
union { | |
- mach_port_t dtable[512]; | |
+ mach_port_name_inlined_t dtable[256]; | |
mach_port_t *dtableP; | |
}; | |
} Request; | |
@@ -1454,7 +1473,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1465,6 +1484,8 @@ | |
mach_port_t process; | |
mach_port_t refport; | |
+ mach_port_t *dtableP; | |
+ | |
#if TypeCheck | |
msgh_size = In0P->Head.msgh_size; | |
if (mig_unlikely ((msgh_size < 56) || | |
@@ -1480,12 +1501,13 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In0P->dtableType.msgtl_header.msgt_longform != TRUE) || | |
(In0P->dtableType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In0P->dtableType.msgtl_size != 32))) | |
+ (In0P->dtableType.msgtl_size != 64 && In0P->dtableType.msgtl_header.msgt_inline == TRUE) || | |
+ (In0P->dtableType.msgtl_size != 32 && In0P->dtableType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
#if TypeCheck | |
- if (mig_unlikely (msgh_size != 56 + ((In0P->dtableType.msgtl_header.msgt_inline) ? (4 * In0P->dtableType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *)))) | |
+ if (mig_unlikely (msgh_size != 56 + ((In0P->dtableType.msgtl_header.msgt_inline) ? 8 * In0P->dtableType.msgtl_number : sizeof(mach_port_t *)))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
@@ -1493,9 +1515,19 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
- OutP->RetCode = S_msg_set_dtable(process, refport, (In0P->dtableType.msgtl_header.msgt_inline) ? In0P->dtable : In0P->dtableP, In0P->dtableType.msgtl_number); | |
+ if (In0P->dtableType.msgtl_header.msgt_inline) { | |
+ dtableP = (mach_port_t *)In0P->dtable; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In0P->dtableType.msgtl_number; i++) { | |
+ dtableP[i] = In0P->dtable[i].name; | |
+ } | |
+ } else { | |
+ dtableP = In0P->dtableP; | |
+ } | |
+ OutP->RetCode = S_msg_set_dtable(process, refport, dtableP, In0P->dtableType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In0P->dtableType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In0P->dtableP, 4 * In0P->dtableType.msgtl_number); | |
@@ -1520,8 +1552,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t fdType; | |
int fd; | |
char fdPad[4]; | |
@@ -1533,8 +1564,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1545,7 +1575,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1565,14 +1595,14 @@ | |
const mach_msg_type_t portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_port_t process; | |
mach_port_t refport; | |
@@ -1598,9 +1628,9 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
- OutP->RetCode = S_msg_get_fd(process, refport, In0P->fd, &OutP->port, &portPoly); | |
+ OutP->RetCode = S_msg_get_fd(process, refport, In0P->fd, &OutP->port.name, &portPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1638,14 +1668,12 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t fdType; | |
int fd; | |
char fdPad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -1662,7 +1690,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1682,7 +1710,7 @@ | |
const mach_msg_type_t portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1718,9 +1746,9 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
- OutP->RetCode = S_msg_set_fd(process, refport, In0P->fd, In0P->port); | |
+ OutP->RetCode = S_msg_set_fd(process, refport, In0P->fd, In0P->port.name); | |
} | |
/* Default implementation of S_msg_set_fd */ | |
@@ -1830,8 +1858,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t valueType; | |
union { | |
char value[2048]; | |
@@ -1855,7 +1882,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1894,7 +1921,7 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
OutP->RetCode = S_msg_set_environment(process, refport, (In0P->valueType.msgtl_header.msgt_inline) ? In0P->value : In0P->valueP, In0P->valueType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
@@ -2027,8 +2054,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t variableType; | |
string_t variable; | |
mach_msg_type_t valueType; | |
@@ -2052,7 +2078,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2123,7 +2149,7 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
OutP->RetCode = S_msg_set_env_variable(process, refport, In0P->variable, In0P->value, In0P->replace); | |
} | |
@@ -2154,8 +2180,7 @@ | |
natural_t sigcode; | |
char sigcodePad[4]; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -2192,7 +2217,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2231,7 +2256,7 @@ | |
process = In0P->Head.msgh_request_port; | |
reply_port = In0P->Head.msgh_reply_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
OutP->RetCode = S_msg_sig_post_untraced(process, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->signal, In0P->sigcode, refport); | |
} | |
@@ -2257,8 +2282,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t threadType; | |
- mach_port_t thread; | |
- char threadPad[4]; | |
+ mach_port_name_inlined_t thread; | |
} Request; | |
typedef struct { | |
@@ -2280,7 +2304,7 @@ | |
const mach_msg_type_t threadCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2327,7 +2351,7 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- OutP->RetCode = S_msg_report_wait(process, In0P->thread, OutP->wait_desc, &OutP->wait_rpc); | |
+ OutP->RetCode = S_msg_report_wait(process, In0P->thread.name, OutP->wait_desc, &OutP->wait_rpc); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2357,8 +2381,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t namesType; | |
union { | |
mach_port_name_t names[512]; | |
@@ -2388,7 +2411,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2442,7 +2465,7 @@ | |
process = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
process = In0P->Head.msgh_request_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
descriptionsP = OutP->descriptions; | |
descriptionsCnt = 2048; | |
@@ -2485,31 +2508,31 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t msg_server_routines[] = { | |
- _Xmsg_sig_post, | |
- _Xmsg_proc_newids, | |
- _Xmsg_add_auth, | |
- _Xmsg_del_auth, | |
- _Xmsg_get_init_port, | |
- _Xmsg_set_init_port, | |
- _Xmsg_get_init_ports, | |
- _Xmsg_set_init_ports, | |
- _Xmsg_get_init_int, | |
- _Xmsg_set_init_int, | |
- _Xmsg_get_init_ints, | |
- _Xmsg_set_init_ints, | |
- _Xmsg_get_dtable, | |
- _Xmsg_set_dtable, | |
- _Xmsg_get_fd, | |
- _Xmsg_set_fd, | |
- _Xmsg_get_environment, | |
- _Xmsg_set_environment, | |
- _Xmsg_get_env_variable, | |
- _Xmsg_set_env_variable, | |
+ _Xmsg_sig_post, /* 23000 */ | |
+ _Xmsg_proc_newids, /* 23001 */ | |
+ _Xmsg_add_auth, /* 23002 */ | |
+ _Xmsg_del_auth, /* 23003 */ | |
+ _Xmsg_get_init_port, /* 23004 */ | |
+ _Xmsg_set_init_port, /* 23005 */ | |
+ _Xmsg_get_init_ports, /* 23006 */ | |
+ _Xmsg_set_init_ports, /* 23007 */ | |
+ _Xmsg_get_init_int, /* 23008 */ | |
+ _Xmsg_set_init_int, /* 23009 */ | |
+ _Xmsg_get_init_ints, /* 23010 */ | |
+ _Xmsg_set_init_ints, /* 23011 */ | |
+ _Xmsg_get_dtable, /* 23012 */ | |
+ _Xmsg_set_dtable, /* 23013 */ | |
+ _Xmsg_get_fd, /* 23014 */ | |
+ _Xmsg_set_fd, /* 23015 */ | |
+ _Xmsg_get_environment, /* 23016 */ | |
+ _Xmsg_set_environment, /* 23017 */ | |
+ _Xmsg_get_env_variable, /* 23018 */ | |
+ _Xmsg_set_env_variable, /* 23019 */ | |
0, | |
0, | |
- _Xmsg_sig_post_untraced, | |
- _Xmsg_report_wait, | |
- _Xmsg_describe_ports, | |
+ _Xmsg_sig_post_untraced, /* 23022 */ | |
+ _Xmsg_report_wait, /* 23023 */ | |
+ _Xmsg_describe_ports, /* 23024 */ | |
}; | |
mig_external boolean_t msg_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/trans/crashServer.c 2023-11-24 15:42:42.797020938 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/trans/crashServer.c 2023-11-22 01:44:16.229666608 -0500 | |
@@ -60,11 +60,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t fileType; | |
- file_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
mach_msg_type_t signoType; | |
int signo; | |
char signoPad[4]; | |
@@ -83,8 +81,7 @@ | |
mach_msg_type_t subcodeType; | |
long_natural_t subcode; | |
mach_msg_type_t cttyid_portType; | |
- mach_port_t cttyid_port; | |
- char cttyid_portPad[4]; | |
+ mach_port_name_inlined_t cttyid_port; | |
} Request; | |
typedef struct { | |
@@ -101,7 +98,7 @@ | |
const mach_msg_type_t taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -111,7 +108,7 @@ | |
const mach_msg_type_t fileCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -181,7 +178,7 @@ | |
const mach_msg_type_t cttyid_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -250,9 +247,9 @@ | |
crashserver = In0P->Head.msgh_request_port; | |
reply = In0P->Head.msgh_reply_port; | |
- file = In0P->file; | |
+ file = In0P->file.name; | |
- OutP->RetCode = S_crash_dump_task(crashserver, reply, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->task, file, In0P->signo, In0P->sigcode, In0P->sigerror, In0P->exc, In0P->code, In0P->subcode, In0P->cttyid_port); | |
+ OutP->RetCode = S_crash_dump_task(crashserver, reply, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->task.name, file, In0P->signo, In0P->sigcode, In0P->sigerror, In0P->exc, In0P->code, In0P->subcode, In0P->cttyid_port.name); | |
} | |
/* Default implementation of S_crash_dump_task */ | |
@@ -276,7 +273,7 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t crash_server_routines[] = { | |
- _Xcrash_dump_task, | |
+ _Xcrash_dump_task, /* 32000 */ | |
}; | |
mig_external boolean_t crash_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/trans/default_pagerServer.c 2023-11-24 15:42:42.757021818 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/trans/default_pagerServer.c 2023-11-22 01:44:16.077665083 -0500 | |
@@ -71,8 +71,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t memory_objectType; | |
- memory_object_t memory_object; | |
- char memory_objectPad[4]; | |
+ mach_port_name_inlined_t memory_object; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -93,14 +92,14 @@ | |
const mach_msg_type_t memory_objectType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(memory_object_t) == 4 * 1, "expected memory_object_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_port_t default_pager; | |
mach_msg_type_name_t memory_objectPoly; | |
@@ -120,7 +119,7 @@ | |
default_pager = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
default_pager = In0P->Head.msgh_request_port; | |
- OutP->RetCode = S_default_pager_object_create(default_pager, &OutP->memory_object, &memory_objectPoly, In0P->object_size); | |
+ OutP->RetCode = S_default_pager_object_create(default_pager, &OutP->memory_object.name, &memory_objectPoly, In0P->object_size); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -240,7 +239,7 @@ | |
}; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
} Reply; | |
@@ -288,8 +287,8 @@ | |
const mach_msg_type_long_t portsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_MOVE_SEND, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -299,7 +298,7 @@ | |
mach_port_t default_pager; | |
mach_msg_type_number_t objectsCnt; | |
- mach_port_t ports[512]; | |
+ mach_port_t ports[256]; | |
mach_msg_type_number_t portsCnt; | |
default_pager_object_t *objectsP; | |
@@ -331,7 +330,7 @@ | |
objectsCnt = In0P->objectsCnt; | |
portsP = ports; | |
- portsCnt = 512; | |
+ portsCnt = 256; | |
if (In0P->portsCnt < portsCnt) | |
portsCnt = In0P->portsCnt; | |
@@ -358,15 +357,23 @@ | |
if (portsP != ports) { | |
OutP->portsType.msgtl_header.msgt_inline = FALSE; | |
OutP->portsType.msgtl_header.msgt_deallocate = TRUE; | |
+ OutP->portsType.msgtl_header.msgt_size = 32; | |
OutP->portsP = portsP; | |
} | |
else { | |
- if (portsCnt) | |
- memcpy(OutP->ports, ports, 4 * portsCnt); | |
+ if (portsCnt) { | |
+ /* Copy array of mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_msg_type_number_t i; | |
+ for(i = 0; i < portsCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ OutP->ports[i].kernel_port_do_not_use = 0; | |
+ OutP->ports[i].name = ports[i]; | |
+ } | |
+ } | |
} | |
OutP->portsType.msgtl_number = portsCnt; | |
- msgh_size += (OutP->portsType.msgtl_header.msgt_inline) ? (4 * portsCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size += (OutP->portsType.msgtl_header.msgt_inline) ? 8 * portsCnt : sizeof(mach_port_t *); | |
OutP = (Reply *) OutHeadP; | |
OutP->Head.msgh_size = msgh_size; | |
@@ -392,8 +399,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_objectType; | |
- mach_port_t memory_object; | |
- char memory_objectPad[4]; | |
+ mach_port_name_inlined_t memory_object; | |
mach_msg_type_t pagesCntType; | |
mach_msg_type_number_t pagesCnt; | |
char pagesCntPad[4]; | |
@@ -419,7 +425,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t memory_objectCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -479,7 +485,7 @@ | |
if (In0P->pagesCnt < pagesCnt) | |
pagesCnt = In0P->pagesCnt; | |
- OutP->RetCode = S_default_pager_object_pages(default_pager, In0P->memory_object, &pagesP, &pagesCnt); | |
+ OutP->RetCode = S_default_pager_object_pages(default_pager, In0P->memory_object.name, &pagesP, &pagesCnt); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -702,8 +708,9 @@ | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (freeCnt) | |
+ if (freeCnt) { | |
memcpy(OutP->free, free, 8 * freeCnt); | |
+ } | |
} | |
OutP->freeType.msgtl_number = freeCnt; | |
@@ -719,8 +726,9 @@ | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (nameCnt) | |
+ if (nameCnt) { | |
memcpy(OutP->name, name, nameCnt); | |
+ } | |
} | |
OutP->nameType.msgtl_number = nameCnt; | |
@@ -754,8 +762,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t device_portType; | |
- mach_port_t device_port; | |
- char device_portPad[4]; | |
+ mach_port_name_inlined_t device_port; | |
mach_msg_type_long_t runsType; | |
union { | |
recnum_t runs[256]; | |
@@ -786,7 +793,7 @@ | |
const mach_msg_type_t device_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -858,7 +865,7 @@ | |
default_pager = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
default_pager = In0P->Head.msgh_request_port; | |
- device_port = In0P->device_port; | |
+ device_port = In0P->device_port.name; | |
OutP->RetCode = S_default_pager_paging_storage_new(default_pager, device_port, (In0P->runsType.msgtl_header.msgt_inline) ? In0P->runs : In0P->runsP, In0P->runsType.msgtl_number, In1P->name, In1P->add); | |
if (OutP->RetCode == KERN_SUCCESS) | |
@@ -881,16 +888,16 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t default_pager_server_routines[] = { | |
- _Xdefault_pager_object_create, | |
- _Xdefault_pager_info, | |
- _Xdefault_pager_objects, | |
- _Xdefault_pager_object_pages, | |
+ _Xdefault_pager_object_create, /* 2275 */ | |
+ _Xdefault_pager_info, /* 2276 */ | |
+ _Xdefault_pager_objects, /* 2277 */ | |
+ _Xdefault_pager_object_pages, /* 2278 */ | |
0, | |
0, | |
0, | |
- _Xdefault_pager_object_set_size, | |
- _Xdefault_pager_storage_info, | |
- _Xdefault_pager_paging_storage_new, | |
+ _Xdefault_pager_object_set_size, /* 2282 */ | |
+ _Xdefault_pager_storage_info, /* 2283 */ | |
+ _Xdefault_pager_paging_storage_new, /* 2284 */ | |
}; | |
mig_external boolean_t default_pager_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/trans/passwordServer.c 2023-11-24 15:42:42.801020849 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/trans/passwordServer.c 2023-11-22 01:44:16.193666247 -0500 | |
@@ -73,8 +73,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t authType; | |
- mach_port_t auth; | |
- char authPad[4]; | |
+ mach_port_name_inlined_t auth; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -105,14 +104,14 @@ | |
const mach_msg_type_t authType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
trivfs_protid_t server; | |
mach_msg_type_name_t authPoly; | |
@@ -138,7 +137,7 @@ | |
else | |
server = trivfs_begin_using_protid(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_password_check_user(server, In0P->user, In0P->pw, &OutP->auth, &authPoly); | |
+ OutP->RetCode = S_password_check_user(server, In0P->user, In0P->pw, &OutP->auth.name, &authPoly); | |
trivfs_end_using_protid(server); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -189,8 +188,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t authType; | |
- mach_port_t auth; | |
- char authPad[4]; | |
+ mach_port_name_inlined_t auth; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -221,14 +219,14 @@ | |
const mach_msg_type_t authType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
trivfs_protid_t server; | |
mach_msg_type_name_t authPoly; | |
@@ -254,7 +252,7 @@ | |
else | |
server = trivfs_begin_using_protid(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_password_check_group(server, In0P->group, In0P->pw, &OutP->auth, &authPoly); | |
+ OutP->RetCode = S_password_check_group(server, In0P->group, In0P->pw, &OutP->auth.name, &authPoly); | |
trivfs_end_using_protid(server); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -287,8 +285,8 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t password_server_routines[] = { | |
- _Xpassword_check_user, | |
- _Xpassword_check_group, | |
+ _Xpassword_check_user, /* 38000 */ | |
+ _Xpassword_check_group, /* 38001 */ | |
}; | |
mig_external boolean_t password_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/trans/device_replyServer.c 2023-11-24 15:42:42.777021377 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/trans/device_replyServer.c 2023-11-22 01:44:16.125665565 -0500 | |
@@ -41,7 +41,7 @@ | |
#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits) | |
#include <mach/std_types.h> | |
-#include "/home/flavioc/dev-hurd/cross-hurd/src/hurd/trans/../libports/ports.h" | |
+#include "/home/flavioc/cross-hurd/src/hurd/trans/../libports/ports.h" | |
#include <device/device_types.h> | |
#include <device/net_status.h> | |
@@ -55,8 +55,7 @@ | |
kern_return_t return_code; | |
char return_codePad[4]; | |
mach_msg_type_t device_portType; | |
- mach_port_t device_port; | |
- char device_portPad[4]; | |
+ mach_port_name_inlined_t device_port; | |
} Request; | |
typedef struct { | |
@@ -83,7 +82,7 @@ | |
const mach_msg_type_t device_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -113,7 +112,7 @@ | |
reply_port = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
reply_port = In0P->Head.msgh_request_port; | |
- OutP->RetCode = device_open_reply(reply_port, In0P->return_code, In0P->device_port); | |
+ OutP->RetCode = device_open_reply(reply_port, In0P->return_code, In0P->device_port.name); | |
} | |
/* Default implementation of device_open_reply */ | |
@@ -453,12 +452,12 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t device_reply_server_routines[] = { | |
- _Xdevice_open_reply, | |
+ _Xdevice_open_reply, /* 2900 */ | |
0, | |
- _Xdevice_write_reply, | |
- _Xdevice_write_reply_inband, | |
- _Xdevice_read_reply, | |
- _Xdevice_read_reply_inband, | |
+ _Xdevice_write_reply, /* 2902 */ | |
+ _Xdevice_write_reply_inband, /* 2903 */ | |
+ _Xdevice_read_reply, /* 2904 */ | |
+ _Xdevice_read_reply_inband, /* 2905 */ | |
}; | |
mig_external boolean_t device_reply_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/trans/fsysUser.c 2023-11-24 15:42:42.969017149 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/trans/fsysUser.c 2023-11-18 23:19:24.109480167 -0500 | |
@@ -67,8 +67,7 @@ | |
int openflags; | |
char openflagsPad[4]; | |
mach_msg_type_t control_portType; | |
- mach_port_t control_port; | |
- char control_portPad[4]; | |
+ mach_port_name_inlined_t control_port; | |
} Request; | |
typedef struct { | |
@@ -77,8 +76,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t realnodeType; | |
- mach_port_t realnode; | |
- char realnodePad[4]; | |
+ mach_port_name_inlined_t realnode; | |
} Reply; | |
union { | |
@@ -108,14 +106,14 @@ | |
const mach_msg_type_t control_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -129,7 +127,7 @@ | |
const mach_msg_type_t realnodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -143,7 +141,7 @@ | |
InP->control_portType = control_portType; | |
- InP->control_port = control_port; | |
+ InP->control_port.name = control_port; | |
if (MACH_MSG_TYPE_PORT_ANY(control_portPoly)) | |
msgh_simple = FALSE; | |
@@ -203,7 +201,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *realnode = OutP->realnode; | |
+ *realnode = OutP->realnode.name; | |
return KERN_SUCCESS; | |
} | |
@@ -324,8 +322,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t dotdot_nodeType; | |
- mach_port_t dotdot_node; | |
- char dotdot_nodePad[4]; | |
+ mach_port_name_inlined_t dotdot_node; | |
mach_msg_type_long_t gen_uidsType; | |
union { | |
uid_t gen_uids[512]; | |
@@ -352,8 +349,7 @@ | |
mach_msg_type_t retry_nameType; | |
string_t retry_name; | |
mach_msg_type_t fileType; | |
- mach_port_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
} Reply; | |
union { | |
@@ -371,14 +367,14 @@ | |
const mach_msg_type_t dotdot_nodeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t gen_uidsType = { | |
.msgtl_header = { | |
@@ -447,7 +443,7 @@ | |
const mach_msg_type_t fileCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -457,7 +453,7 @@ | |
InP->dotdot_nodeType = dotdot_nodeType; | |
- InP->dotdot_node = dotdot_node; | |
+ InP->dotdot_node.name = dotdot_node; | |
if (MACH_MSG_TYPE_PORT_ANY(dotdot_nodePoly)) | |
msgh_simple = FALSE; | |
@@ -567,7 +563,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *file = OutP->file; | |
+ *file = OutP->file.name; | |
return KERN_SUCCESS; | |
} | |
@@ -610,8 +606,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t fileType; | |
- mach_port_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
} Reply; | |
union { | |
@@ -675,7 +670,7 @@ | |
const mach_msg_type_t fileCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -782,7 +777,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *file = OutP->file; | |
+ *file = OutP->file.name; | |
return KERN_SUCCESS; | |
} | |
@@ -1059,14 +1054,11 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t host_privType; | |
- mach_port_t host_priv; | |
- char host_privPad[4]; | |
+ mach_port_name_inlined_t host_priv; | |
mach_msg_type_t device_masterType; | |
- mach_port_t device_master; | |
- char device_masterPad[4]; | |
+ mach_port_name_inlined_t device_master; | |
mach_msg_type_t fstaskType; | |
- mach_port_t fstask; | |
- char fstaskPad[4]; | |
+ mach_port_name_inlined_t fstask; | |
} Reply; | |
union { | |
@@ -1097,7 +1089,7 @@ | |
const mach_msg_type_t host_privCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1107,7 +1099,7 @@ | |
const mach_msg_type_t device_masterCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1117,7 +1109,7 @@ | |
const mach_msg_type_t fstaskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1176,21 +1168,21 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *host_priv = OutP->host_priv; | |
+ *host_priv = OutP->host_priv.name; | |
#if TypeCheck | |
if (BAD_TYPECHECK (&OutP->device_masterType, &device_masterCheck)) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *device_master = OutP->device_master; | |
+ *device_master = OutP->device_master.name; | |
#if TypeCheck | |
if (BAD_TYPECHECK (&OutP->fstaskType, &fstaskCheck)) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *fstask = OutP->fstask; | |
+ *fstask = OutP->fstask.name; | |
return KERN_SUCCESS; | |
} | |
@@ -1207,11 +1199,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t proc_serverType; | |
- mach_port_t proc_server; | |
- char proc_serverPad[4]; | |
+ mach_port_name_inlined_t proc_server; | |
mach_msg_type_t auth_handleType; | |
- auth_t auth_handle; | |
- char auth_handlePad[4]; | |
+ mach_port_name_inlined_t auth_handle; | |
} Request; | |
typedef struct { | |
@@ -1233,25 +1223,25 @@ | |
const mach_msg_type_t proc_serverType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t auth_handleType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(auth_t) == 4 * 1, "expected auth_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -1265,13 +1255,13 @@ | |
InP->proc_serverType = proc_serverType; | |
- InP->proc_server = proc_server; | |
+ InP->proc_server.name = proc_server; | |
InP->proc_serverType.msgt_name = proc_serverPoly; | |
InP->auth_handleType = auth_handleType; | |
- InP->auth_handle = auth_handle; | |
+ InP->auth_handle.name = auth_handle; | |
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX| | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -1327,8 +1317,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t requestorType; | |
- mach_port_t requestor; | |
- char requestorPad[4]; | |
+ mach_port_name_inlined_t requestor; | |
mach_msg_type_long_t argvType; | |
union { | |
char argv[2048]; | |
@@ -1357,14 +1346,14 @@ | |
const mach_msg_type_t requestorType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t argvType = { | |
.msgtl_header = { | |
@@ -1390,7 +1379,7 @@ | |
InP->requestorType = requestorType; | |
- InP->requestor = requestor; | |
+ InP->requestor.name = requestor; | |
if (MACH_MSG_TYPE_PORT_ANY(requestorPoly)) | |
msgh_simple = FALSE; | |
@@ -1562,14 +1551,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->optionsType.msgtl_header.msgt_inline) | |
- *options = OutP->optionsP; | |
+ *options = OutP->optionsP; | |
else if (OutP->optionsType.msgtl_number > *optionsCnt) { | |
- __mig_allocate((vm_offset_t *)options, | |
- OutP->optionsType.msgtl_number); | |
- memcpy(*options, OutP->options, OutP->optionsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)options, OutP->optionsType.msgtl_number); | |
+ memcpy(*options, OutP->options, OutP->optionsType.msgtl_number); | |
} | |
else if (OutP->optionsType.msgtl_number) { | |
- memcpy(*options, OutP->options, OutP->optionsType.msgtl_number); | |
+ memcpy(*options, OutP->options, OutP->optionsType.msgtl_number); | |
} | |
*optionsCnt = OutP->optionsType.msgtl_number; | |
@@ -1603,7 +1591,7 @@ | |
}; | |
mach_msg_type_long_t controlsType; | |
union { | |
- mach_port_t controls[512]; | |
+ mach_port_name_inlined_t controls[256]; | |
mach_port_t *controlsP; | |
}; | |
} Reply; | |
@@ -1696,14 +1684,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->namesType.msgtl_header.msgt_inline) | |
- *names = OutP->namesP; | |
+ *names = OutP->namesP; | |
else if (OutP->namesType.msgtl_number > *namesCnt) { | |
- __mig_allocate((vm_offset_t *)names, | |
- OutP->namesType.msgtl_number); | |
- memcpy(*names, OutP->names, OutP->namesType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)names, OutP->namesType.msgtl_number); | |
+ memcpy(*names, OutP->names, OutP->namesType.msgtl_number); | |
} | |
else if (OutP->namesType.msgtl_number) { | |
- memcpy(*names, OutP->names, OutP->namesType.msgtl_number); | |
+ memcpy(*names, OutP->names, OutP->namesType.msgtl_number); | |
} | |
*namesCnt = OutP->namesType.msgtl_number; | |
@@ -1713,24 +1700,34 @@ | |
#if TypeCheck | |
if (mig_unlikely ((OutP->controlsType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->controlsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->controlsType.msgtl_size != 32))) | |
+ (OutP->controlsType.msgtl_size != 64 && OutP->controlsType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->controlsType.msgtl_size != 32 && OutP->controlsType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
#if TypeCheck | |
- if (mig_unlikely (msgh_size != 64 + ((OutP->controlsType.msgtl_header.msgt_inline) ? (4 * OutP->controlsType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *)))) | |
+ if (mig_unlikely (msgh_size != 64 + ((OutP->controlsType.msgtl_header.msgt_inline) ? 8 * OutP->controlsType.msgtl_number : sizeof(mach_port_t *)))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
if (!OutP->controlsType.msgtl_header.msgt_inline) | |
- *controls = OutP->controlsP; | |
+ *controls = OutP->controlsP; | |
else if (OutP->controlsType.msgtl_number > *controlsCnt) { | |
- __mig_allocate((vm_offset_t *)controls, | |
- 4 * OutP->controlsType.msgtl_number); | |
- memcpy(*controls, OutP->controls, 4 * OutP->controlsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)controls, 4 * OutP->controlsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_controls = (mach_port_name_inlined_t *)OutP->controls; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->controlsType.msgtl_number; i++) { | |
+ (*controls)[i] = inlined_controls[i].name; | |
+ } | |
} | |
else if (OutP->controlsType.msgtl_number) { | |
- memcpy(*controls, OutP->controls, 4 * OutP->controlsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_controls = (mach_port_name_inlined_t *)OutP->controls; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->controlsType.msgtl_number; i++) { | |
+ (*controls)[i] = inlined_controls[i].name; | |
+ } | |
} | |
*controlsCnt = OutP->controlsType.msgtl_number; | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/trans/default_pagerUser.c 2023-11-24 15:42:42.905018559 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/trans/default_pagerUser.c 2023-11-22 01:44:16.473669055 -0500 | |
@@ -73,8 +73,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t memory_objectType; | |
- memory_object_t memory_object; | |
- char memory_objectPad[4]; | |
+ mach_port_name_inlined_t memory_object; | |
} Reply; | |
union { | |
@@ -116,7 +115,7 @@ | |
const mach_msg_type_t memory_objectCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -179,7 +178,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *memory_object = OutP->memory_object; | |
+ *memory_object = OutP->memory_object.name; | |
return KERN_SUCCESS; | |
} | |
@@ -324,7 +323,7 @@ | |
}; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
} Reply; | |
@@ -387,10 +386,10 @@ | |
InP->portsCntType = portsCntType; | |
- if (*portsCnt < 512) | |
+ if (*portsCnt < 256) | |
InP->portsCnt = *portsCnt; | |
else | |
- InP->portsCnt = 512; | |
+ InP->portsCnt = 256; | |
InP->Head.msgh_bits = | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -453,14 +452,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->objectsType.msgtl_header.msgt_inline) | |
- *objects = OutP->objectsP; | |
+ *objects = OutP->objectsP; | |
else if (OutP->objectsType.msgtl_number / 16 > *objectsCnt) { | |
- __mig_allocate((vm_offset_t *)objects, | |
- OutP->objectsType.msgtl_number); | |
- memcpy(*objects, OutP->objects, OutP->objectsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)objects, OutP->objectsType.msgtl_number); | |
+ memcpy(*objects, OutP->objects, OutP->objectsType.msgtl_number); | |
} | |
else if (OutP->objectsType.msgtl_number) { | |
- memcpy(*objects, OutP->objects, OutP->objectsType.msgtl_number); | |
+ memcpy(*objects, OutP->objects, OutP->objectsType.msgtl_number); | |
} | |
*objectsCnt = OutP->objectsType.msgtl_number / 16; | |
@@ -470,24 +468,34 @@ | |
#if TypeCheck | |
if (mig_unlikely ((OutP->portsType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->portsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->portsType.msgtl_size != 32))) | |
+ (OutP->portsType.msgtl_size != 64 && OutP->portsType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->portsType.msgtl_size != 32 && OutP->portsType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
#if TypeCheck | |
- if (mig_unlikely (msgh_size != 64 + ((OutP->portsType.msgtl_header.msgt_inline) ? (4 * OutP->portsType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *)))) | |
+ if (mig_unlikely (msgh_size != 64 + ((OutP->portsType.msgtl_header.msgt_inline) ? 8 * OutP->portsType.msgtl_number : sizeof(mach_port_t *)))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
if (!OutP->portsType.msgtl_header.msgt_inline) | |
- *ports = OutP->portsP; | |
+ *ports = OutP->portsP; | |
else if (OutP->portsType.msgtl_number > *portsCnt) { | |
- __mig_allocate((vm_offset_t *)ports, | |
- 4 * OutP->portsType.msgtl_number); | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
else if (OutP->portsType.msgtl_number) { | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
*portsCnt = OutP->portsType.msgtl_number; | |
@@ -507,8 +515,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_objectType; | |
- mach_port_t memory_object; | |
- char memory_objectPad[4]; | |
+ mach_port_name_inlined_t memory_object; | |
mach_msg_type_t pagesCntType; | |
mach_msg_type_number_t pagesCnt; | |
char pagesCntPad[4]; | |
@@ -544,14 +551,14 @@ | |
const mach_msg_type_t memory_objectType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t pagesCntType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -576,7 +583,7 @@ | |
InP->memory_objectType = memory_objectType; | |
- InP->memory_object = memory_object; | |
+ InP->memory_object.name = memory_object; | |
InP->pagesCntType = pagesCntType; | |
@@ -644,14 +651,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->pagesType.msgtl_header.msgt_inline) | |
- *pages = OutP->pagesP; | |
+ *pages = OutP->pagesP; | |
else if (OutP->pagesType.msgtl_number / 8 > *pagesCnt) { | |
- __mig_allocate((vm_offset_t *)pages, | |
- OutP->pagesType.msgtl_number); | |
- memcpy(*pages, OutP->pages, OutP->pagesType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)pages, OutP->pagesType.msgtl_number); | |
+ memcpy(*pages, OutP->pages, OutP->pagesType.msgtl_number); | |
} | |
else if (OutP->pagesType.msgtl_number) { | |
- memcpy(*pages, OutP->pages, OutP->pagesType.msgtl_number); | |
+ memcpy(*pages, OutP->pages, OutP->pagesType.msgtl_number); | |
} | |
*pagesCnt = OutP->pagesType.msgtl_number / 8; | |
@@ -881,14 +887,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->sizeType.msgtl_header.msgt_inline) | |
- *size = OutP->sizeP; | |
+ *size = OutP->sizeP; | |
else if (OutP->sizeType.msgtl_number > *sizeCnt) { | |
- __mig_allocate((vm_offset_t *)size, | |
- 8 * OutP->sizeType.msgtl_number); | |
- memcpy(*size, OutP->size, 8 * OutP->sizeType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)size, 8 * OutP->sizeType.msgtl_number); | |
+ memcpy(*size, OutP->size, 8 * OutP->sizeType.msgtl_number); | |
} | |
else if (OutP->sizeType.msgtl_number) { | |
- memcpy(*size, OutP->size, 8 * OutP->sizeType.msgtl_number); | |
+ memcpy(*size, OutP->size, 8 * OutP->sizeType.msgtl_number); | |
} | |
*sizeCnt = OutP->sizeType.msgtl_number; | |
@@ -910,14 +915,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->freeType.msgtl_header.msgt_inline) | |
- *free = OutP->freeP; | |
+ *free = OutP->freeP; | |
else if (OutP->freeType.msgtl_number > *freeCnt) { | |
- __mig_allocate((vm_offset_t *)free, | |
- 8 * OutP->freeType.msgtl_number); | |
- memcpy(*free, OutP->free, 8 * OutP->freeType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)free, 8 * OutP->freeType.msgtl_number); | |
+ memcpy(*free, OutP->free, 8 * OutP->freeType.msgtl_number); | |
} | |
else if (OutP->freeType.msgtl_number) { | |
- memcpy(*free, OutP->free, 8 * OutP->freeType.msgtl_number); | |
+ memcpy(*free, OutP->free, 8 * OutP->freeType.msgtl_number); | |
} | |
*freeCnt = OutP->freeType.msgtl_number; | |
@@ -937,14 +941,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->nameType.msgtl_header.msgt_inline) | |
- *name = OutP->nameP; | |
+ *name = OutP->nameP; | |
else if (OutP->nameType.msgtl_number > *nameCnt) { | |
- __mig_allocate((vm_offset_t *)name, | |
- OutP->nameType.msgtl_number); | |
- memcpy(*name, OutP->name, OutP->nameType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)name, OutP->nameType.msgtl_number); | |
+ memcpy(*name, OutP->name, OutP->nameType.msgtl_number); | |
} | |
else if (OutP->nameType.msgtl_number) { | |
- memcpy(*name, OutP->name, OutP->nameType.msgtl_number); | |
+ memcpy(*name, OutP->name, OutP->nameType.msgtl_number); | |
} | |
*nameCnt = OutP->nameType.msgtl_number; | |
@@ -966,8 +969,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t device_portType; | |
- mach_port_t device_port; | |
- char device_portPad[4]; | |
+ mach_port_name_inlined_t device_port; | |
mach_msg_type_long_t runsType; | |
union { | |
recnum_t runs[256]; | |
@@ -1001,14 +1003,14 @@ | |
const mach_msg_type_t device_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t runsType = { | |
.msgtl_header = { | |
@@ -1056,7 +1058,7 @@ | |
InP->device_portType = device_portType; | |
- InP->device_port = device_port; | |
+ InP->device_port.name = device_port; | |
InP->runsType = runsType; | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/trans/fsysServer.c 2023-11-24 15:42:42.821020409 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/trans/fsysServer.c 2023-11-22 01:44:16.385668173 -0500 | |
@@ -62,8 +62,7 @@ | |
int openflags; | |
char openflagsPad[4]; | |
mach_msg_type_t control_portType; | |
- mach_port_t control_port; | |
- char control_portPad[4]; | |
+ mach_port_name_inlined_t control_port; | |
} Request; | |
typedef struct { | |
@@ -72,8 +71,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t realnodeType; | |
- mach_port_t realnode; | |
- char realnodePad[4]; | |
+ mach_port_name_inlined_t realnode; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -94,7 +92,7 @@ | |
const mach_msg_type_t control_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -104,14 +102,14 @@ | |
const mach_msg_type_t realnodeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t realnodePoly; | |
@@ -131,7 +129,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_fsys_startup(In0P->Head.msgh_request_port, In0P->openflags, In0P->control_port, &OutP->realnode, &realnodePoly); | |
+ OutP->RetCode = S_fsys_startup(In0P->Head.msgh_request_port, In0P->openflags, In0P->control_port.name, &OutP->realnode.name, &realnodePoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -226,8 +224,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t dotdot_nodeType; | |
- mach_port_t dotdot_node; | |
- char dotdot_nodePad[4]; | |
+ mach_port_name_inlined_t dotdot_node; | |
mach_msg_type_long_t gen_uidsType; | |
union { | |
uid_t gen_uids[512]; | |
@@ -254,8 +251,7 @@ | |
mach_msg_type_t retry_nameType; | |
string_t retry_name; | |
mach_msg_type_t fileType; | |
- mach_port_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -271,7 +267,7 @@ | |
const mach_msg_type_t dotdot_nodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -313,14 +309,14 @@ | |
const mach_msg_type_t fileType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t filePoly; | |
@@ -372,7 +368,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_fsys_getroot(In0P->Head.msgh_request_port, In0P->dotdot_node, (In0P->gen_uidsType.msgtl_header.msgt_inline) ? In0P->gen_uids : In0P->gen_uidsP, In0P->gen_uidsType.msgtl_number, (In1P->gen_gidsType.msgtl_header.msgt_inline) ? In1P->gen_gids : In1P->gen_gidsP, In1P->gen_gidsType.msgtl_number, In2P->flags, &OutP->do_retry, OutP->retry_name, &OutP->file, &filePoly); | |
+ OutP->RetCode = S_fsys_getroot(In0P->Head.msgh_request_port, In0P->dotdot_node.name, (In0P->gen_uidsType.msgtl_header.msgt_inline) ? In0P->gen_uids : In0P->gen_uidsP, In0P->gen_uidsType.msgtl_number, (In1P->gen_gidsType.msgtl_header.msgt_inline) ? In1P->gen_gids : In1P->gen_gidsP, In1P->gen_gidsType.msgtl_number, In2P->flags, &OutP->do_retry, OutP->retry_name, &OutP->file.name, &filePoly); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In1P->gen_gidsType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In1P->gen_gidsP, 4 * In1P->gen_gidsType.msgtl_number); | |
@@ -448,8 +444,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t fileType; | |
- mach_port_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -465,14 +460,14 @@ | |
const mach_msg_type_t fileType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t filePoly; | |
@@ -527,7 +522,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_fsys_getfile(In0P->Head.msgh_request_port, (In0P->gen_uidsType.msgtl_header.msgt_inline) ? In0P->gen_uids : In0P->gen_uidsP, In0P->gen_uidsType.msgtl_number, (In1P->gen_gidsType.msgtl_header.msgt_inline) ? In1P->gen_gids : In1P->gen_gidsP, In1P->gen_gidsType.msgtl_number, (In2P->filehandleType.msgtl_header.msgt_inline) ? In2P->filehandle : In2P->filehandleP, In2P->filehandleType.msgtl_number, &OutP->file, &filePoly); | |
+ OutP->RetCode = S_fsys_getfile(In0P->Head.msgh_request_port, (In0P->gen_uidsType.msgtl_header.msgt_inline) ? In0P->gen_uids : In0P->gen_uidsP, In0P->gen_uidsType.msgtl_number, (In1P->gen_gidsType.msgtl_header.msgt_inline) ? In1P->gen_gids : In1P->gen_gidsP, In1P->gen_gidsType.msgtl_number, (In2P->filehandleType.msgtl_header.msgt_inline) ? In2P->filehandle : In2P->filehandleP, In2P->filehandleType.msgtl_number, &OutP->file.name, &filePoly); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In2P->filehandleType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In2P->filehandleP, In2P->filehandleType.msgtl_number); | |
@@ -752,14 +747,11 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t host_privType; | |
- mach_port_t host_priv; | |
- char host_privPad[4]; | |
+ mach_port_name_inlined_t host_priv; | |
mach_msg_type_t device_masterType; | |
- mach_port_t device_master; | |
- char device_masterPad[4]; | |
+ mach_port_name_inlined_t device_master; | |
mach_msg_type_t fstaskType; | |
- mach_port_t fstask; | |
- char fstaskPad[4]; | |
+ mach_port_name_inlined_t fstask; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -770,36 +762,36 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t host_privType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t device_masterType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t fstaskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t host_privPoly; | |
mach_msg_type_name_t device_masterPoly; | |
@@ -811,7 +803,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_fsys_getpriv(In0P->Head.msgh_request_port, &OutP->host_priv, &host_privPoly, &OutP->device_master, &device_masterPoly, &OutP->fstask, &fstaskPoly); | |
+ OutP->RetCode = S_fsys_getpriv(In0P->Head.msgh_request_port, &OutP->host_priv.name, &host_privPoly, &OutP->device_master.name, &device_masterPoly, &OutP->fstask.name, &fstaskPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -865,11 +857,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t proc_serverType; | |
- mach_port_t proc_server; | |
- char proc_serverPad[4]; | |
+ mach_port_name_inlined_t proc_server; | |
mach_msg_type_t auth_handleType; | |
- auth_t auth_handle; | |
- char auth_handlePad[4]; | |
+ mach_port_name_inlined_t auth_handle; | |
} Request; | |
typedef struct { | |
@@ -886,7 +876,7 @@ | |
const mach_msg_type_t proc_serverCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -896,7 +886,7 @@ | |
const mach_msg_type_t auth_handleCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -920,7 +910,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_fsys_init(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->proc_server, In0P->auth_handle); | |
+ OutP->RetCode = S_fsys_init(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->proc_server.name, In0P->auth_handle.name); | |
} | |
/* Default implementation of S_fsys_init */ | |
@@ -943,8 +933,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t requestorType; | |
- mach_port_t requestor; | |
- char requestorPad[4]; | |
+ mach_port_name_inlined_t requestor; | |
mach_msg_type_long_t argvType; | |
union { | |
char argv[2048]; | |
@@ -968,7 +957,7 @@ | |
const mach_msg_type_t requestorCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1000,7 +989,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_fsys_forward(In0P->Head.msgh_request_port, In0P->requestor, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number); | |
+ OutP->RetCode = S_fsys_forward(In0P->Head.msgh_request_port, In0P->requestor.name, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In0P->argvType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In0P->argvP, In0P->argvType.msgtl_number); | |
@@ -1121,7 +1110,7 @@ | |
}; | |
mach_msg_type_long_t controlsType; | |
union { | |
- mach_port_t controls[512]; | |
+ mach_port_name_inlined_t controls[256]; | |
mach_port_t *controlsP; | |
}; | |
} Reply; | |
@@ -1150,8 +1139,8 @@ | |
const mach_msg_type_long_t controlsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -1160,7 +1149,7 @@ | |
}; | |
mach_msg_type_number_t namesCnt; | |
- mach_port_t controls[512]; | |
+ mach_port_t controls[256]; | |
mach_msg_type_name_t controlsPoly; | |
mach_msg_type_number_t controlsCnt; | |
@@ -1177,7 +1166,7 @@ | |
namesCnt = 2048; | |
controlsP = controls; | |
- controlsCnt = 512; | |
+ controlsCnt = 256; | |
OutP->RetCode = S_fsys_get_children(In0P->Head.msgh_request_port, &namesP, &namesCnt, &controlsP, &controlsPoly, &controlsCnt); | |
if (OutP->RetCode != KERN_SUCCESS) | |
@@ -1201,12 +1190,20 @@ | |
if (controlsP != controls) { | |
OutP->controlsType.msgtl_header.msgt_inline = FALSE; | |
+ OutP->controlsType.msgtl_header.msgt_size = 32; | |
OutP->controlsP = controlsP; | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (controlsCnt) | |
- memcpy(OutP->controls, controls, 4 * controlsCnt); | |
+ if (controlsCnt) { | |
+ /* Copy array of mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_msg_type_number_t i; | |
+ for(i = 0; i < controlsCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ OutP->controls[i].kernel_port_do_not_use = 0; | |
+ OutP->controls[i].name = controls[i]; | |
+ } | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(controlsPoly)) | |
@@ -1215,7 +1212,7 @@ | |
OutP->controlsType.msgtl_name = controlsPoly; | |
OutP->controlsType.msgtl_number = controlsCnt; | |
- msgh_size += (OutP->controlsType.msgtl_header.msgt_inline) ? (4 * controlsCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size += (OutP->controlsType.msgtl_header.msgt_inline) ? 8 * controlsCnt : sizeof(mach_port_t *); | |
OutP = (Reply *) OutHeadP; | |
if (!msgh_simple) | |
@@ -1296,18 +1293,18 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t fsys_server_routines[] = { | |
- _Xfsys_startup, | |
- _Xfsys_goaway, | |
- _Xfsys_getroot, | |
- _Xfsys_getfile, | |
- _Xfsys_syncfs, | |
- _Xfsys_set_options, | |
- _Xfsys_getpriv, | |
- _Xfsys_init, | |
- _Xfsys_forward, | |
- _Xfsys_get_options, | |
- _Xfsys_get_children, | |
- _Xfsys_get_source, | |
+ _Xfsys_startup, /* 22000 */ | |
+ _Xfsys_goaway, /* 22001 */ | |
+ _Xfsys_getroot, /* 22002 */ | |
+ _Xfsys_getfile, /* 22003 */ | |
+ _Xfsys_syncfs, /* 22004 */ | |
+ _Xfsys_set_options, /* 22005 */ | |
+ _Xfsys_getpriv, /* 22006 */ | |
+ _Xfsys_init, /* 22007 */ | |
+ _Xfsys_forward, /* 22008 */ | |
+ _Xfsys_get_options, /* 22009 */ | |
+ _Xfsys_get_children, /* 22010 */ | |
+ _Xfsys_get_source, /* 22011 */ | |
}; | |
mig_external boolean_t fsys_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/trans/startup_notifyServer.c 2023-11-24 15:42:42.865019440 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/trans/startup_notifyServer.c 2023-11-22 01:44:16.421668534 -0500 | |
@@ -98,7 +98,7 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t startup_notify_server_routines[] = { | |
- _Xstartup_dosync, | |
+ _Xstartup_dosync, /* 29500 */ | |
}; | |
mig_external boolean_t startup_notify_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/pflocal/ioServer.c 2023-11-24 15:42:41.521049035 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/pflocal/ioServer.c 2023-11-22 01:44:15.653660831 -0500 | |
@@ -736,8 +736,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t notify_portType; | |
- mach_port_t notify_port; | |
- char notify_portPad[4]; | |
+ mach_port_name_inlined_t notify_port; | |
} Request; | |
typedef struct { | |
@@ -746,8 +745,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t async_id_portType; | |
- mach_port_t async_id_port; | |
- char async_id_portPad[4]; | |
+ mach_port_name_inlined_t async_id_port; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -758,7 +756,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t notify_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -768,14 +766,14 @@ | |
const mach_msg_type_t async_id_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t io_object; | |
mach_msg_type_name_t async_id_portPoly; | |
@@ -796,7 +794,7 @@ | |
else | |
io_object = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_io_async(io_object, In0P->notify_port, &OutP->async_id_port, &async_id_portPoly); | |
+ OutP->RetCode = S_io_async(io_object, In0P->notify_port.name, &OutP->async_id_port.name, &async_id_portPoly); | |
end_using_sock_user_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -973,8 +971,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t icky_async_id_portType; | |
- mach_port_t icky_async_id_port; | |
- char icky_async_id_portPad[4]; | |
+ mach_port_name_inlined_t icky_async_id_port; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -985,14 +982,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t icky_async_id_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t io_object; | |
mach_msg_type_name_t icky_async_id_portPoly; | |
@@ -1008,7 +1005,7 @@ | |
else | |
io_object = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_io_get_icky_async_id(io_object, &OutP->icky_async_id_port, &icky_async_id_portPoly); | |
+ OutP->RetCode = S_io_get_icky_async_id(io_object, &OutP->icky_async_id_port.name, &icky_async_id_portPoly); | |
end_using_sock_user_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1203,8 +1200,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t rendezvous2Type; | |
- mach_port_t rendezvous2; | |
- char rendezvous2Pad[4]; | |
+ mach_port_name_inlined_t rendezvous2; | |
} Request; | |
typedef struct { | |
@@ -1221,7 +1217,7 @@ | |
const mach_msg_type_t rendezvous2Check = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1247,7 +1243,7 @@ | |
else | |
auth_object = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_io_reauthenticate(auth_object, In0P->rendezvous2); | |
+ OutP->RetCode = S_io_reauthenticate(auth_object, In0P->rendezvous2.name); | |
end_using_sock_user_port(auth_object); | |
} | |
@@ -1285,8 +1281,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t new_objectType; | |
- mach_port_t new_object; | |
- char new_objectPad[4]; | |
+ mach_port_name_inlined_t new_object; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1301,14 +1296,14 @@ | |
const mach_msg_type_t new_objectType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t io_object; | |
mach_msg_type_name_t new_objectPoly; | |
@@ -1353,7 +1348,7 @@ | |
else | |
io_object = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_io_restrict_auth(io_object, &OutP->new_object, &new_objectPoly, (In0P->uidsType.msgtl_header.msgt_inline) ? In0P->uids : In0P->uidsP, In0P->uidsType.msgtl_number, (In1P->gidsType.msgtl_header.msgt_inline) ? In1P->gids : In1P->gidsP, In1P->gidsType.msgtl_number); | |
+ OutP->RetCode = S_io_restrict_auth(io_object, &OutP->new_object.name, &new_objectPoly, (In0P->uidsType.msgtl_header.msgt_inline) ? In0P->uids : In0P->uidsP, In0P->uidsType.msgtl_number, (In1P->gidsType.msgtl_header.msgt_inline) ? In1P->gids : In1P->gidsP, In1P->gidsType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In1P->gidsType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In1P->gidsP, 4 * In1P->gidsType.msgtl_number); | |
@@ -1407,8 +1402,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t newportType; | |
- mach_port_t newport; | |
- char newportPad[4]; | |
+ mach_port_name_inlined_t newport; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1419,14 +1413,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t newportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t io_object; | |
mach_msg_type_name_t newportPoly; | |
@@ -1442,7 +1436,7 @@ | |
else | |
io_object = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_io_duplicate(io_object, &OutP->newport, &newportPoly); | |
+ OutP->RetCode = S_io_duplicate(io_object, &OutP->newport.name, &newportPoly); | |
end_using_sock_user_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1603,11 +1597,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t memobjrdType; | |
- mach_port_t memobjrd; | |
- char memobjrdPad[4]; | |
+ mach_port_name_inlined_t memobjrd; | |
mach_msg_type_t memobjwtType; | |
- mach_port_t memobjwt; | |
- char memobjwtPad[4]; | |
+ mach_port_name_inlined_t memobjwt; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1618,25 +1610,25 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t memobjrdType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t memobjwtType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t io_object; | |
mach_msg_type_name_t memobjrdPoly; | |
@@ -1653,7 +1645,7 @@ | |
else | |
io_object = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_io_map(io_object, &OutP->memobjrd, &memobjrdPoly, &OutP->memobjwt, &memobjwtPoly); | |
+ OutP->RetCode = S_io_map(io_object, &OutP->memobjrd.name, &memobjrdPoly, &OutP->memobjwt.name, &memobjwtPoly); | |
end_using_sock_user_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1706,8 +1698,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t memobjType; | |
- mach_port_t memobj; | |
- char memobjPad[4]; | |
+ mach_port_name_inlined_t memobj; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1718,14 +1709,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t memobjType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t io_object; | |
mach_msg_type_name_t memobjPoly; | |
@@ -1741,7 +1732,7 @@ | |
else | |
io_object = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_io_map_cntl(io_object, &OutP->memobj, &memobjPoly); | |
+ OutP->RetCode = S_io_map_cntl(io_object, &OutP->memobj.name, &memobjPoly); | |
end_using_sock_user_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2311,11 +2302,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t idportType; | |
- mach_port_t idport; | |
- char idportPad[4]; | |
+ mach_port_name_inlined_t idport; | |
mach_msg_type_t fsidportType; | |
- mach_port_t fsidport; | |
- char fsidportPad[4]; | |
+ mach_port_name_inlined_t fsidport; | |
mach_msg_type_t filenoType; | |
ino64_t fileno; | |
} Reply; | |
@@ -2328,25 +2317,25 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t idportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t fsidportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t filenoType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -2374,7 +2363,7 @@ | |
else | |
io_object = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_io_identity(io_object, &OutP->idport, &idportPoly, &OutP->fsidport, &fsidportPoly, &OutP->fileno); | |
+ OutP->RetCode = S_io_identity(io_object, &OutP->idport.name, &idportPoly, &OutP->fsidport.name, &fsidportPoly, &OutP->fileno); | |
end_using_sock_user_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2573,38 +2562,38 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t io_server_routines[] = { | |
- _Xio_write, | |
- _Xio_read, | |
- _Xio_seek, | |
- _Xio_readable, | |
- _Xio_set_all_openmodes, | |
- _Xio_get_openmodes, | |
- _Xio_set_some_openmodes, | |
- _Xio_clear_some_openmodes, | |
- _Xio_async, | |
- _Xio_mod_owner, | |
- _Xio_get_owner, | |
- _Xio_get_icky_async_id, | |
- _Xio_select, | |
- _Xio_stat, | |
- _Xio_reauthenticate, | |
- _Xio_restrict_auth, | |
- _Xio_duplicate, | |
- _Xio_server_version, | |
- _Xio_map, | |
- _Xio_map_cntl, | |
- _Xio_get_conch, | |
- _Xio_release_conch, | |
- _Xio_eofnotify, | |
- _Xio_prenotify, | |
- _Xio_postnotify, | |
- _Xio_readnotify, | |
- _Xio_readsleep, | |
- _Xio_sigio, | |
- _Xio_pathconf, | |
- _Xio_identity, | |
- _Xio_revoke, | |
- _Xio_select_timeout, | |
+ _Xio_write, /* 21000 */ | |
+ _Xio_read, /* 21001 */ | |
+ _Xio_seek, /* 21002 */ | |
+ _Xio_readable, /* 21003 */ | |
+ _Xio_set_all_openmodes, /* 21004 */ | |
+ _Xio_get_openmodes, /* 21005 */ | |
+ _Xio_set_some_openmodes, /* 21006 */ | |
+ _Xio_clear_some_openmodes, /* 21007 */ | |
+ _Xio_async, /* 21008 */ | |
+ _Xio_mod_owner, /* 21009 */ | |
+ _Xio_get_owner, /* 21010 */ | |
+ _Xio_get_icky_async_id, /* 21011 */ | |
+ _Xio_select, /* 21012 */ | |
+ _Xio_stat, /* 21013 */ | |
+ _Xio_reauthenticate, /* 21014 */ | |
+ _Xio_restrict_auth, /* 21015 */ | |
+ _Xio_duplicate, /* 21016 */ | |
+ _Xio_server_version, /* 21017 */ | |
+ _Xio_map, /* 21018 */ | |
+ _Xio_map_cntl, /* 21019 */ | |
+ _Xio_get_conch, /* 21020 */ | |
+ _Xio_release_conch, /* 21021 */ | |
+ _Xio_eofnotify, /* 21022 */ | |
+ _Xio_prenotify, /* 21023 */ | |
+ _Xio_postnotify, /* 21024 */ | |
+ _Xio_readnotify, /* 21025 */ | |
+ _Xio_readsleep, /* 21026 */ | |
+ _Xio_sigio, /* 21027 */ | |
+ _Xio_pathconf, /* 21028 */ | |
+ _Xio_identity, /* 21029 */ | |
+ _Xio_revoke, /* 21030 */ | |
+ _Xio_select_timeout, /* 21031 */ | |
}; | |
mig_external boolean_t io_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/pflocal/socketServer.c 2023-11-24 15:42:41.449050622 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/pflocal/socketServer.c 2023-11-22 01:44:15.501659306 -0500 | |
@@ -75,8 +75,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t sockType; | |
- mach_port_t sock; | |
- char sockPad[4]; | |
+ mach_port_name_inlined_t sock; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -107,14 +106,14 @@ | |
const mach_msg_type_t sockType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
trivfs_protid_t server; | |
mach_msg_type_name_t sockPoly; | |
@@ -140,7 +139,7 @@ | |
else | |
server = trivfs_begin_using_protid(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_socket_create(server, In0P->sock_type, In0P->protocol, &OutP->sock, &sockPoly); | |
+ OutP->RetCode = S_socket_create(server, In0P->sock_type, In0P->protocol, &OutP->sock.name, &sockPoly); | |
trivfs_end_using_protid(server); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -251,11 +250,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t conn_sockType; | |
- mach_port_t conn_sock; | |
- char conn_sockPad[4]; | |
+ mach_port_name_inlined_t conn_sock; | |
mach_msg_type_t peer_addrType; | |
- mach_port_t peer_addr; | |
- char peer_addrPad[4]; | |
+ mach_port_name_inlined_t peer_addr; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -266,25 +263,25 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t conn_sockType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t peer_addrType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t sock; | |
mach_msg_type_name_t conn_sockPoly; | |
@@ -301,7 +298,7 @@ | |
else | |
sock = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_socket_accept(sock, &OutP->conn_sock, &conn_sockPoly, &OutP->peer_addr, &peer_addrPoly); | |
+ OutP->RetCode = S_socket_accept(sock, &OutP->conn_sock.name, &conn_sockPoly, &OutP->peer_addr.name, &peer_addrPoly); | |
end_using_sock_user_port(sock); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -347,8 +344,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t addrType; | |
- addr_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Request; | |
typedef struct { | |
@@ -365,7 +361,7 @@ | |
const mach_msg_type_t addrCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -392,7 +388,7 @@ | |
else | |
sock = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- addr = begin_using_addr_port(In0P->addr); | |
+ addr = begin_using_addr_port(In0P->addr.name); | |
OutP->RetCode = S_socket_connect(sock, addr); | |
end_using_addr_port(addr); | |
@@ -416,8 +412,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t addrType; | |
- addr_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Request; | |
typedef struct { | |
@@ -434,7 +429,7 @@ | |
const mach_msg_type_t addrCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -461,7 +456,7 @@ | |
else | |
sock = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- addr = begin_using_addr_port(In0P->addr); | |
+ addr = begin_using_addr_port(In0P->addr.name); | |
OutP->RetCode = S_socket_bind(sock, addr); | |
end_using_addr_port(addr); | |
@@ -492,8 +487,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t addrType; | |
- mach_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -504,14 +498,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t addrType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t sock; | |
mach_msg_type_name_t addrPoly; | |
@@ -527,7 +521,7 @@ | |
else | |
sock = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_socket_name(sock, &OutP->addr, &addrPoly); | |
+ OutP->RetCode = S_socket_name(sock, &OutP->addr.name, &addrPoly); | |
end_using_sock_user_port(sock); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -571,8 +565,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t addrType; | |
- mach_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -583,14 +576,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t addrType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t sock; | |
mach_msg_type_name_t addrPoly; | |
@@ -606,7 +599,7 @@ | |
else | |
sock = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_socket_peername(sock, &OutP->addr, &addrPoly); | |
+ OutP->RetCode = S_socket_peername(sock, &OutP->addr.name, &addrPoly); | |
end_using_sock_user_port(sock); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -643,8 +636,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t sock2Type; | |
- socket_t sock2; | |
- char sock2Pad[4]; | |
+ mach_port_name_inlined_t sock2; | |
} Request; | |
typedef struct { | |
@@ -661,7 +653,7 @@ | |
const mach_msg_type_t sock2Check = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -688,7 +680,7 @@ | |
else | |
sock1 = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- sock2 = begin_using_sock_user_port(In0P->sock2); | |
+ sock2 = begin_using_sock_user_port(In0P->sock2.name); | |
OutP->RetCode = S_socket_connect2(sock1, sock2); | |
end_using_sock_user_port(sock2); | |
@@ -727,8 +719,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t addrType; | |
- mach_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -751,14 +742,14 @@ | |
const mach_msg_type_t addrType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_port_t server; | |
mach_msg_type_name_t addrPoly; | |
@@ -791,7 +782,7 @@ | |
server = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
server = In0P->Head.msgh_request_port; | |
- OutP->RetCode = S_socket_create_address(server, In0P->sockaddr_type, (In0P->sockaddrType.msgtl_header.msgt_inline) ? In0P->sockaddr : In0P->sockaddrP, In0P->sockaddrType.msgtl_number, &OutP->addr, &addrPoly); | |
+ OutP->RetCode = S_socket_create_address(server, In0P->sockaddr_type, (In0P->sockaddrType.msgtl_header.msgt_inline) ? In0P->sockaddr : In0P->sockaddrP, In0P->sockaddrType.msgtl_number, &OutP->addr.name, &addrPoly); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In0P->sockaddrType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In0P->sockaddrP, In0P->sockaddrType.msgtl_number); | |
@@ -843,8 +834,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t addrType; | |
- mach_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -865,14 +855,14 @@ | |
const mach_msg_type_t addrType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_port_t server; | |
mach_msg_type_name_t addrPoly; | |
@@ -892,7 +882,7 @@ | |
server = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
server = In0P->Head.msgh_request_port; | |
- OutP->RetCode = S_socket_fabricate_address(server, In0P->sockaddr_type, &OutP->addr, &addrPoly); | |
+ OutP->RetCode = S_socket_fabricate_address(server, In0P->sockaddr_type, &OutP->addr.name, &addrPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1342,8 +1332,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t addrType; | |
- addr_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
mach_msg_type_t flagsType; | |
int flags; | |
char flagsPad[4]; | |
@@ -1354,7 +1343,7 @@ | |
}; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t controlType; | |
@@ -1385,7 +1374,7 @@ | |
const mach_msg_type_t addrCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1417,6 +1406,8 @@ | |
sock_user_t sock; | |
addr_t addr; | |
+ mach_port_t *portsP; | |
+ | |
#if TypeCheck | |
msgh_size = In0P->Head.msgh_size; | |
if (mig_unlikely ((msgh_size < 88) || | |
@@ -1453,11 +1444,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In1P->portsType.msgtl_header.msgt_longform != TRUE) || | |
(In1P->portsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In1P->portsType.msgtl_size != 32))) | |
+ (In1P->portsType.msgtl_size != 64 && In1P->portsType.msgtl_header.msgt_inline == TRUE) || | |
+ (In1P->portsType.msgtl_size != 32 && In1P->portsType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In1P->portsType.msgtl_header.msgt_inline) ? (4 * In1P->portsType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In1P->portsType.msgtl_header.msgt_inline) ? 8 * In1P->portsType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 88 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -1483,9 +1475,19 @@ | |
else | |
sock = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- addr = begin_using_addr_port(In0P->addr); | |
+ addr = begin_using_addr_port(In0P->addr.name); | |
- OutP->RetCode = S_socket_send(sock, addr, In0P->flags, (In0P->dataType.msgtl_header.msgt_inline) ? In0P->data : In0P->dataP, In0P->dataType.msgtl_number, (In1P->portsType.msgtl_header.msgt_inline) ? In1P->ports : In1P->portsP, In1P->portsType.msgtl_number, (In2P->controlType.msgtl_header.msgt_inline) ? In2P->control : In2P->controlP, In2P->controlType.msgtl_number, &OutP->amount); | |
+ if (In1P->portsType.msgtl_header.msgt_inline) { | |
+ portsP = (mach_port_t *)In1P->ports; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In1P->portsType.msgtl_number; i++) { | |
+ portsP[i] = In1P->ports[i].name; | |
+ } | |
+ } else { | |
+ portsP = In1P->portsP; | |
+ } | |
+ OutP->RetCode = S_socket_send(sock, addr, In0P->flags, (In0P->dataType.msgtl_header.msgt_inline) ? In0P->data : In0P->dataP, In0P->dataType.msgtl_number, portsP, In1P->portsType.msgtl_number, (In2P->controlType.msgtl_header.msgt_inline) ? In2P->control : In2P->controlP, In2P->controlType.msgtl_number, &OutP->amount); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In2P->controlType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In2P->controlP, In2P->controlType.msgtl_number); | |
@@ -1542,8 +1544,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t addrType; | |
- mach_port_t addr; | |
- char addrPad[4]; | |
+ mach_port_name_inlined_t addr; | |
mach_msg_type_long_t dataType; | |
union { | |
char data[2048]; | |
@@ -1551,7 +1552,7 @@ | |
}; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t controlType; | |
@@ -1595,14 +1596,14 @@ | |
const mach_msg_type_t addrType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t dataType = { | |
.msgtl_header = { | |
@@ -1619,8 +1620,8 @@ | |
const mach_msg_type_long_t portsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -1654,7 +1655,7 @@ | |
sock_user_t sock; | |
mach_msg_type_name_t addrPoly; | |
mach_msg_type_number_t dataCnt; | |
- mach_port_t ports[512]; | |
+ mach_port_t ports[256]; | |
mach_msg_type_name_t portsPoly; | |
mach_msg_type_number_t portsCnt; | |
char control[2048]; | |
@@ -1690,12 +1691,12 @@ | |
dataCnt = 2048; | |
portsP = ports; | |
- portsCnt = 512; | |
+ portsCnt = 256; | |
controlP = control; | |
controlCnt = 2048; | |
- OutP->RetCode = S_socket_recv(sock, &OutP->addr, &addrPoly, In0P->flags, &dataP, &dataCnt, &portsP, &portsPoly, &portsCnt, &controlP, &controlCnt, &outflags, In0P->amount); | |
+ OutP->RetCode = S_socket_recv(sock, &OutP->addr.name, &addrPoly, In0P->flags, &dataP, &dataCnt, &portsP, &portsPoly, &portsCnt, &controlP, &controlCnt, &outflags, In0P->amount); | |
end_using_sock_user_port(sock); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1727,12 +1728,20 @@ | |
if (portsP != ports) { | |
OutP->portsType.msgtl_header.msgt_inline = FALSE; | |
OutP->portsType.msgtl_header.msgt_deallocate = TRUE; | |
+ OutP->portsType.msgtl_header.msgt_size = 32; | |
OutP->portsP = portsP; | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (portsCnt) | |
- memcpy(OutP->ports, ports, 4 * portsCnt); | |
+ if (portsCnt) { | |
+ /* Copy array of mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_msg_type_number_t i; | |
+ for(i = 0; i < portsCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ OutP->ports[i].kernel_port_do_not_use = 0; | |
+ OutP->ports[i].name = ports[i]; | |
+ } | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(portsPoly)) | |
@@ -1741,7 +1750,7 @@ | |
OutP->portsType.msgtl_name = portsPoly; | |
OutP->portsType.msgtl_number = portsCnt; | |
- msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? (4 * portsCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? 8 * portsCnt : sizeof(mach_port_t *); | |
msgh_size += msgh_size_delta; | |
OutP = (Reply *) ((char *) OutP + msgh_size_delta - 2048); | |
@@ -1754,8 +1763,9 @@ | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (controlCnt) | |
+ if (controlCnt) { | |
memcpy(OutP->control, control, controlCnt); | |
+ } | |
} | |
OutP->controlType.msgtl_number = controlCnt; | |
@@ -1795,22 +1805,22 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t socket_server_routines[] = { | |
- _Xsocket_create, | |
- _Xsocket_listen, | |
- _Xsocket_accept, | |
- _Xsocket_connect, | |
- _Xsocket_bind, | |
- _Xsocket_name, | |
- _Xsocket_peername, | |
- _Xsocket_connect2, | |
- _Xsocket_create_address, | |
- _Xsocket_fabricate_address, | |
- _Xsocket_whatis_address, | |
- _Xsocket_shutdown, | |
- _Xsocket_getopt, | |
- _Xsocket_setopt, | |
- _Xsocket_send, | |
- _Xsocket_recv, | |
+ _Xsocket_create, /* 26000 */ | |
+ _Xsocket_listen, /* 26001 */ | |
+ _Xsocket_accept, /* 26002 */ | |
+ _Xsocket_connect, /* 26003 */ | |
+ _Xsocket_bind, /* 26004 */ | |
+ _Xsocket_name, /* 26005 */ | |
+ _Xsocket_peername, /* 26006 */ | |
+ _Xsocket_connect2, /* 26007 */ | |
+ _Xsocket_create_address, /* 26008 */ | |
+ _Xsocket_fabricate_address, /* 26009 */ | |
+ _Xsocket_whatis_address, /* 26010 */ | |
+ _Xsocket_shutdown, /* 26011 */ | |
+ _Xsocket_getopt, /* 26012 */ | |
+ _Xsocket_setopt, /* 26013 */ | |
+ _Xsocket_send, /* 26014 */ | |
+ _Xsocket_recv, /* 26015 */ | |
}; | |
mig_external boolean_t socket_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/pflocal/fsServer.c 2023-11-24 15:42:41.445050709 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/pflocal/fsServer.c 2023-11-22 01:44:15.497659267 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t exec_taskType; | |
- mach_port_t exec_task; | |
- char exec_taskPad[4]; | |
+ mach_port_name_inlined_t exec_task; | |
mach_msg_type_t flagsType; | |
int flags; | |
char flagsPad[4]; | |
@@ -78,12 +77,12 @@ | |
}; | |
mach_msg_type_long_t fdarrayType; | |
union { | |
- mach_port_t fdarray[512]; | |
+ mach_port_name_inlined_t fdarray[256]; | |
mach_port_t *fdarrayP; | |
}; | |
mach_msg_type_long_t portarrayType; | |
union { | |
- mach_port_t portarray[512]; | |
+ mach_port_name_inlined_t portarray[256]; | |
mach_port_t *portarrayP; | |
}; | |
mach_msg_type_long_t intarrayType; | |
@@ -126,7 +125,7 @@ | |
const mach_msg_type_t exec_taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -146,6 +145,9 @@ | |
sock_user_t exec_file; | |
+ mach_port_t *fdarrayP; | |
+ mach_port_t *portarrayP; | |
+ | |
#if TypeCheck | |
msgh_size = In0P->Head.msgh_size; | |
if (mig_unlikely ((msgh_size < 120) || | |
@@ -198,11 +200,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In2P->fdarrayType.msgtl_header.msgt_longform != TRUE) || | |
(In2P->fdarrayType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In2P->fdarrayType.msgtl_size != 32))) | |
+ (In2P->fdarrayType.msgtl_size != 64 && In2P->fdarrayType.msgtl_header.msgt_inline == TRUE) || | |
+ (In2P->fdarrayType.msgtl_size != 32 && In2P->fdarrayType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In2P->fdarrayType.msgtl_header.msgt_inline) ? (4 * In2P->fdarrayType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In2P->fdarrayType.msgtl_header.msgt_inline) ? 8 * In2P->fdarrayType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 120 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -214,11 +217,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In3P->portarrayType.msgtl_header.msgt_longform != TRUE) || | |
(In3P->portarrayType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In3P->portarrayType.msgtl_size != 32))) | |
+ (In3P->portarrayType.msgtl_size != 64 && In3P->portarrayType.msgtl_header.msgt_inline == TRUE) || | |
+ (In3P->portarrayType.msgtl_size != 32 && In3P->portarrayType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In3P->portarrayType.msgtl_header.msgt_inline) ? (4 * In3P->portarrayType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In3P->portarrayType.msgtl_header.msgt_inline) ? 8 * In3P->portarrayType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 120 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -276,7 +280,27 @@ | |
else | |
exec_file = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_file_exec(exec_file, In0P->exec_task, In0P->flags, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number, (In1P->envpType.msgtl_header.msgt_inline) ? In1P->envp : In1P->envpP, In1P->envpType.msgtl_number, (In2P->fdarrayType.msgtl_header.msgt_inline) ? In2P->fdarray : In2P->fdarrayP, In2P->fdarrayType.msgtl_number, (In3P->portarrayType.msgtl_header.msgt_inline) ? In3P->portarray : In3P->portarrayP, In3P->portarrayType.msgtl_number, (In4P->intarrayType.msgtl_header.msgt_inline) ? In4P->intarray : In4P->intarrayP, In4P->intarrayType.msgtl_number, (In5P->deallocnamesType.msgtl_header.msgt_inline) ? In5P->deallocnames : In5P->deallocnamesP, In5P->deallocnamesType.msgtl_number, (In6P->destroynamesType.msgtl_header.msgt_inline) ? In6P->destroynames : In6P->destroynamesP, In6P->destroynamesType.msgtl_number); | |
+ if (In2P->fdarrayType.msgtl_header.msgt_inline) { | |
+ fdarrayP = (mach_port_t *)In2P->fdarray; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In2P->fdarrayType.msgtl_number; i++) { | |
+ fdarrayP[i] = In2P->fdarray[i].name; | |
+ } | |
+ } else { | |
+ fdarrayP = In2P->fdarrayP; | |
+ } | |
+ if (In3P->portarrayType.msgtl_header.msgt_inline) { | |
+ portarrayP = (mach_port_t *)In3P->portarray; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In3P->portarrayType.msgtl_number; i++) { | |
+ portarrayP[i] = In3P->portarray[i].name; | |
+ } | |
+ } else { | |
+ portarrayP = In3P->portarrayP; | |
+ } | |
+ OutP->RetCode = S_file_exec(exec_file, In0P->exec_task.name, In0P->flags, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number, (In1P->envpType.msgtl_header.msgt_inline) ? In1P->envp : In1P->envpP, In1P->envpType.msgtl_number, fdarrayP, In2P->fdarrayType.msgtl_number, portarrayP, In3P->portarrayType.msgtl_number, (In4P->intarrayType.msgtl_header.msgt_inline) ? In4P->intarray : In4P->intarrayP, In4P->intarrayType.msgtl_number, (In5P->deallocnamesType.msgtl_header.msgt_inline) ? In5P->deallocnames : In5P->deallocnamesP, In5P->deallocnamesType.msgtl_number, (In6P->destroynamesType.msgtl_header.msgt_inline) ? In6P->destroynames : In6P->destroynamesP, In6P->destroynamesType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In6P->destroynamesType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In6P->destroynamesP, 4 * In6P->destroynamesType.msgtl_number); | |
@@ -974,8 +998,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -992,7 +1015,7 @@ | |
const mach_msg_type_t portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1018,7 +1041,7 @@ | |
else | |
file = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_file_notice_changes(file, In0P->port); | |
+ OutP->RetCode = S_file_notice_changes(file, In0P->port.name); | |
end_using_sock_user_port(file); | |
} | |
@@ -1046,8 +1069,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t controlType; | |
- mach_port_t control; | |
- char controlPad[4]; | |
+ mach_port_name_inlined_t control; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1058,14 +1080,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t controlType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t file; | |
mach_msg_type_name_t controlPoly; | |
@@ -1081,7 +1103,7 @@ | |
else | |
file = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_file_getcontrol(file, &OutP->control, &controlPoly); | |
+ OutP->RetCode = S_file_getcontrol(file, &OutP->control.name, &controlPoly); | |
end_using_sock_user_port(file); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1360,7 +1382,7 @@ | |
char RetCodePad[4]; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t intsType; | |
@@ -1392,8 +1414,8 @@ | |
const mach_msg_type_long_t portsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -1464,7 +1486,7 @@ | |
file = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
portsP = OutP->ports; | |
- portsCnt = 512; | |
+ portsCnt = 256; | |
intsP = ints; | |
intsCnt = 512; | |
@@ -1486,8 +1508,19 @@ | |
if (portsP != OutP->ports) { | |
OutP->portsType.msgtl_header.msgt_inline = FALSE; | |
OutP->portsType.msgtl_header.msgt_deallocate = TRUE; | |
+ OutP->portsType.msgtl_header.msgt_size = 32; | |
OutP->portsP = portsP; | |
msgh_simple = FALSE; | |
+ } else { | |
+ /* Resize mach_port_name_t array into mach_port_name_inlined_t. */ | |
+ /* Work in reverse order to avoid overriding subsequent entries. */ | |
+ mach_msg_type_number_t i; | |
+ for(i = portsCnt; i > 0; i--) { | |
+ mach_port_name_t tmp_port_name = portsP[i - 1]; | |
+ /* Clear the whole message with zeros. */ | |
+ OutP->ports[i - 1].kernel_port_do_not_use = 0; | |
+ OutP->ports[i - 1].name = tmp_port_name; | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(portsPoly)) | |
@@ -1496,7 +1529,7 @@ | |
OutP->portsType.msgtl_name = portsPoly; | |
OutP->portsType.msgtl_number = portsCnt; | |
- msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? (4 * portsCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? 8 * portsCnt : sizeof(mach_port_t *); | |
msgh_size = 80 + msgh_size_delta; | |
OutP = (Reply *) ((char *) OutP + msgh_size_delta - 2048); | |
@@ -1509,8 +1542,9 @@ | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (intsCnt) | |
+ if (intsCnt) { | |
memcpy(OutP->ints, ints, 4 * intsCnt); | |
+ } | |
} | |
OutP->intsType.msgtl_number = intsCnt; | |
@@ -1527,8 +1561,9 @@ | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (offsetsCnt) | |
+ if (offsetsCnt) { | |
memcpy(OutP->offsets, offsets, 8 * offsetsCnt); | |
+ } | |
} | |
OutP->offsetsType.msgtl_number = offsetsCnt; | |
@@ -1545,8 +1580,9 @@ | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (dataCnt) | |
+ if (dataCnt) { | |
memcpy(OutP->data, data, dataCnt); | |
+ } | |
} | |
OutP->dataType.msgtl_number = dataCnt; | |
@@ -1590,8 +1626,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t linknodeType; | |
- mach_port_t linknode; | |
- char linknodePad[4]; | |
+ mach_port_name_inlined_t linknode; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1602,14 +1637,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t linknodeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t file; | |
mach_msg_type_name_t linknodePoly; | |
@@ -1625,7 +1660,7 @@ | |
else | |
file = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_file_getlinknode(file, &OutP->linknode, &linknodePoly); | |
+ OutP->RetCode = S_file_getlinknode(file, &OutP->linknode.name, &linknodePoly); | |
end_using_sock_user_port(file); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1772,8 +1807,7 @@ | |
mach_msg_type_t retry_nameType; | |
string_t retry_name; | |
mach_msg_type_t resultType; | |
- mach_port_t result; | |
- char resultPad[4]; | |
+ mach_port_name_inlined_t result; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1836,14 +1870,14 @@ | |
const mach_msg_type_t resultType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t start_dir; | |
mach_msg_type_name_t resultPoly; | |
@@ -1874,7 +1908,7 @@ | |
else | |
start_dir = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_dir_lookup(start_dir, In0P->file_name, In0P->flags, In0P->mode, &OutP->do_retry, OutP->retry_name, &OutP->result, &resultPoly); | |
+ OutP->RetCode = S_dir_lookup(start_dir, In0P->file_name, In0P->flags, In0P->mode, &OutP->do_retry, OutP->retry_name, &OutP->result.name, &resultPoly); | |
end_using_sock_user_port(start_dir); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2304,8 +2338,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t fileType; | |
- io_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
mach_msg_type_t nameType; | |
string_t name; | |
mach_msg_type_t exclType; | |
@@ -2327,7 +2360,7 @@ | |
const mach_msg_type_t fileCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2384,7 +2417,7 @@ | |
else | |
dir = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- file = begin_using_sock_user_port(In0P->file); | |
+ file = begin_using_sock_user_port(In0P->file.name); | |
OutP->RetCode = S_dir_link(dir, file, In0P->name, In0P->excl); | |
end_using_sock_user_port(file); | |
@@ -2412,8 +2445,7 @@ | |
mach_msg_type_t oldnameType; | |
string_t oldname; | |
mach_msg_type_t newdirectoryType; | |
- io_t newdirectory; | |
- char newdirectoryPad[4]; | |
+ mach_port_name_inlined_t newdirectory; | |
mach_msg_type_t newnameType; | |
string_t newname; | |
mach_msg_type_t exclType; | |
@@ -2445,7 +2477,7 @@ | |
const mach_msg_type_t newdirectoryCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2507,7 +2539,7 @@ | |
else | |
olddirectory = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- newdirectory = begin_using_sock_user_port(In0P->newdirectory); | |
+ newdirectory = begin_using_sock_user_port(In0P->newdirectory.name); | |
OutP->RetCode = S_dir_rename(olddirectory, In0P->oldname, newdirectory, In0P->newname, In0P->excl); | |
end_using_sock_user_port(newdirectory); | |
@@ -2547,8 +2579,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t newnodeType; | |
- mach_port_t newnode; | |
- char newnodePad[4]; | |
+ mach_port_name_inlined_t newnode; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -2579,14 +2610,14 @@ | |
const mach_msg_type_t newnodeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t directory; | |
mach_msg_type_name_t newnodePoly; | |
@@ -2612,7 +2643,7 @@ | |
else | |
directory = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_dir_mkfile(directory, In0P->flags, In0P->mode, &OutP->newnode, &newnodePoly); | |
+ OutP->RetCode = S_dir_mkfile(directory, In0P->flags, In0P->mode, &OutP->newnode.name, &newnodePoly); | |
end_using_sock_user_port(directory); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2651,8 +2682,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -2669,7 +2699,7 @@ | |
const mach_msg_type_t portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2695,7 +2725,7 @@ | |
else | |
directory = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_dir_notice_changes(directory, In0P->port); | |
+ OutP->RetCode = S_dir_notice_changes(directory, In0P->port.name); | |
end_using_sock_user_port(directory); | |
} | |
@@ -2730,8 +2760,7 @@ | |
char *passiveP; | |
}; | |
mach_msg_type_t activeType; | |
- mach_port_t active; | |
- char activePad[4]; | |
+ mach_port_name_inlined_t active; | |
} Request; | |
typedef struct { | |
@@ -2782,7 +2811,7 @@ | |
const mach_msg_type_t activeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2839,7 +2868,7 @@ | |
else | |
file = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_file_set_translator(file, In0P->passive_flags, In0P->active_flags, In0P->oldtrans_flags, (In0P->passiveType.msgtl_header.msgt_inline) ? In0P->passive : In0P->passiveP, In0P->passiveType.msgtl_number, In1P->active); | |
+ OutP->RetCode = S_file_set_translator(file, In0P->passive_flags, In0P->active_flags, In0P->oldtrans_flags, (In0P->passiveType.msgtl_header.msgt_inline) ? In0P->passive : In0P->passiveP, In0P->passiveType.msgtl_number, In1P->active.name); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In0P->passiveType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In0P->passiveP, In0P->passiveType.msgtl_number); | |
@@ -2965,8 +2994,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t translator_cntlType; | |
- mach_port_t translator_cntl; | |
- char translator_cntlPad[4]; | |
+ mach_port_name_inlined_t translator_cntl; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -2977,14 +3005,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t translator_cntlType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t file; | |
mach_msg_type_name_t translator_cntlPoly; | |
@@ -3000,7 +3028,7 @@ | |
else | |
file = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_file_get_translator_cntl(file, &OutP->translator_cntl, &translator_cntlPoly); | |
+ OutP->RetCode = S_file_get_translator_cntl(file, &OutP->translator_cntl.name, &translator_cntlPoly); | |
end_using_sock_user_port(file); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -3127,8 +3155,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t parentType; | |
- mach_port_t parent; | |
- char parentPad[4]; | |
+ mach_port_name_inlined_t parent; | |
} Request; | |
typedef struct { | |
@@ -3137,8 +3164,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t new_fileType; | |
- mach_port_t new_file; | |
- char new_filePad[4]; | |
+ mach_port_name_inlined_t new_file; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -3149,7 +3175,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t parentCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -3159,14 +3185,14 @@ | |
const mach_msg_type_t new_fileType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
sock_user_t file; | |
mach_port_t parent; | |
@@ -3188,9 +3214,9 @@ | |
else | |
file = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- parent = In0P->parent; | |
+ parent = In0P->parent.name; | |
- OutP->RetCode = S_file_reparent(file, parent, &OutP->new_file, &new_filePoly); | |
+ OutP->RetCode = S_file_reparent(file, parent, &OutP->new_file.name, &new_filePoly); | |
end_using_sock_user_port(file); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -3228,8 +3254,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t exec_taskType; | |
- mach_port_t exec_task; | |
- char exec_taskPad[4]; | |
+ mach_port_name_inlined_t exec_task; | |
mach_msg_type_t flagsType; | |
int flags; | |
char flagsPad[4]; | |
@@ -3249,12 +3274,12 @@ | |
}; | |
mach_msg_type_long_t fdarrayType; | |
union { | |
- mach_port_t fdarray[512]; | |
+ mach_port_name_inlined_t fdarray[256]; | |
mach_port_t *fdarrayP; | |
}; | |
mach_msg_type_long_t portarrayType; | |
union { | |
- mach_port_t portarray[512]; | |
+ mach_port_name_inlined_t portarray[256]; | |
mach_port_t *portarrayP; | |
}; | |
mach_msg_type_long_t intarrayType; | |
@@ -3297,7 +3322,7 @@ | |
const mach_msg_type_t exec_taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -3337,6 +3362,9 @@ | |
sock_user_t exec_file; | |
+ mach_port_t *fdarrayP; | |
+ mach_port_t *portarrayP; | |
+ | |
#if TypeCheck | |
msgh_size = In0P->Head.msgh_size; | |
if (mig_unlikely ((msgh_size < 2184) || | |
@@ -3399,11 +3427,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In2P->fdarrayType.msgtl_header.msgt_longform != TRUE) || | |
(In2P->fdarrayType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In2P->fdarrayType.msgtl_size != 32))) | |
+ (In2P->fdarrayType.msgtl_size != 64 && In2P->fdarrayType.msgtl_header.msgt_inline == TRUE) || | |
+ (In2P->fdarrayType.msgtl_size != 32 && In2P->fdarrayType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In2P->fdarrayType.msgtl_header.msgt_inline) ? (4 * In2P->fdarrayType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In2P->fdarrayType.msgtl_header.msgt_inline) ? 8 * In2P->fdarrayType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 2184 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -3415,11 +3444,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In3P->portarrayType.msgtl_header.msgt_longform != TRUE) || | |
(In3P->portarrayType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In3P->portarrayType.msgtl_size != 32))) | |
+ (In3P->portarrayType.msgtl_size != 64 && In3P->portarrayType.msgtl_header.msgt_inline == TRUE) || | |
+ (In3P->portarrayType.msgtl_size != 32 && In3P->portarrayType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In3P->portarrayType.msgtl_header.msgt_inline) ? (4 * In3P->portarrayType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In3P->portarrayType.msgtl_header.msgt_inline) ? 8 * In3P->portarrayType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 2184 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -3477,7 +3507,27 @@ | |
else | |
exec_file = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_file_exec_paths(exec_file, In0P->exec_task, In0P->flags, In0P->path, In0P->abspath, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number, (In1P->envpType.msgtl_header.msgt_inline) ? In1P->envp : In1P->envpP, In1P->envpType.msgtl_number, (In2P->fdarrayType.msgtl_header.msgt_inline) ? In2P->fdarray : In2P->fdarrayP, In2P->fdarrayType.msgtl_number, (In3P->portarrayType.msgtl_header.msgt_inline) ? In3P->portarray : In3P->portarrayP, In3P->portarrayType.msgtl_number, (In4P->intarrayType.msgtl_header.msgt_inline) ? In4P->intarray : In4P->intarrayP, In4P->intarrayType.msgtl_number, (In5P->deallocnamesType.msgtl_header.msgt_inline) ? In5P->deallocnames : In5P->deallocnamesP, In5P->deallocnamesType.msgtl_number, (In6P->destroynamesType.msgtl_header.msgt_inline) ? In6P->destroynames : In6P->destroynamesP, In6P->destroynamesType.msgtl_number); | |
+ if (In2P->fdarrayType.msgtl_header.msgt_inline) { | |
+ fdarrayP = (mach_port_t *)In2P->fdarray; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In2P->fdarrayType.msgtl_number; i++) { | |
+ fdarrayP[i] = In2P->fdarray[i].name; | |
+ } | |
+ } else { | |
+ fdarrayP = In2P->fdarrayP; | |
+ } | |
+ if (In3P->portarrayType.msgtl_header.msgt_inline) { | |
+ portarrayP = (mach_port_t *)In3P->portarray; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In3P->portarrayType.msgtl_number; i++) { | |
+ portarrayP[i] = In3P->portarray[i].name; | |
+ } | |
+ } else { | |
+ portarrayP = In3P->portarrayP; | |
+ } | |
+ OutP->RetCode = S_file_exec_paths(exec_file, In0P->exec_task.name, In0P->flags, In0P->path, In0P->abspath, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number, (In1P->envpType.msgtl_header.msgt_inline) ? In1P->envp : In1P->envpP, In1P->envpType.msgtl_number, fdarrayP, In2P->fdarrayType.msgtl_number, portarrayP, In3P->portarrayType.msgtl_number, (In4P->intarrayType.msgtl_header.msgt_inline) ? In4P->intarray : In4P->intarrayP, In4P->intarrayType.msgtl_number, (In5P->deallocnamesType.msgtl_header.msgt_inline) ? In5P->deallocnames : In5P->deallocnamesP, In5P->deallocnamesType.msgtl_number, (In6P->destroynamesType.msgtl_header.msgt_inline) ? In6P->destroynames : In6P->destroynamesP, In6P->destroynamesType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In6P->destroynamesType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In6P->destroynamesP, 4 * In6P->destroynamesType.msgtl_number); | |
@@ -3623,8 +3673,7 @@ | |
mach_msg_type_t flock64Type; | |
flock_t flock64; | |
mach_msg_type_t rendezvousType; | |
- mach_port_t rendezvous; | |
- char rendezvousPad[4]; | |
+ mach_port_name_inlined_t rendezvous; | |
} Request; | |
typedef struct { | |
@@ -3663,7 +3712,7 @@ | |
const mach_msg_type_t rendezvousCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -3710,7 +3759,7 @@ | |
else | |
file = begin_using_sock_user_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = S_file_record_lock(file, In0P->cmd, &In0P->flock64, In0P->rendezvous); | |
+ OutP->RetCode = S_file_record_lock(file, In0P->cmd, &In0P->flock64, In0P->rendezvous.name); | |
end_using_sock_user_port(file); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -3735,43 +3784,43 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t fs_server_routines[] = { | |
- _Xfile_exec, | |
- _Xfile_chown, | |
- _Xfile_chauthor, | |
- _Xfile_chmod, | |
- _Xfile_chflags, | |
- _Xfile_utimes, | |
- _Xfile_set_size, | |
- _Xfile_lock, | |
- _Xfile_lock_stat, | |
- _Xfile_check_access, | |
- _Xfile_notice_changes, | |
- _Xfile_getcontrol, | |
- _Xfile_statfs, | |
- _Xfile_sync, | |
- _Xfile_syncfs, | |
- _Xfile_get_storage_info, | |
- _Xfile_getlinknode, | |
- _Xfile_getfh, | |
- _Xdir_lookup, | |
- _Xdir_readdir, | |
- _Xdir_mkdir, | |
- _Xdir_rmdir, | |
- _Xdir_unlink, | |
- _Xdir_link, | |
- _Xdir_rename, | |
- _Xdir_mkfile, | |
- _Xdir_notice_changes, | |
- _Xfile_set_translator, | |
- _Xfile_get_translator, | |
- _Xfile_get_translator_cntl, | |
- _Xfile_get_fs_options, | |
- _Xfile_reparent, | |
+ _Xfile_exec, /* 20000 */ | |
+ _Xfile_chown, /* 20001 */ | |
+ _Xfile_chauthor, /* 20002 */ | |
+ _Xfile_chmod, /* 20003 */ | |
+ _Xfile_chflags, /* 20004 */ | |
+ _Xfile_utimes, /* 20005 */ | |
+ _Xfile_set_size, /* 20006 */ | |
+ _Xfile_lock, /* 20007 */ | |
+ _Xfile_lock_stat, /* 20008 */ | |
+ _Xfile_check_access, /* 20009 */ | |
+ _Xfile_notice_changes, /* 20010 */ | |
+ _Xfile_getcontrol, /* 20011 */ | |
+ _Xfile_statfs, /* 20012 */ | |
+ _Xfile_sync, /* 20013 */ | |
+ _Xfile_syncfs, /* 20014 */ | |
+ _Xfile_get_storage_info, /* 20015 */ | |
+ _Xfile_getlinknode, /* 20016 */ | |
+ _Xfile_getfh, /* 20017 */ | |
+ _Xdir_lookup, /* 20018 */ | |
+ _Xdir_readdir, /* 20019 */ | |
+ _Xdir_mkdir, /* 20020 */ | |
+ _Xdir_rmdir, /* 20021 */ | |
+ _Xdir_unlink, /* 20022 */ | |
+ _Xdir_link, /* 20023 */ | |
+ _Xdir_rename, /* 20024 */ | |
+ _Xdir_mkfile, /* 20025 */ | |
+ _Xdir_notice_changes, /* 20026 */ | |
+ _Xfile_set_translator, /* 20027 */ | |
+ _Xfile_get_translator, /* 20028 */ | |
+ _Xfile_get_translator_cntl, /* 20029 */ | |
+ _Xfile_get_fs_options, /* 20030 */ | |
+ _Xfile_reparent, /* 20031 */ | |
0, | |
0, | |
- _Xfile_exec_paths, | |
- _Xfile_utimens, | |
- _Xfile_record_lock, | |
+ _Xfile_exec_paths, /* 20034 */ | |
+ _Xfile_utimens, /* 20035 */ | |
+ _Xfile_record_lock, /* 20036 */ | |
}; | |
mig_external boolean_t fs_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/sutils/default_pagerUser.c 2023-11-24 15:42:36.805152885 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/sutils/default_pagerUser.c 2023-11-18 23:19:18.169441318 -0500 | |
@@ -73,8 +73,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t memory_objectType; | |
- memory_object_t memory_object; | |
- char memory_objectPad[4]; | |
+ mach_port_name_inlined_t memory_object; | |
} Reply; | |
union { | |
@@ -116,7 +115,7 @@ | |
const mach_msg_type_t memory_objectCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -179,7 +178,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *memory_object = OutP->memory_object; | |
+ *memory_object = OutP->memory_object.name; | |
return KERN_SUCCESS; | |
} | |
@@ -324,7 +323,7 @@ | |
}; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
} Reply; | |
@@ -387,10 +386,10 @@ | |
InP->portsCntType = portsCntType; | |
- if (*portsCnt < 512) | |
+ if (*portsCnt < 256) | |
InP->portsCnt = *portsCnt; | |
else | |
- InP->portsCnt = 512; | |
+ InP->portsCnt = 256; | |
InP->Head.msgh_bits = | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -453,14 +452,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->objectsType.msgtl_header.msgt_inline) | |
- *objects = OutP->objectsP; | |
+ *objects = OutP->objectsP; | |
else if (OutP->objectsType.msgtl_number / 16 > *objectsCnt) { | |
- __mig_allocate((vm_offset_t *)objects, | |
- OutP->objectsType.msgtl_number); | |
- memcpy(*objects, OutP->objects, OutP->objectsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)objects, OutP->objectsType.msgtl_number); | |
+ memcpy(*objects, OutP->objects, OutP->objectsType.msgtl_number); | |
} | |
else if (OutP->objectsType.msgtl_number) { | |
- memcpy(*objects, OutP->objects, OutP->objectsType.msgtl_number); | |
+ memcpy(*objects, OutP->objects, OutP->objectsType.msgtl_number); | |
} | |
*objectsCnt = OutP->objectsType.msgtl_number / 16; | |
@@ -470,24 +468,34 @@ | |
#if TypeCheck | |
if (mig_unlikely ((OutP->portsType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->portsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->portsType.msgtl_size != 32))) | |
+ (OutP->portsType.msgtl_size != 64 && OutP->portsType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->portsType.msgtl_size != 32 && OutP->portsType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
#if TypeCheck | |
- if (mig_unlikely (msgh_size != 64 + ((OutP->portsType.msgtl_header.msgt_inline) ? (4 * OutP->portsType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *)))) | |
+ if (mig_unlikely (msgh_size != 64 + ((OutP->portsType.msgtl_header.msgt_inline) ? 8 * OutP->portsType.msgtl_number : sizeof(mach_port_t *)))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
if (!OutP->portsType.msgtl_header.msgt_inline) | |
- *ports = OutP->portsP; | |
+ *ports = OutP->portsP; | |
else if (OutP->portsType.msgtl_number > *portsCnt) { | |
- __mig_allocate((vm_offset_t *)ports, | |
- 4 * OutP->portsType.msgtl_number); | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
else if (OutP->portsType.msgtl_number) { | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
*portsCnt = OutP->portsType.msgtl_number; | |
@@ -507,8 +515,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_objectType; | |
- mach_port_t memory_object; | |
- char memory_objectPad[4]; | |
+ mach_port_name_inlined_t memory_object; | |
mach_msg_type_t pagesCntType; | |
mach_msg_type_number_t pagesCnt; | |
char pagesCntPad[4]; | |
@@ -544,14 +551,14 @@ | |
const mach_msg_type_t memory_objectType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t pagesCntType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -576,7 +583,7 @@ | |
InP->memory_objectType = memory_objectType; | |
- InP->memory_object = memory_object; | |
+ InP->memory_object.name = memory_object; | |
InP->pagesCntType = pagesCntType; | |
@@ -644,14 +651,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->pagesType.msgtl_header.msgt_inline) | |
- *pages = OutP->pagesP; | |
+ *pages = OutP->pagesP; | |
else if (OutP->pagesType.msgtl_number / 8 > *pagesCnt) { | |
- __mig_allocate((vm_offset_t *)pages, | |
- OutP->pagesType.msgtl_number); | |
- memcpy(*pages, OutP->pages, OutP->pagesType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)pages, OutP->pagesType.msgtl_number); | |
+ memcpy(*pages, OutP->pages, OutP->pagesType.msgtl_number); | |
} | |
else if (OutP->pagesType.msgtl_number) { | |
- memcpy(*pages, OutP->pages, OutP->pagesType.msgtl_number); | |
+ memcpy(*pages, OutP->pages, OutP->pagesType.msgtl_number); | |
} | |
*pagesCnt = OutP->pagesType.msgtl_number / 8; | |
@@ -881,14 +887,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->sizeType.msgtl_header.msgt_inline) | |
- *size = OutP->sizeP; | |
+ *size = OutP->sizeP; | |
else if (OutP->sizeType.msgtl_number > *sizeCnt) { | |
- __mig_allocate((vm_offset_t *)size, | |
- 8 * OutP->sizeType.msgtl_number); | |
- memcpy(*size, OutP->size, 8 * OutP->sizeType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)size, 8 * OutP->sizeType.msgtl_number); | |
+ memcpy(*size, OutP->size, 8 * OutP->sizeType.msgtl_number); | |
} | |
else if (OutP->sizeType.msgtl_number) { | |
- memcpy(*size, OutP->size, 8 * OutP->sizeType.msgtl_number); | |
+ memcpy(*size, OutP->size, 8 * OutP->sizeType.msgtl_number); | |
} | |
*sizeCnt = OutP->sizeType.msgtl_number; | |
@@ -910,14 +915,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->freeType.msgtl_header.msgt_inline) | |
- *free = OutP->freeP; | |
+ *free = OutP->freeP; | |
else if (OutP->freeType.msgtl_number > *freeCnt) { | |
- __mig_allocate((vm_offset_t *)free, | |
- 8 * OutP->freeType.msgtl_number); | |
- memcpy(*free, OutP->free, 8 * OutP->freeType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)free, 8 * OutP->freeType.msgtl_number); | |
+ memcpy(*free, OutP->free, 8 * OutP->freeType.msgtl_number); | |
} | |
else if (OutP->freeType.msgtl_number) { | |
- memcpy(*free, OutP->free, 8 * OutP->freeType.msgtl_number); | |
+ memcpy(*free, OutP->free, 8 * OutP->freeType.msgtl_number); | |
} | |
*freeCnt = OutP->freeType.msgtl_number; | |
@@ -937,14 +941,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->nameType.msgtl_header.msgt_inline) | |
- *name = OutP->nameP; | |
+ *name = OutP->nameP; | |
else if (OutP->nameType.msgtl_number > *nameCnt) { | |
- __mig_allocate((vm_offset_t *)name, | |
- OutP->nameType.msgtl_number); | |
- memcpy(*name, OutP->name, OutP->nameType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)name, OutP->nameType.msgtl_number); | |
+ memcpy(*name, OutP->name, OutP->nameType.msgtl_number); | |
} | |
else if (OutP->nameType.msgtl_number) { | |
- memcpy(*name, OutP->name, OutP->nameType.msgtl_number); | |
+ memcpy(*name, OutP->name, OutP->nameType.msgtl_number); | |
} | |
*nameCnt = OutP->nameType.msgtl_number; | |
@@ -966,8 +969,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t device_portType; | |
- mach_port_t device_port; | |
- char device_portPad[4]; | |
+ mach_port_name_inlined_t device_port; | |
mach_msg_type_long_t runsType; | |
union { | |
recnum_t runs[256]; | |
@@ -1001,14 +1003,14 @@ | |
const mach_msg_type_t device_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t runsType = { | |
.msgtl_header = { | |
@@ -1056,7 +1058,7 @@ | |
InP->device_portType = device_portType; | |
- InP->device_port = device_port; | |
+ InP->device_port.name = device_port; | |
InP->runsType = runsType; | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/fsys_replyUser.c 2023-11-24 15:42:39.921084269 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/fsys_replyUser.c 2023-11-22 01:44:13.581640052 -0500 | |
@@ -67,8 +67,7 @@ | |
kern_return_t return_code; | |
char return_codePad[4]; | |
mach_msg_type_t realnodeType; | |
- mach_port_t realnode; | |
- char realnodePad[4]; | |
+ mach_port_name_inlined_t realnode; | |
} Request; | |
union { | |
@@ -92,14 +91,14 @@ | |
const mach_msg_type_t realnodeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
if (MACH_MSG_TYPE_PORT_ANY(reply_portPoly)) | |
msgh_simple = FALSE; | |
@@ -110,7 +109,7 @@ | |
InP->realnodeType = realnodeType; | |
- InP->realnode = realnode; | |
+ InP->realnode.name = realnode; | |
if (MACH_MSG_TYPE_PORT_ANY(realnodePoly)) | |
msgh_simple = FALSE; | |
@@ -207,8 +206,7 @@ | |
mach_msg_type_t retry_nameType; | |
string_t retry_name; | |
mach_msg_type_t fileType; | |
- mach_port_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
} Request; | |
union { | |
@@ -254,14 +252,14 @@ | |
const mach_msg_type_t fileType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
if (MACH_MSG_TYPE_PORT_ANY(reply_portPoly)) | |
msgh_simple = FALSE; | |
@@ -280,7 +278,7 @@ | |
InP->fileType = fileType; | |
- InP->file = file; | |
+ InP->file.name = file; | |
if (MACH_MSG_TYPE_PORT_ANY(filePoly)) | |
msgh_simple = FALSE; | |
@@ -319,8 +317,7 @@ | |
kern_return_t return_code; | |
char return_codePad[4]; | |
mach_msg_type_t fileType; | |
- mach_port_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
} Request; | |
union { | |
@@ -344,14 +341,14 @@ | |
const mach_msg_type_t fileType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
if (MACH_MSG_TYPE_PORT_ANY(reply_portPoly)) | |
msgh_simple = FALSE; | |
@@ -362,7 +359,7 @@ | |
InP->fileType = fileType; | |
- InP->file = file; | |
+ InP->file.name = file; | |
if (MACH_MSG_TYPE_PORT_ANY(filePoly)) | |
msgh_simple = FALSE; | |
@@ -507,14 +504,11 @@ | |
kern_return_t return_code; | |
char return_codePad[4]; | |
mach_msg_type_t host_privType; | |
- mach_port_t host_priv; | |
- char host_privPad[4]; | |
+ mach_port_name_inlined_t host_priv; | |
mach_msg_type_t device_masterType; | |
- mach_port_t device_master; | |
- char device_masterPad[4]; | |
+ mach_port_name_inlined_t device_master; | |
mach_msg_type_t fstaskType; | |
- mach_port_t fstask; | |
- char fstaskPad[4]; | |
+ mach_port_name_inlined_t fstask; | |
} Request; | |
union { | |
@@ -538,36 +532,36 @@ | |
const mach_msg_type_t host_privType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t device_masterType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t fstaskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
if (MACH_MSG_TYPE_PORT_ANY(reply_port_Poly)) | |
msgh_simple = FALSE; | |
@@ -578,7 +572,7 @@ | |
InP->host_privType = host_privType; | |
- InP->host_priv = host_priv; | |
+ InP->host_priv.name = host_priv; | |
if (MACH_MSG_TYPE_PORT_ANY(host_privPoly)) | |
msgh_simple = FALSE; | |
@@ -587,7 +581,7 @@ | |
InP->device_masterType = device_masterType; | |
- InP->device_master = device_master; | |
+ InP->device_master.name = device_master; | |
if (MACH_MSG_TYPE_PORT_ANY(device_masterPoly)) | |
msgh_simple = FALSE; | |
@@ -596,7 +590,7 @@ | |
InP->fstaskType = fstaskType; | |
- InP->fstask = fstask; | |
+ InP->fstask.name = fstask; | |
if (MACH_MSG_TYPE_PORT_ANY(fstaskPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/exec_startupServer.c 2023-11-24 15:42:40.033081803 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/exec_startupServer.c 2023-11-22 01:44:13.485639090 -0500 | |
@@ -92,12 +92,12 @@ | |
}; | |
mach_msg_type_long_t dtableType; | |
union { | |
- mach_port_t dtable[512]; | |
+ mach_port_name_inlined_t dtable[256]; | |
mach_port_t *dtableP; | |
}; | |
mach_msg_type_long_t portarrayType; | |
union { | |
- mach_port_t portarray[512]; | |
+ mach_port_name_inlined_t portarray[256]; | |
mach_port_t *portarrayP; | |
}; | |
mach_msg_type_long_t intarrayType; | |
@@ -209,8 +209,8 @@ | |
const mach_msg_type_long_t dtableType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -221,8 +221,8 @@ | |
const mach_msg_type_long_t portarrayType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -246,10 +246,10 @@ | |
mach_msg_type_number_t argvCnt; | |
char envp[2048]; | |
mach_msg_type_number_t envpCnt; | |
- mach_port_t dtable[512]; | |
+ mach_port_t dtable[256]; | |
mach_msg_type_name_t dtablePoly; | |
mach_msg_type_number_t dtableCnt; | |
- mach_port_t portarray[512]; | |
+ mach_port_t portarray[256]; | |
mach_msg_type_name_t portarrayPoly; | |
mach_msg_type_number_t portarrayCnt; | |
int intarray[512]; | |
@@ -279,10 +279,10 @@ | |
envpCnt = 2048; | |
dtableP = dtable; | |
- dtableCnt = 512; | |
+ dtableCnt = 256; | |
portarrayP = portarray; | |
- portarrayCnt = 512; | |
+ portarrayCnt = 256; | |
intarrayP = intarray; | |
intarrayCnt = 512; | |
@@ -328,8 +328,9 @@ | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (envpCnt) | |
+ if (envpCnt) { | |
memcpy(OutP->envp, envp, envpCnt); | |
+ } | |
} | |
OutP->envpType.msgtl_number = envpCnt; | |
@@ -342,12 +343,20 @@ | |
if (dtableP != dtable) { | |
OutP->dtableType.msgtl_header.msgt_inline = FALSE; | |
OutP->dtableType.msgtl_header.msgt_deallocate = TRUE; | |
+ OutP->dtableType.msgtl_header.msgt_size = 32; | |
OutP->dtableP = dtableP; | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (dtableCnt) | |
- memcpy(OutP->dtable, dtable, 4 * dtableCnt); | |
+ if (dtableCnt) { | |
+ /* Copy array of mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_msg_type_number_t i; | |
+ for(i = 0; i < dtableCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ OutP->dtable[i].kernel_port_do_not_use = 0; | |
+ OutP->dtable[i].name = dtable[i]; | |
+ } | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(dtablePoly)) | |
@@ -356,7 +365,7 @@ | |
OutP->dtableType.msgtl_name = dtablePoly; | |
OutP->dtableType.msgtl_number = dtableCnt; | |
- msgh_size_delta = (OutP->dtableType.msgtl_header.msgt_inline) ? (4 * dtableCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (OutP->dtableType.msgtl_header.msgt_inline) ? 8 * dtableCnt : sizeof(mach_port_t *); | |
msgh_size += msgh_size_delta; | |
OutP = (Reply *) ((char *) OutP + msgh_size_delta - 2048); | |
@@ -365,12 +374,20 @@ | |
if (portarrayP != portarray) { | |
OutP->portarrayType.msgtl_header.msgt_inline = FALSE; | |
OutP->portarrayType.msgtl_header.msgt_deallocate = TRUE; | |
+ OutP->portarrayType.msgtl_header.msgt_size = 32; | |
OutP->portarrayP = portarrayP; | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (portarrayCnt) | |
- memcpy(OutP->portarray, portarray, 4 * portarrayCnt); | |
+ if (portarrayCnt) { | |
+ /* Copy array of mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_msg_type_number_t i; | |
+ for(i = 0; i < portarrayCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ OutP->portarray[i].kernel_port_do_not_use = 0; | |
+ OutP->portarray[i].name = portarray[i]; | |
+ } | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(portarrayPoly)) | |
@@ -379,7 +396,7 @@ | |
OutP->portarrayType.msgtl_name = portarrayPoly; | |
OutP->portarrayType.msgtl_number = portarrayCnt; | |
- msgh_size_delta = (OutP->portarrayType.msgtl_header.msgt_inline) ? (4 * portarrayCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (OutP->portarrayType.msgtl_header.msgt_inline) ? 8 * portarrayCnt : sizeof(mach_port_t *); | |
msgh_size += msgh_size_delta; | |
OutP = (Reply *) ((char *) OutP + msgh_size_delta - 2048); | |
@@ -392,8 +409,9 @@ | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (intarrayCnt) | |
+ if (intarrayCnt) { | |
memcpy(OutP->intarray, intarray, 4 * intarrayCnt); | |
+ } | |
} | |
OutP->intarrayType.msgtl_number = intarrayCnt; | |
@@ -433,7 +451,7 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t diskfs_exec_startup_server_routines[] = { | |
- _Xexec_startup_get_info, | |
+ _Xexec_startup_get_info, /* 30500 */ | |
}; | |
mig_external boolean_t diskfs_exec_startup_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/ifsockServer.c 2023-11-24 15:42:39.893084885 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/ifsockServer.c 2023-11-22 01:44:13.577640013 -0500 | |
@@ -68,8 +68,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t sockaddrType; | |
- mach_port_t sockaddr; | |
- char sockaddrPad[4]; | |
+ mach_port_name_inlined_t sockaddr; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -79,14 +78,14 @@ | |
const mach_msg_type_t sockaddrType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
protid_t file; | |
@@ -101,7 +100,7 @@ | |
else | |
file = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_ifsock_getsockaddr(file, &OutP->sockaddr); | |
+ OutP->RetCode = diskfs_S_ifsock_getsockaddr(file, &OutP->sockaddr.name); | |
diskfs_end_using_protid_port(file); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -123,7 +122,7 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t diskfs_ifsock_server_routines[] = { | |
- _Xifsock_getsockaddr, | |
+ _Xifsock_getsockaddr, /* 34000 */ | |
}; | |
mig_external boolean_t diskfs_ifsock_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/ioServer.c 2023-11-24 15:42:39.813086647 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/ioServer.c 2023-11-22 01:44:13.581640052 -0500 | |
@@ -736,8 +736,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t notify_portType; | |
- mach_port_t notify_port; | |
- char notify_portPad[4]; | |
+ mach_port_name_inlined_t notify_port; | |
} Request; | |
typedef struct { | |
@@ -746,8 +745,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t async_id_portType; | |
- mach_port_t async_id_port; | |
- char async_id_portPad[4]; | |
+ mach_port_name_inlined_t async_id_port; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -758,7 +756,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t notify_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -768,14 +766,14 @@ | |
const mach_msg_type_t async_id_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
protid_t io_object; | |
mach_msg_type_name_t async_id_portPoly; | |
@@ -796,7 +794,7 @@ | |
else | |
io_object = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_io_async(io_object, In0P->notify_port, &OutP->async_id_port, &async_id_portPoly); | |
+ OutP->RetCode = diskfs_S_io_async(io_object, In0P->notify_port.name, &OutP->async_id_port.name, &async_id_portPoly); | |
diskfs_end_using_protid_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -973,8 +971,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t icky_async_id_portType; | |
- mach_port_t icky_async_id_port; | |
- char icky_async_id_portPad[4]; | |
+ mach_port_name_inlined_t icky_async_id_port; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -985,14 +982,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t icky_async_id_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
protid_t io_object; | |
mach_msg_type_name_t icky_async_id_portPoly; | |
@@ -1008,7 +1005,7 @@ | |
else | |
io_object = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_io_get_icky_async_id(io_object, &OutP->icky_async_id_port, &icky_async_id_portPoly); | |
+ OutP->RetCode = diskfs_S_io_get_icky_async_id(io_object, &OutP->icky_async_id_port.name, &icky_async_id_portPoly); | |
diskfs_end_using_protid_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1198,8 +1195,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t rendezvous2Type; | |
- mach_port_t rendezvous2; | |
- char rendezvous2Pad[4]; | |
+ mach_port_name_inlined_t rendezvous2; | |
} Request; | |
typedef struct { | |
@@ -1216,7 +1212,7 @@ | |
const mach_msg_type_t rendezvous2Check = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1242,7 +1238,7 @@ | |
else | |
auth_object = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_io_reauthenticate(auth_object, In0P->rendezvous2); | |
+ OutP->RetCode = diskfs_S_io_reauthenticate(auth_object, In0P->rendezvous2.name); | |
diskfs_end_using_protid_port(auth_object); | |
} | |
@@ -1280,8 +1276,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t new_objectType; | |
- mach_port_t new_object; | |
- char new_objectPad[4]; | |
+ mach_port_name_inlined_t new_object; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1296,14 +1291,14 @@ | |
const mach_msg_type_t new_objectType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
protid_t io_object; | |
mach_msg_type_name_t new_objectPoly; | |
@@ -1348,7 +1343,7 @@ | |
else | |
io_object = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_io_restrict_auth(io_object, &OutP->new_object, &new_objectPoly, (In0P->uidsType.msgtl_header.msgt_inline) ? In0P->uids : In0P->uidsP, In0P->uidsType.msgtl_number, (In1P->gidsType.msgtl_header.msgt_inline) ? In1P->gids : In1P->gidsP, In1P->gidsType.msgtl_number); | |
+ OutP->RetCode = diskfs_S_io_restrict_auth(io_object, &OutP->new_object.name, &new_objectPoly, (In0P->uidsType.msgtl_header.msgt_inline) ? In0P->uids : In0P->uidsP, In0P->uidsType.msgtl_number, (In1P->gidsType.msgtl_header.msgt_inline) ? In1P->gids : In1P->gidsP, In1P->gidsType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In1P->gidsType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In1P->gidsP, 4 * In1P->gidsType.msgtl_number); | |
@@ -1402,8 +1397,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t newportType; | |
- mach_port_t newport; | |
- char newportPad[4]; | |
+ mach_port_name_inlined_t newport; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1414,14 +1408,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t newportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
protid_t io_object; | |
mach_msg_type_name_t newportPoly; | |
@@ -1437,7 +1431,7 @@ | |
else | |
io_object = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_io_duplicate(io_object, &OutP->newport, &newportPoly); | |
+ OutP->RetCode = diskfs_S_io_duplicate(io_object, &OutP->newport.name, &newportPoly); | |
diskfs_end_using_protid_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1598,11 +1592,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t memobjrdType; | |
- mach_port_t memobjrd; | |
- char memobjrdPad[4]; | |
+ mach_port_name_inlined_t memobjrd; | |
mach_msg_type_t memobjwtType; | |
- mach_port_t memobjwt; | |
- char memobjwtPad[4]; | |
+ mach_port_name_inlined_t memobjwt; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1613,25 +1605,25 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t memobjrdType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t memobjwtType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
protid_t io_object; | |
mach_msg_type_name_t memobjrdPoly; | |
@@ -1648,7 +1640,7 @@ | |
else | |
io_object = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_io_map(io_object, &OutP->memobjrd, &memobjrdPoly, &OutP->memobjwt, &memobjwtPoly); | |
+ OutP->RetCode = diskfs_S_io_map(io_object, &OutP->memobjrd.name, &memobjrdPoly, &OutP->memobjwt.name, &memobjwtPoly); | |
diskfs_end_using_protid_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1701,8 +1693,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t memobjType; | |
- mach_port_t memobj; | |
- char memobjPad[4]; | |
+ mach_port_name_inlined_t memobj; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1713,14 +1704,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t memobjType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
protid_t io_object; | |
mach_msg_type_name_t memobjPoly; | |
@@ -1736,7 +1727,7 @@ | |
else | |
io_object = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_io_map_cntl(io_object, &OutP->memobj, &memobjPoly); | |
+ OutP->RetCode = diskfs_S_io_map_cntl(io_object, &OutP->memobj.name, &memobjPoly); | |
diskfs_end_using_protid_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2306,11 +2297,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t idportType; | |
- mach_port_t idport; | |
- char idportPad[4]; | |
+ mach_port_name_inlined_t idport; | |
mach_msg_type_t fsidportType; | |
- mach_port_t fsidport; | |
- char fsidportPad[4]; | |
+ mach_port_name_inlined_t fsidport; | |
mach_msg_type_t filenoType; | |
ino64_t fileno; | |
} Reply; | |
@@ -2323,25 +2312,25 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t idportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t fsidportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t filenoType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -2369,7 +2358,7 @@ | |
else | |
io_object = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_io_identity(io_object, &OutP->idport, &idportPoly, &OutP->fsidport, &fsidportPoly, &OutP->fileno); | |
+ OutP->RetCode = diskfs_S_io_identity(io_object, &OutP->idport.name, &idportPoly, &OutP->fsidport.name, &fsidportPoly, &OutP->fileno); | |
diskfs_end_using_protid_port(io_object); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2563,38 +2552,38 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t diskfs_io_server_routines[] = { | |
- _Xio_write, | |
- _Xio_read, | |
- _Xio_seek, | |
- _Xio_readable, | |
- _Xio_set_all_openmodes, | |
- _Xio_get_openmodes, | |
- _Xio_set_some_openmodes, | |
- _Xio_clear_some_openmodes, | |
- _Xio_async, | |
- _Xio_mod_owner, | |
- _Xio_get_owner, | |
- _Xio_get_icky_async_id, | |
- _Xio_select, | |
- _Xio_stat, | |
- _Xio_reauthenticate, | |
- _Xio_restrict_auth, | |
- _Xio_duplicate, | |
- _Xio_server_version, | |
- _Xio_map, | |
- _Xio_map_cntl, | |
- _Xio_get_conch, | |
- _Xio_release_conch, | |
- _Xio_eofnotify, | |
- _Xio_prenotify, | |
- _Xio_postnotify, | |
- _Xio_readnotify, | |
- _Xio_readsleep, | |
- _Xio_sigio, | |
- _Xio_pathconf, | |
- _Xio_identity, | |
- _Xio_revoke, | |
- _Xio_select_timeout, | |
+ _Xio_write, /* 21000 */ | |
+ _Xio_read, /* 21001 */ | |
+ _Xio_seek, /* 21002 */ | |
+ _Xio_readable, /* 21003 */ | |
+ _Xio_set_all_openmodes, /* 21004 */ | |
+ _Xio_get_openmodes, /* 21005 */ | |
+ _Xio_set_some_openmodes, /* 21006 */ | |
+ _Xio_clear_some_openmodes, /* 21007 */ | |
+ _Xio_async, /* 21008 */ | |
+ _Xio_mod_owner, /* 21009 */ | |
+ _Xio_get_owner, /* 21010 */ | |
+ _Xio_get_icky_async_id, /* 21011 */ | |
+ _Xio_select, /* 21012 */ | |
+ _Xio_stat, /* 21013 */ | |
+ _Xio_reauthenticate, /* 21014 */ | |
+ _Xio_restrict_auth, /* 21015 */ | |
+ _Xio_duplicate, /* 21016 */ | |
+ _Xio_server_version, /* 21017 */ | |
+ _Xio_map, /* 21018 */ | |
+ _Xio_map_cntl, /* 21019 */ | |
+ _Xio_get_conch, /* 21020 */ | |
+ _Xio_release_conch, /* 21021 */ | |
+ _Xio_eofnotify, /* 21022 */ | |
+ _Xio_prenotify, /* 21023 */ | |
+ _Xio_postnotify, /* 21024 */ | |
+ _Xio_readnotify, /* 21025 */ | |
+ _Xio_readsleep, /* 21026 */ | |
+ _Xio_sigio, /* 21027 */ | |
+ _Xio_pathconf, /* 21028 */ | |
+ _Xio_identity, /* 21029 */ | |
+ _Xio_revoke, /* 21030 */ | |
+ _Xio_select_timeout, /* 21031 */ | |
}; | |
mig_external boolean_t diskfs_io_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/execServer.c 2023-11-24 15:42:39.989082772 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/execServer.c 2023-11-18 23:19:20.701457853 -0500 | |
@@ -60,11 +60,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t fileType; | |
- mach_port_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
mach_msg_type_t oldtaskType; | |
- mach_port_t oldtask; | |
- char oldtaskPad[4]; | |
+ mach_port_name_inlined_t oldtask; | |
mach_msg_type_t flagsType; | |
int flags; | |
char flagsPad[4]; | |
@@ -80,12 +78,12 @@ | |
}; | |
mach_msg_type_long_t dtableType; | |
union { | |
- mach_port_t dtable[512]; | |
+ mach_port_name_inlined_t dtable[256]; | |
mach_port_t *dtableP; | |
}; | |
mach_msg_type_long_t portarrayType; | |
union { | |
- mach_port_t portarray[512]; | |
+ mach_port_name_inlined_t portarray[256]; | |
mach_port_t *portarrayP; | |
}; | |
mach_msg_type_long_t intarrayType; | |
@@ -128,7 +126,7 @@ | |
const mach_msg_type_t fileCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -138,7 +136,7 @@ | |
const mach_msg_type_t oldtaskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -158,6 +156,9 @@ | |
file_t execserver; | |
+ mach_port_t *dtableP; | |
+ mach_port_t *portarrayP; | |
+ | |
#if TypeCheck | |
msgh_size = In0P->Head.msgh_size; | |
if (mig_unlikely ((msgh_size < 136) || | |
@@ -215,11 +216,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In2P->dtableType.msgtl_header.msgt_longform != TRUE) || | |
(In2P->dtableType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In2P->dtableType.msgtl_size != 32))) | |
+ (In2P->dtableType.msgtl_size != 64 && In2P->dtableType.msgtl_header.msgt_inline == TRUE) || | |
+ (In2P->dtableType.msgtl_size != 32 && In2P->dtableType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In2P->dtableType.msgtl_header.msgt_inline) ? (4 * In2P->dtableType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In2P->dtableType.msgtl_header.msgt_inline) ? 8 * In2P->dtableType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 136 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -231,11 +233,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In3P->portarrayType.msgtl_header.msgt_longform != TRUE) || | |
(In3P->portarrayType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In3P->portarrayType.msgtl_size != 32))) | |
+ (In3P->portarrayType.msgtl_size != 64 && In3P->portarrayType.msgtl_header.msgt_inline == TRUE) || | |
+ (In3P->portarrayType.msgtl_size != 32 && In3P->portarrayType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In3P->portarrayType.msgtl_header.msgt_inline) ? (4 * In3P->portarrayType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In3P->portarrayType.msgtl_header.msgt_inline) ? 8 * In3P->portarrayType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 136 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -292,7 +295,27 @@ | |
execserver = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
execserver = In0P->Head.msgh_request_port; | |
- OutP->RetCode = diskfs_S_exec_exec(execserver, In0P->file, In0P->oldtask, In0P->flags, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number, (In1P->envpType.msgtl_header.msgt_inline) ? In1P->envp : In1P->envpP, In1P->envpType.msgtl_number, (In2P->dtableType.msgtl_header.msgt_inline) ? In2P->dtable : In2P->dtableP, In2P->dtableType.msgtl_number, (In3P->portarrayType.msgtl_header.msgt_inline) ? In3P->portarray : In3P->portarrayP, In3P->portarrayType.msgtl_number, (In4P->intarrayType.msgtl_header.msgt_inline) ? In4P->intarray : In4P->intarrayP, In4P->intarrayType.msgtl_number, (In5P->deallocnamesType.msgtl_header.msgt_inline) ? In5P->deallocnames : In5P->deallocnamesP, In5P->deallocnamesType.msgtl_number, (In6P->destroynamesType.msgtl_header.msgt_inline) ? In6P->destroynames : In6P->destroynamesP, In6P->destroynamesType.msgtl_number); | |
+ if (In2P->dtableType.msgtl_header.msgt_inline) { | |
+ dtableP = (mach_port_t *)In2P->dtable; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In2P->dtableType.msgtl_number; i++) { | |
+ dtableP[i] = In2P->dtable[i].name; | |
+ } | |
+ } else { | |
+ dtableP = In2P->dtableP; | |
+ } | |
+ if (In3P->portarrayType.msgtl_header.msgt_inline) { | |
+ portarrayP = (mach_port_t *)In3P->portarray; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In3P->portarrayType.msgtl_number; i++) { | |
+ portarrayP[i] = In3P->portarray[i].name; | |
+ } | |
+ } else { | |
+ portarrayP = In3P->portarrayP; | |
+ } | |
+ OutP->RetCode = diskfs_S_exec_exec(execserver, In0P->file.name, In0P->oldtask.name, In0P->flags, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number, (In1P->envpType.msgtl_header.msgt_inline) ? In1P->envp : In1P->envpP, In1P->envpType.msgtl_number, dtableP, In2P->dtableType.msgtl_number, portarrayP, In3P->portarrayType.msgtl_number, (In4P->intarrayType.msgtl_header.msgt_inline) ? In4P->intarray : In4P->intarrayP, In4P->intarrayType.msgtl_number, (In5P->deallocnamesType.msgtl_header.msgt_inline) ? In5P->deallocnames : In5P->deallocnamesP, In5P->deallocnamesType.msgtl_number, (In6P->destroynamesType.msgtl_header.msgt_inline) ? In6P->destroynames : In6P->destroynamesP, In6P->destroynamesType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In6P->destroynamesType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In6P->destroynamesP, 4 * In6P->destroynamesType.msgtl_number); | |
@@ -349,11 +372,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t auth_handleType; | |
- auth_t auth_handle; | |
- char auth_handlePad[4]; | |
+ mach_port_name_inlined_t auth_handle; | |
mach_msg_type_t proc_serverType; | |
- mach_port_t proc_server; | |
- char proc_serverPad[4]; | |
+ mach_port_name_inlined_t proc_server; | |
} Request; | |
typedef struct { | |
@@ -370,7 +391,7 @@ | |
const mach_msg_type_t auth_handleCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -380,7 +401,7 @@ | |
const mach_msg_type_t proc_serverCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -411,9 +432,9 @@ | |
execserver = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
execserver = In0P->Head.msgh_request_port; | |
- auth_handle = In0P->auth_handle; | |
+ auth_handle = In0P->auth_handle.name; | |
- OutP->RetCode = diskfs_S_exec_init(execserver, auth_handle, In0P->proc_server); | |
+ OutP->RetCode = diskfs_S_exec_init(execserver, auth_handle, In0P->proc_server.name); | |
} | |
/* Default implementation of diskfs_S_exec_init */ | |
@@ -435,7 +456,7 @@ | |
mach_msg_header_t Head; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t intsType; | |
@@ -463,6 +484,8 @@ | |
file_t execserver; | |
+ mach_port_t *portsP; | |
+ | |
#if TypeCheck | |
msgh_size = In0P->Head.msgh_size; | |
if (mig_unlikely ((msgh_size < 48) || | |
@@ -473,11 +496,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In0P->portsType.msgtl_header.msgt_longform != TRUE) || | |
(In0P->portsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In0P->portsType.msgtl_size != 32))) | |
+ (In0P->portsType.msgtl_size != 64 && In0P->portsType.msgtl_header.msgt_inline == TRUE) || | |
+ (In0P->portsType.msgtl_size != 32 && In0P->portsType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In0P->portsType.msgtl_header.msgt_inline) ? (4 * In0P->portsType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In0P->portsType.msgtl_header.msgt_inline) ? 8 * In0P->portsType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 48 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -502,7 +526,17 @@ | |
execserver = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
execserver = In0P->Head.msgh_request_port; | |
- OutP->RetCode = diskfs_S_exec_setexecdata(execserver, (In0P->portsType.msgtl_header.msgt_inline) ? In0P->ports : In0P->portsP, In0P->portsType.msgtl_number, (In1P->intsType.msgtl_header.msgt_inline) ? In1P->ints : In1P->intsP, In1P->intsType.msgtl_number); | |
+ if (In0P->portsType.msgtl_header.msgt_inline) { | |
+ portsP = (mach_port_t *)In0P->ports; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In0P->portsType.msgtl_number; i++) { | |
+ portsP[i] = In0P->ports[i].name; | |
+ } | |
+ } else { | |
+ portsP = In0P->portsP; | |
+ } | |
+ OutP->RetCode = diskfs_S_exec_setexecdata(execserver, portsP, In0P->portsType.msgtl_number, (In1P->intsType.msgtl_header.msgt_inline) ? In1P->ints : In1P->intsP, In1P->intsType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In1P->intsType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In1P->intsP, 4 * In1P->intsType.msgtl_number); | |
@@ -531,11 +565,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t fileType; | |
- mach_port_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
mach_msg_type_t oldtaskType; | |
- mach_port_t oldtask; | |
- char oldtaskPad[4]; | |
+ mach_port_name_inlined_t oldtask; | |
mach_msg_type_t flagsType; | |
int flags; | |
char flagsPad[4]; | |
@@ -555,12 +587,12 @@ | |
}; | |
mach_msg_type_long_t dtableType; | |
union { | |
- mach_port_t dtable[512]; | |
+ mach_port_name_inlined_t dtable[256]; | |
mach_port_t *dtableP; | |
}; | |
mach_msg_type_long_t portarrayType; | |
union { | |
- mach_port_t portarray[512]; | |
+ mach_port_name_inlined_t portarray[256]; | |
mach_port_t *portarrayP; | |
}; | |
mach_msg_type_long_t intarrayType; | |
@@ -603,7 +635,7 @@ | |
const mach_msg_type_t fileCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -613,7 +645,7 @@ | |
const mach_msg_type_t oldtaskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -653,6 +685,9 @@ | |
file_t execserver; | |
+ mach_port_t *dtableP; | |
+ mach_port_t *portarrayP; | |
+ | |
#if TypeCheck | |
msgh_size = In0P->Head.msgh_size; | |
if (mig_unlikely ((msgh_size < 2200) || | |
@@ -720,11 +755,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In2P->dtableType.msgtl_header.msgt_longform != TRUE) || | |
(In2P->dtableType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In2P->dtableType.msgtl_size != 32))) | |
+ (In2P->dtableType.msgtl_size != 64 && In2P->dtableType.msgtl_header.msgt_inline == TRUE) || | |
+ (In2P->dtableType.msgtl_size != 32 && In2P->dtableType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In2P->dtableType.msgtl_header.msgt_inline) ? (4 * In2P->dtableType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In2P->dtableType.msgtl_header.msgt_inline) ? 8 * In2P->dtableType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 2200 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -736,11 +772,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In3P->portarrayType.msgtl_header.msgt_longform != TRUE) || | |
(In3P->portarrayType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In3P->portarrayType.msgtl_size != 32))) | |
+ (In3P->portarrayType.msgtl_size != 64 && In3P->portarrayType.msgtl_header.msgt_inline == TRUE) || | |
+ (In3P->portarrayType.msgtl_size != 32 && In3P->portarrayType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In3P->portarrayType.msgtl_header.msgt_inline) ? (4 * In3P->portarrayType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In3P->portarrayType.msgtl_header.msgt_inline) ? 8 * In3P->portarrayType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 2200 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -797,7 +834,27 @@ | |
execserver = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
execserver = In0P->Head.msgh_request_port; | |
- OutP->RetCode = diskfs_S_exec_exec_paths(execserver, In0P->file, In0P->oldtask, In0P->flags, In0P->path, In0P->abspath, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number, (In1P->envpType.msgtl_header.msgt_inline) ? In1P->envp : In1P->envpP, In1P->envpType.msgtl_number, (In2P->dtableType.msgtl_header.msgt_inline) ? In2P->dtable : In2P->dtableP, In2P->dtableType.msgtl_number, (In3P->portarrayType.msgtl_header.msgt_inline) ? In3P->portarray : In3P->portarrayP, In3P->portarrayType.msgtl_number, (In4P->intarrayType.msgtl_header.msgt_inline) ? In4P->intarray : In4P->intarrayP, In4P->intarrayType.msgtl_number, (In5P->deallocnamesType.msgtl_header.msgt_inline) ? In5P->deallocnames : In5P->deallocnamesP, In5P->deallocnamesType.msgtl_number, (In6P->destroynamesType.msgtl_header.msgt_inline) ? In6P->destroynames : In6P->destroynamesP, In6P->destroynamesType.msgtl_number); | |
+ if (In2P->dtableType.msgtl_header.msgt_inline) { | |
+ dtableP = (mach_port_t *)In2P->dtable; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In2P->dtableType.msgtl_number; i++) { | |
+ dtableP[i] = In2P->dtable[i].name; | |
+ } | |
+ } else { | |
+ dtableP = In2P->dtableP; | |
+ } | |
+ if (In3P->portarrayType.msgtl_header.msgt_inline) { | |
+ portarrayP = (mach_port_t *)In3P->portarray; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In3P->portarrayType.msgtl_number; i++) { | |
+ portarrayP[i] = In3P->portarray[i].name; | |
+ } | |
+ } else { | |
+ portarrayP = In3P->portarrayP; | |
+ } | |
+ OutP->RetCode = diskfs_S_exec_exec_paths(execserver, In0P->file.name, In0P->oldtask.name, In0P->flags, In0P->path, In0P->abspath, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number, (In1P->envpType.msgtl_header.msgt_inline) ? In1P->envp : In1P->envpP, In1P->envpType.msgtl_number, dtableP, In2P->dtableType.msgtl_number, portarrayP, In3P->portarrayType.msgtl_number, (In4P->intarrayType.msgtl_header.msgt_inline) ? In4P->intarray : In4P->intarrayP, In4P->intarrayType.msgtl_number, (In5P->deallocnamesType.msgtl_header.msgt_inline) ? In5P->deallocnames : In5P->deallocnamesP, In5P->deallocnamesType.msgtl_number, (In6P->destroynamesType.msgtl_header.msgt_inline) ? In6P->destroynames : In6P->destroynamesP, In6P->destroynamesType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In6P->destroynamesType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In6P->destroynamesP, 4 * In6P->destroynamesType.msgtl_number); | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/startupServer.c 2023-11-24 15:42:39.869085414 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/startupServer.c 2023-11-18 23:19:20.701457853 -0500 | |
@@ -60,16 +60,13 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t excptType; | |
- mach_port_t excpt; | |
- char excptPad[4]; | |
+ mach_port_name_inlined_t excpt; | |
mach_msg_type_t nameType; | |
string_t name; | |
mach_msg_type_t credentialType; | |
- mach_port_t credential; | |
- char credentialPad[4]; | |
+ mach_port_name_inlined_t credential; | |
} Request; | |
typedef struct { | |
@@ -86,7 +83,7 @@ | |
const mach_msg_type_t taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -96,7 +93,7 @@ | |
const mach_msg_type_t excptCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_RECEIVE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -116,7 +113,7 @@ | |
const mach_msg_type_t credentialCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -159,7 +156,7 @@ | |
server = In0P->Head.msgh_request_port; | |
reply_port = In0P->Head.msgh_reply_port; | |
- OutP->RetCode = diskfs_S_startup_essential_task(server, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->task, In0P->excpt, In0P->name, In0P->credential); | |
+ OutP->RetCode = diskfs_S_startup_essential_task(server, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->task.name, In0P->excpt.name, In0P->name, In0P->credential.name); | |
} | |
/* Default implementation of diskfs_S_startup_essential_task */ | |
@@ -184,8 +181,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t notify_portType; | |
- mach_port_t notify_port; | |
- char notify_portPad[4]; | |
+ mach_port_name_inlined_t notify_port; | |
mach_msg_type_t nameType; | |
string_t name; | |
} Request; | |
@@ -204,7 +200,7 @@ | |
const mach_msg_type_t notify_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -244,7 +240,7 @@ | |
server = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
server = In0P->Head.msgh_request_port; | |
- OutP->RetCode = diskfs_S_startup_request_notification(server, In0P->notify_port, In0P->name); | |
+ OutP->RetCode = diskfs_S_startup_request_notification(server, In0P->notify_port.name, In0P->name); | |
} | |
/* Default implementation of diskfs_S_startup_request_notification */ | |
@@ -265,8 +261,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t reboot_codeType; | |
int reboot_code; | |
char reboot_codePad[4]; | |
@@ -286,7 +281,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -327,7 +322,7 @@ | |
server = ports_payload_get_name(In0P->Head.msgh_protected_payload); | |
else | |
server = In0P->Head.msgh_request_port; | |
- refport = In0P->refport; | |
+ refport = In0P->refport.name; | |
OutP->RetCode = diskfs_S_startup_reboot(server, refport, In0P->reboot_code); | |
} | |
@@ -350,8 +345,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t startup_procType; | |
- process_t startup_proc; | |
- char startup_procPad[4]; | |
+ mach_port_name_inlined_t startup_proc; | |
} Request; | |
typedef struct { | |
@@ -360,17 +354,13 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t startup_taskType; | |
- mach_port_t startup_task; | |
- char startup_taskPad[4]; | |
+ mach_port_name_inlined_t startup_task; | |
mach_msg_type_t authType; | |
- auth_t auth; | |
- char authPad[4]; | |
+ mach_port_name_inlined_t auth; | |
mach_msg_type_t host_privType; | |
- mach_port_t host_priv; | |
- char host_privPad[4]; | |
+ mach_port_name_inlined_t host_priv; | |
mach_msg_type_t device_masterType; | |
- mach_port_t device_master; | |
- char device_masterPad[4]; | |
+ mach_port_name_inlined_t device_master; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -380,7 +370,7 @@ | |
const mach_msg_type_t startup_procCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -390,47 +380,47 @@ | |
const mach_msg_type_t startup_taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t authType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(auth_t) == 4 * 1, "expected auth_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t host_privType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t device_masterType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
startup_t server; | |
mach_port_t reply_port; | |
@@ -456,9 +446,9 @@ | |
server = In0P->Head.msgh_request_port; | |
reply_port = In0P->Head.msgh_reply_port; | |
- startup_proc = In0P->startup_proc; | |
+ startup_proc = In0P->startup_proc.name; | |
- OutP->RetCode = diskfs_S_startup_procinit(server, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), startup_proc, &OutP->startup_task, &auth, &OutP->host_priv, &host_privPoly, &OutP->device_master, &device_masterPoly); | |
+ OutP->RetCode = diskfs_S_startup_procinit(server, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), startup_proc, &OutP->startup_task.name, &auth, &OutP->host_priv.name, &host_privPoly, &OutP->device_master.name, &device_masterPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -469,7 +459,7 @@ | |
OutP->authType = authType; | |
- OutP->auth = auth; | |
+ OutP->auth.name = auth; | |
OutP->host_privType = host_privType; | |
@@ -505,8 +495,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t authType; | |
- mach_port_t auth; | |
- char authPad[4]; | |
+ mach_port_name_inlined_t auth; | |
} Request; | |
typedef struct { | |
@@ -515,8 +504,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t procType; | |
- mach_port_t proc; | |
- char procPad[4]; | |
+ mach_port_name_inlined_t proc; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -527,7 +515,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t authCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -537,14 +525,14 @@ | |
const mach_msg_type_t procType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
startup_t server; | |
mach_port_t reply_port; | |
@@ -567,7 +555,7 @@ | |
server = In0P->Head.msgh_request_port; | |
reply_port = In0P->Head.msgh_reply_port; | |
- OutP->RetCode = diskfs_S_startup_authinit(server, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->auth, &OutP->proc, &procPoly); | |
+ OutP->RetCode = diskfs_S_startup_authinit(server, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->auth.name, &OutP->proc.name, &procPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/default_pagerUser.c 2023-11-24 15:42:39.845085943 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/default_pagerUser.c 2023-11-18 23:19:20.701457853 -0500 | |
@@ -73,8 +73,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t memory_objectType; | |
- memory_object_t memory_object; | |
- char memory_objectPad[4]; | |
+ mach_port_name_inlined_t memory_object; | |
} Reply; | |
union { | |
@@ -116,7 +115,7 @@ | |
const mach_msg_type_t memory_objectCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -179,7 +178,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *memory_object = OutP->memory_object; | |
+ *memory_object = OutP->memory_object.name; | |
return KERN_SUCCESS; | |
} | |
@@ -324,7 +323,7 @@ | |
}; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
} Reply; | |
@@ -387,10 +386,10 @@ | |
InP->portsCntType = portsCntType; | |
- if (*portsCnt < 512) | |
+ if (*portsCnt < 256) | |
InP->portsCnt = *portsCnt; | |
else | |
- InP->portsCnt = 512; | |
+ InP->portsCnt = 256; | |
InP->Head.msgh_bits = | |
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); | |
@@ -453,14 +452,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->objectsType.msgtl_header.msgt_inline) | |
- *objects = OutP->objectsP; | |
+ *objects = OutP->objectsP; | |
else if (OutP->objectsType.msgtl_number / 16 > *objectsCnt) { | |
- __mig_allocate((vm_offset_t *)objects, | |
- OutP->objectsType.msgtl_number); | |
- memcpy(*objects, OutP->objects, OutP->objectsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)objects, OutP->objectsType.msgtl_number); | |
+ memcpy(*objects, OutP->objects, OutP->objectsType.msgtl_number); | |
} | |
else if (OutP->objectsType.msgtl_number) { | |
- memcpy(*objects, OutP->objects, OutP->objectsType.msgtl_number); | |
+ memcpy(*objects, OutP->objects, OutP->objectsType.msgtl_number); | |
} | |
*objectsCnt = OutP->objectsType.msgtl_number / 16; | |
@@ -470,24 +468,34 @@ | |
#if TypeCheck | |
if (mig_unlikely ((OutP->portsType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->portsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->portsType.msgtl_size != 32))) | |
+ (OutP->portsType.msgtl_size != 64 && OutP->portsType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->portsType.msgtl_size != 32 && OutP->portsType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
#if TypeCheck | |
- if (mig_unlikely (msgh_size != 64 + ((OutP->portsType.msgtl_header.msgt_inline) ? (4 * OutP->portsType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *)))) | |
+ if (mig_unlikely (msgh_size != 64 + ((OutP->portsType.msgtl_header.msgt_inline) ? 8 * OutP->portsType.msgtl_number : sizeof(mach_port_t *)))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
if (!OutP->portsType.msgtl_header.msgt_inline) | |
- *ports = OutP->portsP; | |
+ *ports = OutP->portsP; | |
else if (OutP->portsType.msgtl_number > *portsCnt) { | |
- __mig_allocate((vm_offset_t *)ports, | |
- 4 * OutP->portsType.msgtl_number); | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
else if (OutP->portsType.msgtl_number) { | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
*portsCnt = OutP->portsType.msgtl_number; | |
@@ -507,8 +515,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t memory_objectType; | |
- mach_port_t memory_object; | |
- char memory_objectPad[4]; | |
+ mach_port_name_inlined_t memory_object; | |
mach_msg_type_t pagesCntType; | |
mach_msg_type_number_t pagesCnt; | |
char pagesCntPad[4]; | |
@@ -544,14 +551,14 @@ | |
const mach_msg_type_t memory_objectType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t pagesCntType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -576,7 +583,7 @@ | |
InP->memory_objectType = memory_objectType; | |
- InP->memory_object = memory_object; | |
+ InP->memory_object.name = memory_object; | |
InP->pagesCntType = pagesCntType; | |
@@ -644,14 +651,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->pagesType.msgtl_header.msgt_inline) | |
- *pages = OutP->pagesP; | |
+ *pages = OutP->pagesP; | |
else if (OutP->pagesType.msgtl_number / 8 > *pagesCnt) { | |
- __mig_allocate((vm_offset_t *)pages, | |
- OutP->pagesType.msgtl_number); | |
- memcpy(*pages, OutP->pages, OutP->pagesType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)pages, OutP->pagesType.msgtl_number); | |
+ memcpy(*pages, OutP->pages, OutP->pagesType.msgtl_number); | |
} | |
else if (OutP->pagesType.msgtl_number) { | |
- memcpy(*pages, OutP->pages, OutP->pagesType.msgtl_number); | |
+ memcpy(*pages, OutP->pages, OutP->pagesType.msgtl_number); | |
} | |
*pagesCnt = OutP->pagesType.msgtl_number / 8; | |
@@ -881,14 +887,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->sizeType.msgtl_header.msgt_inline) | |
- *size = OutP->sizeP; | |
+ *size = OutP->sizeP; | |
else if (OutP->sizeType.msgtl_number > *sizeCnt) { | |
- __mig_allocate((vm_offset_t *)size, | |
- 8 * OutP->sizeType.msgtl_number); | |
- memcpy(*size, OutP->size, 8 * OutP->sizeType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)size, 8 * OutP->sizeType.msgtl_number); | |
+ memcpy(*size, OutP->size, 8 * OutP->sizeType.msgtl_number); | |
} | |
else if (OutP->sizeType.msgtl_number) { | |
- memcpy(*size, OutP->size, 8 * OutP->sizeType.msgtl_number); | |
+ memcpy(*size, OutP->size, 8 * OutP->sizeType.msgtl_number); | |
} | |
*sizeCnt = OutP->sizeType.msgtl_number; | |
@@ -910,14 +915,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->freeType.msgtl_header.msgt_inline) | |
- *free = OutP->freeP; | |
+ *free = OutP->freeP; | |
else if (OutP->freeType.msgtl_number > *freeCnt) { | |
- __mig_allocate((vm_offset_t *)free, | |
- 8 * OutP->freeType.msgtl_number); | |
- memcpy(*free, OutP->free, 8 * OutP->freeType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)free, 8 * OutP->freeType.msgtl_number); | |
+ memcpy(*free, OutP->free, 8 * OutP->freeType.msgtl_number); | |
} | |
else if (OutP->freeType.msgtl_number) { | |
- memcpy(*free, OutP->free, 8 * OutP->freeType.msgtl_number); | |
+ memcpy(*free, OutP->free, 8 * OutP->freeType.msgtl_number); | |
} | |
*freeCnt = OutP->freeType.msgtl_number; | |
@@ -937,14 +941,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->nameType.msgtl_header.msgt_inline) | |
- *name = OutP->nameP; | |
+ *name = OutP->nameP; | |
else if (OutP->nameType.msgtl_number > *nameCnt) { | |
- __mig_allocate((vm_offset_t *)name, | |
- OutP->nameType.msgtl_number); | |
- memcpy(*name, OutP->name, OutP->nameType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)name, OutP->nameType.msgtl_number); | |
+ memcpy(*name, OutP->name, OutP->nameType.msgtl_number); | |
} | |
else if (OutP->nameType.msgtl_number) { | |
- memcpy(*name, OutP->name, OutP->nameType.msgtl_number); | |
+ memcpy(*name, OutP->name, OutP->nameType.msgtl_number); | |
} | |
*nameCnt = OutP->nameType.msgtl_number; | |
@@ -966,8 +969,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t device_portType; | |
- mach_port_t device_port; | |
- char device_portPad[4]; | |
+ mach_port_name_inlined_t device_port; | |
mach_msg_type_long_t runsType; | |
union { | |
recnum_t runs[256]; | |
@@ -1001,14 +1003,14 @@ | |
const mach_msg_type_t device_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_long_t runsType = { | |
.msgtl_header = { | |
@@ -1056,7 +1058,7 @@ | |
InP->device_portType = device_portType; | |
- InP->device_port = device_port; | |
+ InP->device_port.name = device_port; | |
InP->runsType = runsType; | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/fsServer.c 2023-11-24 15:42:39.961083388 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/fsServer.c 2023-11-22 01:44:13.585640093 -0500 | |
@@ -61,8 +61,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t exec_taskType; | |
- mach_port_t exec_task; | |
- char exec_taskPad[4]; | |
+ mach_port_name_inlined_t exec_task; | |
mach_msg_type_t flagsType; | |
int flags; | |
char flagsPad[4]; | |
@@ -78,12 +77,12 @@ | |
}; | |
mach_msg_type_long_t fdarrayType; | |
union { | |
- mach_port_t fdarray[512]; | |
+ mach_port_name_inlined_t fdarray[256]; | |
mach_port_t *fdarrayP; | |
}; | |
mach_msg_type_long_t portarrayType; | |
union { | |
- mach_port_t portarray[512]; | |
+ mach_port_name_inlined_t portarray[256]; | |
mach_port_t *portarrayP; | |
}; | |
mach_msg_type_long_t intarrayType; | |
@@ -126,7 +125,7 @@ | |
const mach_msg_type_t exec_taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -146,6 +145,9 @@ | |
protid_t exec_file; | |
+ mach_port_t *fdarrayP; | |
+ mach_port_t *portarrayP; | |
+ | |
#if TypeCheck | |
msgh_size = In0P->Head.msgh_size; | |
if (mig_unlikely ((msgh_size < 120) || | |
@@ -198,11 +200,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In2P->fdarrayType.msgtl_header.msgt_longform != TRUE) || | |
(In2P->fdarrayType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In2P->fdarrayType.msgtl_size != 32))) | |
+ (In2P->fdarrayType.msgtl_size != 64 && In2P->fdarrayType.msgtl_header.msgt_inline == TRUE) || | |
+ (In2P->fdarrayType.msgtl_size != 32 && In2P->fdarrayType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In2P->fdarrayType.msgtl_header.msgt_inline) ? (4 * In2P->fdarrayType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In2P->fdarrayType.msgtl_header.msgt_inline) ? 8 * In2P->fdarrayType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 120 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -214,11 +217,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In3P->portarrayType.msgtl_header.msgt_longform != TRUE) || | |
(In3P->portarrayType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In3P->portarrayType.msgtl_size != 32))) | |
+ (In3P->portarrayType.msgtl_size != 64 && In3P->portarrayType.msgtl_header.msgt_inline == TRUE) || | |
+ (In3P->portarrayType.msgtl_size != 32 && In3P->portarrayType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In3P->portarrayType.msgtl_header.msgt_inline) ? (4 * In3P->portarrayType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In3P->portarrayType.msgtl_header.msgt_inline) ? 8 * In3P->portarrayType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 120 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -276,7 +280,27 @@ | |
else | |
exec_file = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_file_exec(exec_file, In0P->exec_task, In0P->flags, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number, (In1P->envpType.msgtl_header.msgt_inline) ? In1P->envp : In1P->envpP, In1P->envpType.msgtl_number, (In2P->fdarrayType.msgtl_header.msgt_inline) ? In2P->fdarray : In2P->fdarrayP, In2P->fdarrayType.msgtl_number, (In3P->portarrayType.msgtl_header.msgt_inline) ? In3P->portarray : In3P->portarrayP, In3P->portarrayType.msgtl_number, (In4P->intarrayType.msgtl_header.msgt_inline) ? In4P->intarray : In4P->intarrayP, In4P->intarrayType.msgtl_number, (In5P->deallocnamesType.msgtl_header.msgt_inline) ? In5P->deallocnames : In5P->deallocnamesP, In5P->deallocnamesType.msgtl_number, (In6P->destroynamesType.msgtl_header.msgt_inline) ? In6P->destroynames : In6P->destroynamesP, In6P->destroynamesType.msgtl_number); | |
+ if (In2P->fdarrayType.msgtl_header.msgt_inline) { | |
+ fdarrayP = (mach_port_t *)In2P->fdarray; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In2P->fdarrayType.msgtl_number; i++) { | |
+ fdarrayP[i] = In2P->fdarray[i].name; | |
+ } | |
+ } else { | |
+ fdarrayP = In2P->fdarrayP; | |
+ } | |
+ if (In3P->portarrayType.msgtl_header.msgt_inline) { | |
+ portarrayP = (mach_port_t *)In3P->portarray; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In3P->portarrayType.msgtl_number; i++) { | |
+ portarrayP[i] = In3P->portarray[i].name; | |
+ } | |
+ } else { | |
+ portarrayP = In3P->portarrayP; | |
+ } | |
+ OutP->RetCode = diskfs_S_file_exec(exec_file, In0P->exec_task.name, In0P->flags, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number, (In1P->envpType.msgtl_header.msgt_inline) ? In1P->envp : In1P->envpP, In1P->envpType.msgtl_number, fdarrayP, In2P->fdarrayType.msgtl_number, portarrayP, In3P->portarrayType.msgtl_number, (In4P->intarrayType.msgtl_header.msgt_inline) ? In4P->intarray : In4P->intarrayP, In4P->intarrayType.msgtl_number, (In5P->deallocnamesType.msgtl_header.msgt_inline) ? In5P->deallocnames : In5P->deallocnamesP, In5P->deallocnamesType.msgtl_number, (In6P->destroynamesType.msgtl_header.msgt_inline) ? In6P->destroynames : In6P->destroynamesP, In6P->destroynamesType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In6P->destroynamesType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In6P->destroynamesP, 4 * In6P->destroynamesType.msgtl_number); | |
@@ -974,8 +998,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -992,7 +1015,7 @@ | |
const mach_msg_type_t portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1018,7 +1041,7 @@ | |
else | |
file = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_file_notice_changes(file, In0P->port); | |
+ OutP->RetCode = diskfs_S_file_notice_changes(file, In0P->port.name); | |
diskfs_end_using_protid_port(file); | |
} | |
@@ -1046,8 +1069,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t controlType; | |
- mach_port_t control; | |
- char controlPad[4]; | |
+ mach_port_name_inlined_t control; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1058,14 +1080,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t controlType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
protid_t file; | |
mach_msg_type_name_t controlPoly; | |
@@ -1081,7 +1103,7 @@ | |
else | |
file = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_file_getcontrol(file, &OutP->control, &controlPoly); | |
+ OutP->RetCode = diskfs_S_file_getcontrol(file, &OutP->control.name, &controlPoly); | |
diskfs_end_using_protid_port(file); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1360,7 +1382,7 @@ | |
char RetCodePad[4]; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t intsType; | |
@@ -1392,8 +1414,8 @@ | |
const mach_msg_type_long_t portsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -1464,7 +1486,7 @@ | |
file = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
portsP = OutP->ports; | |
- portsCnt = 512; | |
+ portsCnt = 256; | |
intsP = ints; | |
intsCnt = 512; | |
@@ -1486,8 +1508,19 @@ | |
if (portsP != OutP->ports) { | |
OutP->portsType.msgtl_header.msgt_inline = FALSE; | |
OutP->portsType.msgtl_header.msgt_deallocate = TRUE; | |
+ OutP->portsType.msgtl_header.msgt_size = 32; | |
OutP->portsP = portsP; | |
msgh_simple = FALSE; | |
+ } else { | |
+ /* Resize mach_port_name_t array into mach_port_name_inlined_t. */ | |
+ /* Work in reverse order to avoid overriding subsequent entries. */ | |
+ mach_msg_type_number_t i; | |
+ for(i = portsCnt; i > 0; i--) { | |
+ mach_port_name_t tmp_port_name = portsP[i - 1]; | |
+ /* Clear the whole message with zeros. */ | |
+ OutP->ports[i - 1].kernel_port_do_not_use = 0; | |
+ OutP->ports[i - 1].name = tmp_port_name; | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(portsPoly)) | |
@@ -1496,7 +1529,7 @@ | |
OutP->portsType.msgtl_name = portsPoly; | |
OutP->portsType.msgtl_number = portsCnt; | |
- msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? (4 * portsCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? 8 * portsCnt : sizeof(mach_port_t *); | |
msgh_size = 80 + msgh_size_delta; | |
OutP = (Reply *) ((char *) OutP + msgh_size_delta - 2048); | |
@@ -1509,8 +1542,9 @@ | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (intsCnt) | |
+ if (intsCnt) { | |
memcpy(OutP->ints, ints, 4 * intsCnt); | |
+ } | |
} | |
OutP->intsType.msgtl_number = intsCnt; | |
@@ -1527,8 +1561,9 @@ | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (offsetsCnt) | |
+ if (offsetsCnt) { | |
memcpy(OutP->offsets, offsets, 8 * offsetsCnt); | |
+ } | |
} | |
OutP->offsetsType.msgtl_number = offsetsCnt; | |
@@ -1545,8 +1580,9 @@ | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (dataCnt) | |
+ if (dataCnt) { | |
memcpy(OutP->data, data, dataCnt); | |
+ } | |
} | |
OutP->dataType.msgtl_number = dataCnt; | |
@@ -1590,8 +1626,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t linknodeType; | |
- mach_port_t linknode; | |
- char linknodePad[4]; | |
+ mach_port_name_inlined_t linknode; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1602,14 +1637,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t linknodeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
protid_t file; | |
mach_msg_type_name_t linknodePoly; | |
@@ -1625,7 +1660,7 @@ | |
else | |
file = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_file_getlinknode(file, &OutP->linknode, &linknodePoly); | |
+ OutP->RetCode = diskfs_S_file_getlinknode(file, &OutP->linknode.name, &linknodePoly); | |
diskfs_end_using_protid_port(file); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1772,8 +1807,7 @@ | |
mach_msg_type_t retry_nameType; | |
string_t retry_name; | |
mach_msg_type_t resultType; | |
- mach_port_t result; | |
- char resultPad[4]; | |
+ mach_port_name_inlined_t result; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1836,14 +1870,14 @@ | |
const mach_msg_type_t resultType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
protid_t start_dir; | |
mach_msg_type_name_t resultPoly; | |
@@ -1874,7 +1908,7 @@ | |
else | |
start_dir = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_dir_lookup(start_dir, In0P->file_name, In0P->flags, In0P->mode, &OutP->do_retry, OutP->retry_name, &OutP->result, &resultPoly); | |
+ OutP->RetCode = diskfs_S_dir_lookup(start_dir, In0P->file_name, In0P->flags, In0P->mode, &OutP->do_retry, OutP->retry_name, &OutP->result.name, &resultPoly); | |
diskfs_end_using_protid_port(start_dir); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2304,8 +2338,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t fileType; | |
- file_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
mach_msg_type_t nameType; | |
string_t name; | |
mach_msg_type_t exclType; | |
@@ -2327,7 +2360,7 @@ | |
const mach_msg_type_t fileCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2384,7 +2417,7 @@ | |
else | |
dir = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- file = diskfs_begin_using_protid_port(In0P->file); | |
+ file = diskfs_begin_using_protid_port(In0P->file.name); | |
OutP->RetCode = diskfs_S_dir_link(dir, file, In0P->name, In0P->excl); | |
diskfs_end_using_protid_port(file); | |
@@ -2412,8 +2445,7 @@ | |
mach_msg_type_t oldnameType; | |
string_t oldname; | |
mach_msg_type_t newdirectoryType; | |
- file_t newdirectory; | |
- char newdirectoryPad[4]; | |
+ mach_port_name_inlined_t newdirectory; | |
mach_msg_type_t newnameType; | |
string_t newname; | |
mach_msg_type_t exclType; | |
@@ -2445,7 +2477,7 @@ | |
const mach_msg_type_t newdirectoryCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2507,7 +2539,7 @@ | |
else | |
olddirectory = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- newdirectory = diskfs_begin_using_protid_port(In0P->newdirectory); | |
+ newdirectory = diskfs_begin_using_protid_port(In0P->newdirectory.name); | |
OutP->RetCode = diskfs_S_dir_rename(olddirectory, In0P->oldname, newdirectory, In0P->newname, In0P->excl); | |
diskfs_end_using_protid_port(newdirectory); | |
@@ -2547,8 +2579,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t newnodeType; | |
- mach_port_t newnode; | |
- char newnodePad[4]; | |
+ mach_port_name_inlined_t newnode; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -2579,14 +2610,14 @@ | |
const mach_msg_type_t newnodeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
protid_t directory; | |
mach_msg_type_name_t newnodePoly; | |
@@ -2612,7 +2643,7 @@ | |
else | |
directory = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_dir_mkfile(directory, In0P->flags, In0P->mode, &OutP->newnode, &newnodePoly); | |
+ OutP->RetCode = diskfs_S_dir_mkfile(directory, In0P->flags, In0P->mode, &OutP->newnode.name, &newnodePoly); | |
diskfs_end_using_protid_port(directory); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2651,8 +2682,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -2669,7 +2699,7 @@ | |
const mach_msg_type_t portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2695,7 +2725,7 @@ | |
else | |
directory = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_dir_notice_changes(directory, In0P->port); | |
+ OutP->RetCode = diskfs_S_dir_notice_changes(directory, In0P->port.name); | |
diskfs_end_using_protid_port(directory); | |
} | |
@@ -2730,8 +2760,7 @@ | |
char *passiveP; | |
}; | |
mach_msg_type_t activeType; | |
- mach_port_t active; | |
- char activePad[4]; | |
+ mach_port_name_inlined_t active; | |
} Request; | |
typedef struct { | |
@@ -2782,7 +2811,7 @@ | |
const mach_msg_type_t activeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2839,7 +2868,7 @@ | |
else | |
file = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_file_set_translator(file, In0P->passive_flags, In0P->active_flags, In0P->oldtrans_flags, (In0P->passiveType.msgtl_header.msgt_inline) ? In0P->passive : In0P->passiveP, In0P->passiveType.msgtl_number, In1P->active); | |
+ OutP->RetCode = diskfs_S_file_set_translator(file, In0P->passive_flags, In0P->active_flags, In0P->oldtrans_flags, (In0P->passiveType.msgtl_header.msgt_inline) ? In0P->passive : In0P->passiveP, In0P->passiveType.msgtl_number, In1P->active.name); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In0P->passiveType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In0P->passiveP, In0P->passiveType.msgtl_number); | |
@@ -2965,8 +2994,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t translator_cntlType; | |
- mach_port_t translator_cntl; | |
- char translator_cntlPad[4]; | |
+ mach_port_name_inlined_t translator_cntl; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -2977,14 +3005,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t translator_cntlType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
protid_t file; | |
mach_msg_type_name_t translator_cntlPoly; | |
@@ -3000,7 +3028,7 @@ | |
else | |
file = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_file_get_translator_cntl(file, &OutP->translator_cntl, &translator_cntlPoly); | |
+ OutP->RetCode = diskfs_S_file_get_translator_cntl(file, &OutP->translator_cntl.name, &translator_cntlPoly); | |
diskfs_end_using_protid_port(file); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -3127,8 +3155,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t parentType; | |
- mach_port_t parent; | |
- char parentPad[4]; | |
+ mach_port_name_inlined_t parent; | |
} Request; | |
typedef struct { | |
@@ -3137,8 +3164,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t new_fileType; | |
- mach_port_t new_file; | |
- char new_filePad[4]; | |
+ mach_port_name_inlined_t new_file; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -3149,7 +3175,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t parentCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -3159,14 +3185,14 @@ | |
const mach_msg_type_t new_fileType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
protid_t file; | |
mach_port_t parent; | |
@@ -3188,9 +3214,9 @@ | |
else | |
file = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- parent = In0P->parent; | |
+ parent = In0P->parent.name; | |
- OutP->RetCode = diskfs_S_file_reparent(file, parent, &OutP->new_file, &new_filePoly); | |
+ OutP->RetCode = diskfs_S_file_reparent(file, parent, &OutP->new_file.name, &new_filePoly); | |
diskfs_end_using_protid_port(file); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -3228,8 +3254,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t exec_taskType; | |
- mach_port_t exec_task; | |
- char exec_taskPad[4]; | |
+ mach_port_name_inlined_t exec_task; | |
mach_msg_type_t flagsType; | |
int flags; | |
char flagsPad[4]; | |
@@ -3249,12 +3274,12 @@ | |
}; | |
mach_msg_type_long_t fdarrayType; | |
union { | |
- mach_port_t fdarray[512]; | |
+ mach_port_name_inlined_t fdarray[256]; | |
mach_port_t *fdarrayP; | |
}; | |
mach_msg_type_long_t portarrayType; | |
union { | |
- mach_port_t portarray[512]; | |
+ mach_port_name_inlined_t portarray[256]; | |
mach_port_t *portarrayP; | |
}; | |
mach_msg_type_long_t intarrayType; | |
@@ -3297,7 +3322,7 @@ | |
const mach_msg_type_t exec_taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -3337,6 +3362,9 @@ | |
protid_t exec_file; | |
+ mach_port_t *fdarrayP; | |
+ mach_port_t *portarrayP; | |
+ | |
#if TypeCheck | |
msgh_size = In0P->Head.msgh_size; | |
if (mig_unlikely ((msgh_size < 2184) || | |
@@ -3399,11 +3427,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In2P->fdarrayType.msgtl_header.msgt_longform != TRUE) || | |
(In2P->fdarrayType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In2P->fdarrayType.msgtl_size != 32))) | |
+ (In2P->fdarrayType.msgtl_size != 64 && In2P->fdarrayType.msgtl_header.msgt_inline == TRUE) || | |
+ (In2P->fdarrayType.msgtl_size != 32 && In2P->fdarrayType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In2P->fdarrayType.msgtl_header.msgt_inline) ? (4 * In2P->fdarrayType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In2P->fdarrayType.msgtl_header.msgt_inline) ? 8 * In2P->fdarrayType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 2184 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -3415,11 +3444,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In3P->portarrayType.msgtl_header.msgt_longform != TRUE) || | |
(In3P->portarrayType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In3P->portarrayType.msgtl_size != 32))) | |
+ (In3P->portarrayType.msgtl_size != 64 && In3P->portarrayType.msgtl_header.msgt_inline == TRUE) || | |
+ (In3P->portarrayType.msgtl_size != 32 && In3P->portarrayType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In3P->portarrayType.msgtl_header.msgt_inline) ? (4 * In3P->portarrayType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In3P->portarrayType.msgtl_header.msgt_inline) ? 8 * In3P->portarrayType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 2184 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -3477,7 +3507,27 @@ | |
else | |
exec_file = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_file_exec_paths(exec_file, In0P->exec_task, In0P->flags, In0P->path, In0P->abspath, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number, (In1P->envpType.msgtl_header.msgt_inline) ? In1P->envp : In1P->envpP, In1P->envpType.msgtl_number, (In2P->fdarrayType.msgtl_header.msgt_inline) ? In2P->fdarray : In2P->fdarrayP, In2P->fdarrayType.msgtl_number, (In3P->portarrayType.msgtl_header.msgt_inline) ? In3P->portarray : In3P->portarrayP, In3P->portarrayType.msgtl_number, (In4P->intarrayType.msgtl_header.msgt_inline) ? In4P->intarray : In4P->intarrayP, In4P->intarrayType.msgtl_number, (In5P->deallocnamesType.msgtl_header.msgt_inline) ? In5P->deallocnames : In5P->deallocnamesP, In5P->deallocnamesType.msgtl_number, (In6P->destroynamesType.msgtl_header.msgt_inline) ? In6P->destroynames : In6P->destroynamesP, In6P->destroynamesType.msgtl_number); | |
+ if (In2P->fdarrayType.msgtl_header.msgt_inline) { | |
+ fdarrayP = (mach_port_t *)In2P->fdarray; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In2P->fdarrayType.msgtl_number; i++) { | |
+ fdarrayP[i] = In2P->fdarray[i].name; | |
+ } | |
+ } else { | |
+ fdarrayP = In2P->fdarrayP; | |
+ } | |
+ if (In3P->portarrayType.msgtl_header.msgt_inline) { | |
+ portarrayP = (mach_port_t *)In3P->portarray; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In3P->portarrayType.msgtl_number; i++) { | |
+ portarrayP[i] = In3P->portarray[i].name; | |
+ } | |
+ } else { | |
+ portarrayP = In3P->portarrayP; | |
+ } | |
+ OutP->RetCode = diskfs_S_file_exec_paths(exec_file, In0P->exec_task.name, In0P->flags, In0P->path, In0P->abspath, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number, (In1P->envpType.msgtl_header.msgt_inline) ? In1P->envp : In1P->envpP, In1P->envpType.msgtl_number, fdarrayP, In2P->fdarrayType.msgtl_number, portarrayP, In3P->portarrayType.msgtl_number, (In4P->intarrayType.msgtl_header.msgt_inline) ? In4P->intarray : In4P->intarrayP, In4P->intarrayType.msgtl_number, (In5P->deallocnamesType.msgtl_header.msgt_inline) ? In5P->deallocnames : In5P->deallocnamesP, In5P->deallocnamesType.msgtl_number, (In6P->destroynamesType.msgtl_header.msgt_inline) ? In6P->destroynames : In6P->destroynamesP, In6P->destroynamesType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In6P->destroynamesType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In6P->destroynamesP, 4 * In6P->destroynamesType.msgtl_number); | |
@@ -3623,8 +3673,7 @@ | |
mach_msg_type_t flock64Type; | |
flock_t flock64; | |
mach_msg_type_t rendezvousType; | |
- mach_port_t rendezvous; | |
- char rendezvousPad[4]; | |
+ mach_port_name_inlined_t rendezvous; | |
} Request; | |
typedef struct { | |
@@ -3663,7 +3712,7 @@ | |
const mach_msg_type_t rendezvousCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -3710,7 +3759,7 @@ | |
else | |
file = diskfs_begin_using_protid_port(In0P->Head.msgh_request_port); | |
- OutP->RetCode = diskfs_S_file_record_lock(file, In0P->cmd, &In0P->flock64, In0P->rendezvous); | |
+ OutP->RetCode = diskfs_S_file_record_lock(file, In0P->cmd, &In0P->flock64, In0P->rendezvous.name); | |
diskfs_end_using_protid_port(file); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -3735,43 +3784,43 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t diskfs_fs_server_routines[] = { | |
- _Xfile_exec, | |
- _Xfile_chown, | |
- _Xfile_chauthor, | |
- _Xfile_chmod, | |
- _Xfile_chflags, | |
- _Xfile_utimes, | |
- _Xfile_set_size, | |
- _Xfile_lock, | |
- _Xfile_lock_stat, | |
- _Xfile_check_access, | |
- _Xfile_notice_changes, | |
- _Xfile_getcontrol, | |
- _Xfile_statfs, | |
- _Xfile_sync, | |
- _Xfile_syncfs, | |
- _Xfile_get_storage_info, | |
- _Xfile_getlinknode, | |
- _Xfile_getfh, | |
- _Xdir_lookup, | |
- _Xdir_readdir, | |
- _Xdir_mkdir, | |
- _Xdir_rmdir, | |
- _Xdir_unlink, | |
- _Xdir_link, | |
- _Xdir_rename, | |
- _Xdir_mkfile, | |
- _Xdir_notice_changes, | |
- _Xfile_set_translator, | |
- _Xfile_get_translator, | |
- _Xfile_get_translator_cntl, | |
- _Xfile_get_fs_options, | |
- _Xfile_reparent, | |
+ _Xfile_exec, /* 20000 */ | |
+ _Xfile_chown, /* 20001 */ | |
+ _Xfile_chauthor, /* 20002 */ | |
+ _Xfile_chmod, /* 20003 */ | |
+ _Xfile_chflags, /* 20004 */ | |
+ _Xfile_utimes, /* 20005 */ | |
+ _Xfile_set_size, /* 20006 */ | |
+ _Xfile_lock, /* 20007 */ | |
+ _Xfile_lock_stat, /* 20008 */ | |
+ _Xfile_check_access, /* 20009 */ | |
+ _Xfile_notice_changes, /* 20010 */ | |
+ _Xfile_getcontrol, /* 20011 */ | |
+ _Xfile_statfs, /* 20012 */ | |
+ _Xfile_sync, /* 20013 */ | |
+ _Xfile_syncfs, /* 20014 */ | |
+ _Xfile_get_storage_info, /* 20015 */ | |
+ _Xfile_getlinknode, /* 20016 */ | |
+ _Xfile_getfh, /* 20017 */ | |
+ _Xdir_lookup, /* 20018 */ | |
+ _Xdir_readdir, /* 20019 */ | |
+ _Xdir_mkdir, /* 20020 */ | |
+ _Xdir_rmdir, /* 20021 */ | |
+ _Xdir_unlink, /* 20022 */ | |
+ _Xdir_link, /* 20023 */ | |
+ _Xdir_rename, /* 20024 */ | |
+ _Xdir_mkfile, /* 20025 */ | |
+ _Xdir_notice_changes, /* 20026 */ | |
+ _Xfile_set_translator, /* 20027 */ | |
+ _Xfile_get_translator, /* 20028 */ | |
+ _Xfile_get_translator_cntl, /* 20029 */ | |
+ _Xfile_get_fs_options, /* 20030 */ | |
+ _Xfile_reparent, /* 20031 */ | |
0, | |
0, | |
- _Xfile_exec_paths, | |
- _Xfile_utimens, | |
- _Xfile_record_lock, | |
+ _Xfile_exec_paths, /* 20034 */ | |
+ _Xfile_utimens, /* 20035 */ | |
+ _Xfile_record_lock, /* 20036 */ | |
}; | |
mig_external boolean_t diskfs_fs_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/fsysServer.c 2023-11-24 15:42:39.921084269 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/fsysServer.c 2023-11-22 01:44:13.581640052 -0500 | |
@@ -64,8 +64,7 @@ | |
int openflags; | |
char openflagsPad[4]; | |
mach_msg_type_t control_portType; | |
- mach_port_t control_port; | |
- char control_portPad[4]; | |
+ mach_port_name_inlined_t control_port; | |
} Request; | |
typedef struct { | |
@@ -74,8 +73,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t realnodeType; | |
- mach_port_t realnode; | |
- char realnodePad[4]; | |
+ mach_port_name_inlined_t realnode; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -96,7 +94,7 @@ | |
const mach_msg_type_t control_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -106,14 +104,14 @@ | |
const mach_msg_type_t realnodeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_port_t bootstrap; | |
mach_port_t reply; | |
@@ -141,7 +139,7 @@ | |
bootstrap = In0P->Head.msgh_request_port; | |
reply = In0P->Head.msgh_reply_port; | |
- OutP->RetCode = diskfs_S_fsys_startup(bootstrap, reply, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->openflags, In0P->control_port, &OutP->realnode, &realnodePoly); | |
+ OutP->RetCode = diskfs_S_fsys_startup(bootstrap, reply, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->openflags, In0P->control_port.name, &OutP->realnode.name, &realnodePoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -251,8 +249,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t dotdot_nodeType; | |
- mach_port_t dotdot_node; | |
- char dotdot_nodePad[4]; | |
+ mach_port_name_inlined_t dotdot_node; | |
mach_msg_type_long_t gen_uidsType; | |
union { | |
uid_t gen_uids[512]; | |
@@ -279,8 +276,7 @@ | |
mach_msg_type_t retry_nameType; | |
string_t retry_name; | |
mach_msg_type_t fileType; | |
- mach_port_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -296,7 +292,7 @@ | |
const mach_msg_type_t dotdot_nodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -338,14 +334,14 @@ | |
const mach_msg_type_t fileType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
control_t fsys; | |
mach_port_t reply; | |
@@ -406,7 +402,7 @@ | |
reply = In0P->Head.msgh_reply_port; | |
- OutP->RetCode = diskfs_S_fsys_getroot(fsys, reply, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->dotdot_node, (In0P->gen_uidsType.msgtl_header.msgt_inline) ? In0P->gen_uids : In0P->gen_uidsP, In0P->gen_uidsType.msgtl_number, (In1P->gen_gidsType.msgtl_header.msgt_inline) ? In1P->gen_gids : In1P->gen_gidsP, In1P->gen_gidsType.msgtl_number, In2P->flags, &OutP->do_retry, OutP->retry_name, &OutP->file, &filePoly); | |
+ OutP->RetCode = diskfs_S_fsys_getroot(fsys, reply, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->dotdot_node.name, (In0P->gen_uidsType.msgtl_header.msgt_inline) ? In0P->gen_uids : In0P->gen_uidsP, In0P->gen_uidsType.msgtl_number, (In1P->gen_gidsType.msgtl_header.msgt_inline) ? In1P->gen_gids : In1P->gen_gidsP, In1P->gen_gidsType.msgtl_number, In2P->flags, &OutP->do_retry, OutP->retry_name, &OutP->file.name, &filePoly); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In1P->gen_gidsType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In1P->gen_gidsP, 4 * In1P->gen_gidsType.msgtl_number); | |
@@ -485,8 +481,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t fileType; | |
- mach_port_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -502,14 +497,14 @@ | |
const mach_msg_type_t fileType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
control_t fsys; | |
mach_port_t reply; | |
@@ -573,7 +568,7 @@ | |
reply = In0P->Head.msgh_reply_port; | |
- OutP->RetCode = diskfs_S_fsys_getfile(fsys, reply, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), (In0P->gen_uidsType.msgtl_header.msgt_inline) ? In0P->gen_uids : In0P->gen_uidsP, In0P->gen_uidsType.msgtl_number, (In1P->gen_gidsType.msgtl_header.msgt_inline) ? In1P->gen_gids : In1P->gen_gidsP, In1P->gen_gidsType.msgtl_number, (In2P->filehandleType.msgtl_header.msgt_inline) ? In2P->filehandle : In2P->filehandleP, In2P->filehandleType.msgtl_number, &OutP->file, &filePoly); | |
+ OutP->RetCode = diskfs_S_fsys_getfile(fsys, reply, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), (In0P->gen_uidsType.msgtl_header.msgt_inline) ? In0P->gen_uids : In0P->gen_uidsP, In0P->gen_uidsType.msgtl_number, (In1P->gen_gidsType.msgtl_header.msgt_inline) ? In1P->gen_gids : In1P->gen_gidsP, In1P->gen_gidsType.msgtl_number, (In2P->filehandleType.msgtl_header.msgt_inline) ? In2P->filehandle : In2P->filehandleP, In2P->filehandleType.msgtl_number, &OutP->file.name, &filePoly); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In2P->filehandleType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In2P->filehandleP, In2P->filehandleType.msgtl_number); | |
@@ -827,14 +822,11 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t host_privType; | |
- mach_port_t host_priv; | |
- char host_privPad[4]; | |
+ mach_port_name_inlined_t host_priv; | |
mach_msg_type_t device_masterType; | |
- mach_port_t device_master; | |
- char device_masterPad[4]; | |
+ mach_port_name_inlined_t device_master; | |
mach_msg_type_t fstaskType; | |
- mach_port_t fstask; | |
- char fstaskPad[4]; | |
+ mach_port_name_inlined_t fstask; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -845,36 +837,36 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t host_privType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t device_masterType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t fstaskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
control_t fsys; | |
mach_port_t reply; | |
@@ -895,7 +887,7 @@ | |
reply = In0P->Head.msgh_reply_port; | |
- OutP->RetCode = diskfs_S_fsys_getpriv(fsys, reply, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->host_priv, &host_privPoly, &OutP->device_master, &device_masterPoly, &OutP->fstask, &fstaskPoly); | |
+ OutP->RetCode = diskfs_S_fsys_getpriv(fsys, reply, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &OutP->host_priv.name, &host_privPoly, &OutP->device_master.name, &device_masterPoly, &OutP->fstask.name, &fstaskPoly); | |
diskfs_end_using_control_port(fsys); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -952,11 +944,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t proc_serverType; | |
- mach_port_t proc_server; | |
- char proc_serverPad[4]; | |
+ mach_port_name_inlined_t proc_server; | |
mach_msg_type_t auth_handleType; | |
- auth_t auth_handle; | |
- char auth_handlePad[4]; | |
+ mach_port_name_inlined_t auth_handle; | |
} Request; | |
typedef struct { | |
@@ -973,7 +963,7 @@ | |
const mach_msg_type_t proc_serverCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -983,7 +973,7 @@ | |
const mach_msg_type_t auth_handleCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1018,9 +1008,9 @@ | |
reply_port = In0P->Head.msgh_reply_port; | |
- auth_handle = In0P->auth_handle; | |
+ auth_handle = In0P->auth_handle.name; | |
- OutP->RetCode = diskfs_S_fsys_init(fsys, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->proc_server, auth_handle); | |
+ OutP->RetCode = diskfs_S_fsys_init(fsys, reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->proc_server.name, auth_handle); | |
diskfs_end_using_control_port(fsys); | |
} | |
@@ -1044,8 +1034,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t requestorType; | |
- mach_port_t requestor; | |
- char requestorPad[4]; | |
+ mach_port_name_inlined_t requestor; | |
mach_msg_type_long_t argvType; | |
union { | |
char argv[2048]; | |
@@ -1069,7 +1058,7 @@ | |
const mach_msg_type_t requestorCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1110,7 +1099,7 @@ | |
server = In0P->Head.msgh_request_port; | |
reply = In0P->Head.msgh_reply_port; | |
- OutP->RetCode = diskfs_S_fsys_forward(server, reply, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->requestor, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number); | |
+ OutP->RetCode = diskfs_S_fsys_forward(server, reply, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->requestor.name, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In0P->argvType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In0P->argvP, In0P->argvType.msgtl_number); | |
@@ -1245,7 +1234,7 @@ | |
}; | |
mach_msg_type_long_t controlsType; | |
union { | |
- mach_port_t controls[512]; | |
+ mach_port_name_inlined_t controls[256]; | |
mach_port_t *controlsP; | |
}; | |
} Reply; | |
@@ -1274,8 +1263,8 @@ | |
const mach_msg_type_long_t controlsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -1286,7 +1275,7 @@ | |
control_t server; | |
mach_port_t reply; | |
mach_msg_type_number_t namesCnt; | |
- mach_port_t controls[512]; | |
+ mach_port_t controls[256]; | |
mach_msg_type_name_t controlsPoly; | |
mach_msg_type_number_t controlsCnt; | |
@@ -1310,7 +1299,7 @@ | |
namesCnt = 2048; | |
controlsP = controls; | |
- controlsCnt = 512; | |
+ controlsCnt = 256; | |
OutP->RetCode = diskfs_S_fsys_get_children(server, reply, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), &namesP, &namesCnt, &controlsP, &controlsPoly, &controlsCnt); | |
diskfs_end_using_control_port(server); | |
@@ -1335,12 +1324,20 @@ | |
if (controlsP != controls) { | |
OutP->controlsType.msgtl_header.msgt_inline = FALSE; | |
+ OutP->controlsType.msgtl_header.msgt_size = 32; | |
OutP->controlsP = controlsP; | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (controlsCnt) | |
- memcpy(OutP->controls, controls, 4 * controlsCnt); | |
+ if (controlsCnt) { | |
+ /* Copy array of mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_msg_type_number_t i; | |
+ for(i = 0; i < controlsCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ OutP->controls[i].kernel_port_do_not_use = 0; | |
+ OutP->controls[i].name = controls[i]; | |
+ } | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(controlsPoly)) | |
@@ -1349,7 +1346,7 @@ | |
OutP->controlsType.msgtl_name = controlsPoly; | |
OutP->controlsType.msgtl_number = controlsCnt; | |
- msgh_size += (OutP->controlsType.msgtl_header.msgt_inline) ? (4 * controlsCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size += (OutP->controlsType.msgtl_header.msgt_inline) ? 8 * controlsCnt : sizeof(mach_port_t *); | |
OutP = (Reply *) OutHeadP; | |
if (!msgh_simple) | |
@@ -1445,18 +1442,18 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t diskfs_fsys_server_routines[] = { | |
- _Xfsys_startup, | |
- _Xfsys_goaway, | |
- _Xfsys_getroot, | |
- _Xfsys_getfile, | |
- _Xfsys_syncfs, | |
- _Xfsys_set_options, | |
- _Xfsys_getpriv, | |
- _Xfsys_init, | |
- _Xfsys_forward, | |
- _Xfsys_get_options, | |
- _Xfsys_get_children, | |
- _Xfsys_get_source, | |
+ _Xfsys_startup, /* 22000 */ | |
+ _Xfsys_goaway, /* 22001 */ | |
+ _Xfsys_getroot, /* 22002 */ | |
+ _Xfsys_getfile, /* 22003 */ | |
+ _Xfsys_syncfs, /* 22004 */ | |
+ _Xfsys_set_options, /* 22005 */ | |
+ _Xfsys_getpriv, /* 22006 */ | |
+ _Xfsys_init, /* 22007 */ | |
+ _Xfsys_forward, /* 22008 */ | |
+ _Xfsys_get_options, /* 22009 */ | |
+ _Xfsys_get_children, /* 22010 */ | |
+ _Xfsys_get_source, /* 22011 */ | |
}; | |
mig_external boolean_t diskfs_fsys_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/startup_notifyServer.c 2023-11-24 15:42:39.745088144 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libdiskfs/startup_notifyServer.c 2023-11-22 01:44:13.489639130 -0500 | |
@@ -98,7 +98,7 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t diskfs_startup_notify_server_routines[] = { | |
- _Xstartup_dosync, | |
+ _Xstartup_dosync, /* 29500 */ | |
}; | |
mig_external boolean_t diskfs_startup_notify_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/startup/startup_replyUser.c 2023-11-24 15:42:36.365162574 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/startup/startup_replyUser.c 2023-11-22 01:44:11.061614790 -0500 | |
@@ -122,17 +122,13 @@ | |
kern_return_t return_code; | |
char return_codePad[4]; | |
mach_msg_type_t startup_taskType; | |
- mach_port_t startup_task; | |
- char startup_taskPad[4]; | |
+ mach_port_name_inlined_t startup_task; | |
mach_msg_type_t authType; | |
- auth_t auth; | |
- char authPad[4]; | |
+ mach_port_name_inlined_t auth; | |
mach_msg_type_t host_privType; | |
- mach_port_t host_priv; | |
- char host_privPad[4]; | |
+ mach_port_name_inlined_t host_priv; | |
mach_msg_type_t device_masterType; | |
- mach_port_t device_master; | |
- char device_masterPad[4]; | |
+ mach_port_name_inlined_t device_master; | |
} Request; | |
union { | |
@@ -155,47 +151,47 @@ | |
const mach_msg_type_t startup_taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t authType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(auth_t) == 4 * 1, "expected auth_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t host_privType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t device_masterType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->return_codeType = return_codeType; | |
@@ -203,21 +199,21 @@ | |
InP->startup_taskType = startup_taskType; | |
- InP->startup_task = startup_task; | |
+ InP->startup_task.name = startup_task; | |
InP->authType = authType; | |
- InP->auth = auth; | |
+ InP->auth.name = auth; | |
InP->host_privType = host_privType; | |
- InP->host_priv = host_priv; | |
+ InP->host_priv.name = host_priv; | |
InP->host_privType.msgt_name = host_privPoly; | |
InP->device_masterType = device_masterType; | |
- InP->device_master = device_master; | |
+ InP->device_master.name = device_master; | |
InP->device_masterType.msgt_name = device_masterPoly; | |
@@ -251,8 +247,7 @@ | |
kern_return_t return_code; | |
char return_codePad[4]; | |
mach_msg_type_t procType; | |
- mach_port_t proc; | |
- char procPad[4]; | |
+ mach_port_name_inlined_t proc; | |
} Request; | |
union { | |
@@ -276,14 +271,14 @@ | |
const mach_msg_type_t procType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
if (MACH_MSG_TYPE_PORT_ANY(reply_portPoly)) | |
msgh_simple = FALSE; | |
@@ -294,7 +289,7 @@ | |
InP->procType = procType; | |
- InP->proc = proc; | |
+ InP->proc.name = proc; | |
if (MACH_MSG_TYPE_PORT_ANY(procPoly)) | |
msgh_simple = FALSE; | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/startup/msgServer.c 2023-11-24 15:42:36.349162927 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/startup/msgServer.c 2023-11-22 01:44:11.057614749 -0500 | |
@@ -65,8 +65,7 @@ | |
natural_t sigcode; | |
char sigcodePad[4]; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -103,7 +102,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -132,7 +131,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_msg_sig_post(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->signal, In0P->sigcode, In0P->refport); | |
+ OutP->RetCode = S_msg_sig_post(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->signal, In0P->sigcode, In0P->refport.name); | |
} | |
/* Default implementation of S_msg_sig_post */ | |
@@ -156,8 +155,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t ppidType; | |
pid_t ppid; | |
char ppidPad[4]; | |
@@ -183,7 +181,7 @@ | |
const mach_msg_type_t taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -247,7 +245,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_msg_proc_newids(In0P->Head.msgh_request_port, In0P->task, In0P->ppid, In0P->pgrp, In0P->orphaned); | |
+ OutP->RetCode = S_msg_proc_newids(In0P->Head.msgh_request_port, In0P->task.name, In0P->ppid, In0P->pgrp, In0P->orphaned); | |
} | |
/* Default implementation of S_msg_proc_newids */ | |
@@ -270,8 +268,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t authType; | |
- auth_t auth; | |
- char authPad[4]; | |
+ mach_port_name_inlined_t auth; | |
} Request; | |
typedef struct { | |
@@ -288,7 +285,7 @@ | |
const mach_msg_type_t authCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -307,7 +304,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_msg_add_auth(In0P->Head.msgh_request_port, In0P->auth); | |
+ OutP->RetCode = S_msg_add_auth(In0P->Head.msgh_request_port, In0P->auth.name); | |
} | |
/* Default implementation of S_msg_add_auth */ | |
@@ -327,8 +324,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_long_t uidsType; | |
union { | |
int uids[512]; | |
@@ -359,7 +355,7 @@ | |
const mach_msg_type_t taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -407,7 +403,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_msg_del_auth(In0P->Head.msgh_request_port, In0P->task, (In0P->uidsType.msgtl_header.msgt_inline) ? In0P->uids : In0P->uidsP, In0P->uidsType.msgtl_number, (In1P->gidsType.msgtl_header.msgt_inline) ? In1P->gids : In1P->gidsP, In1P->gidsType.msgtl_number); | |
+ OutP->RetCode = S_msg_del_auth(In0P->Head.msgh_request_port, In0P->task.name, (In0P->uidsType.msgtl_header.msgt_inline) ? In0P->uids : In0P->uidsP, In0P->uidsType.msgtl_number, (In1P->gidsType.msgtl_header.msgt_inline) ? In1P->gids : In1P->gidsP, In1P->gidsType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In1P->gidsType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In1P->gidsP, 4 * In1P->gidsType.msgtl_number); | |
@@ -437,8 +433,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
@@ -450,8 +445,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -462,7 +456,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -482,14 +476,14 @@ | |
const mach_msg_type_t portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t portPoly; | |
@@ -509,7 +503,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_msg_get_init_port(In0P->Head.msgh_request_port, In0P->refport, In0P->which, &OutP->port, &portPoly); | |
+ OutP->RetCode = S_msg_get_init_port(In0P->Head.msgh_request_port, In0P->refport.name, In0P->which, &OutP->port.name, &portPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -547,14 +541,12 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -571,7 +563,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -591,7 +583,7 @@ | |
const mach_msg_type_t portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -620,7 +612,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_msg_set_init_port(In0P->Head.msgh_request_port, In0P->refport, In0P->which, In0P->port); | |
+ OutP->RetCode = S_msg_set_init_port(In0P->Head.msgh_request_port, In0P->refport.name, In0P->which, In0P->port.name); | |
} | |
/* Default implementation of S_msg_set_init_port */ | |
@@ -642,8 +634,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -653,7 +644,7 @@ | |
char RetCodePad[4]; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
} Reply; | |
@@ -666,7 +657,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -677,8 +668,8 @@ | |
const mach_msg_type_long_t portsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -703,9 +694,9 @@ | |
#endif /* TypeCheck */ | |
portsP = OutP->ports; | |
- portsCnt = 512; | |
+ portsCnt = 256; | |
- OutP->RetCode = S_msg_get_init_ports(In0P->Head.msgh_request_port, In0P->refport, &portsP, &portsPoly, &portsCnt); | |
+ OutP->RetCode = S_msg_get_init_ports(In0P->Head.msgh_request_port, In0P->refport.name, &portsP, &portsPoly, &portsCnt); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -715,8 +706,19 @@ | |
if (portsP != OutP->ports) { | |
OutP->portsType.msgtl_header.msgt_inline = FALSE; | |
OutP->portsType.msgtl_header.msgt_deallocate = TRUE; | |
+ OutP->portsType.msgtl_header.msgt_size = 32; | |
OutP->portsP = portsP; | |
msgh_simple = FALSE; | |
+ } else { | |
+ /* Resize mach_port_name_t array into mach_port_name_inlined_t. */ | |
+ /* Work in reverse order to avoid overriding subsequent entries. */ | |
+ mach_msg_type_number_t i; | |
+ for(i = portsCnt; i > 0; i--) { | |
+ mach_port_name_t tmp_port_name = portsP[i - 1]; | |
+ /* Clear the whole message with zeros. */ | |
+ OutP->ports[i - 1].kernel_port_do_not_use = 0; | |
+ OutP->ports[i - 1].name = tmp_port_name; | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(portsPoly)) | |
@@ -725,7 +727,7 @@ | |
OutP->portsType.msgtl_name = portsPoly; | |
OutP->portsType.msgtl_number = portsCnt; | |
- OutP->Head.msgh_size = 56 + ((OutP->portsType.msgtl_header.msgt_inline) ? (4 * portsCnt + 7) & ~7 : sizeof(mach_port_t *)); | |
+ OutP->Head.msgh_size = 56 + ((OutP->portsType.msgtl_header.msgt_inline) ? 8 * portsCnt : sizeof(mach_port_t *)); | |
if (!msgh_simple) | |
OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; | |
@@ -751,11 +753,10 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
} Request; | |
@@ -776,7 +777,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -784,6 +785,8 @@ | |
.msgt_unused = 0 | |
}; | |
+ mach_port_t *portsP; | |
+ | |
#if TypeCheck | |
msgh_size = In0P->Head.msgh_size; | |
if (mig_unlikely ((msgh_size < 56) || | |
@@ -799,16 +802,27 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In0P->portsType.msgtl_header.msgt_longform != TRUE) || | |
(In0P->portsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In0P->portsType.msgtl_size != 32))) | |
+ (In0P->portsType.msgtl_size != 64 && In0P->portsType.msgtl_header.msgt_inline == TRUE) || | |
+ (In0P->portsType.msgtl_size != 32 && In0P->portsType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
#if TypeCheck | |
- if (mig_unlikely (msgh_size != 56 + ((In0P->portsType.msgtl_header.msgt_inline) ? (4 * In0P->portsType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *)))) | |
+ if (mig_unlikely (msgh_size != 56 + ((In0P->portsType.msgtl_header.msgt_inline) ? 8 * In0P->portsType.msgtl_number : sizeof(mach_port_t *)))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_msg_set_init_ports(In0P->Head.msgh_request_port, In0P->refport, (In0P->portsType.msgtl_header.msgt_inline) ? In0P->ports : In0P->portsP, In0P->portsType.msgtl_number); | |
+ if (In0P->portsType.msgtl_header.msgt_inline) { | |
+ portsP = (mach_port_t *)In0P->ports; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In0P->portsType.msgtl_number; i++) { | |
+ portsP[i] = In0P->ports[i].name; | |
+ } | |
+ } else { | |
+ portsP = In0P->portsP; | |
+ } | |
+ OutP->RetCode = S_msg_set_init_ports(In0P->Head.msgh_request_port, In0P->refport.name, portsP, In0P->portsType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In0P->portsType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In0P->portsP, 4 * In0P->portsType.msgtl_number); | |
@@ -833,8 +847,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
@@ -857,7 +870,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -902,7 +915,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_msg_get_init_int(In0P->Head.msgh_request_port, In0P->refport, In0P->which, &OutP->value); | |
+ OutP->RetCode = S_msg_get_init_int(In0P->Head.msgh_request_port, In0P->refport.name, In0P->which, &OutP->value); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -930,8 +943,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t whichType; | |
int which; | |
char whichPad[4]; | |
@@ -954,7 +966,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1003,7 +1015,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_msg_set_init_int(In0P->Head.msgh_request_port, In0P->refport, In0P->which, In0P->value); | |
+ OutP->RetCode = S_msg_set_init_int(In0P->Head.msgh_request_port, In0P->refport.name, In0P->which, In0P->value); | |
} | |
/* Default implementation of S_msg_set_init_int */ | |
@@ -1025,8 +1037,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -1049,7 +1060,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1087,7 +1098,7 @@ | |
valuesP = OutP->values; | |
valuesCnt = 512; | |
- OutP->RetCode = S_msg_get_init_ints(In0P->Head.msgh_request_port, In0P->refport, &valuesP, &valuesCnt); | |
+ OutP->RetCode = S_msg_get_init_ints(In0P->Head.msgh_request_port, In0P->refport.name, &valuesP, &valuesCnt); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1127,8 +1138,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t valuesType; | |
union { | |
int values[512]; | |
@@ -1152,7 +1162,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1184,7 +1194,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_msg_set_init_ints(In0P->Head.msgh_request_port, In0P->refport, (In0P->valuesType.msgtl_header.msgt_inline) ? In0P->values : In0P->valuesP, In0P->valuesType.msgtl_number); | |
+ OutP->RetCode = S_msg_set_init_ints(In0P->Head.msgh_request_port, In0P->refport.name, (In0P->valuesType.msgtl_header.msgt_inline) ? In0P->values : In0P->valuesP, In0P->valuesType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In0P->valuesType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In0P->valuesP, 4 * In0P->valuesType.msgtl_number); | |
@@ -1209,8 +1219,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -1220,7 +1229,7 @@ | |
char RetCodePad[4]; | |
mach_msg_type_long_t dtableType; | |
union { | |
- mach_port_t dtable[512]; | |
+ mach_port_name_inlined_t dtable[256]; | |
mach_port_t *dtableP; | |
}; | |
} Reply; | |
@@ -1233,7 +1242,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1244,8 +1253,8 @@ | |
const mach_msg_type_long_t dtableType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -1270,9 +1279,9 @@ | |
#endif /* TypeCheck */ | |
dtableP = OutP->dtable; | |
- dtableCnt = 512; | |
+ dtableCnt = 256; | |
- OutP->RetCode = S_msg_get_dtable(In0P->Head.msgh_request_port, In0P->refport, &dtableP, &dtablePoly, &dtableCnt); | |
+ OutP->RetCode = S_msg_get_dtable(In0P->Head.msgh_request_port, In0P->refport.name, &dtableP, &dtablePoly, &dtableCnt); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1282,8 +1291,19 @@ | |
if (dtableP != OutP->dtable) { | |
OutP->dtableType.msgtl_header.msgt_inline = FALSE; | |
OutP->dtableType.msgtl_header.msgt_deallocate = TRUE; | |
+ OutP->dtableType.msgtl_header.msgt_size = 32; | |
OutP->dtableP = dtableP; | |
msgh_simple = FALSE; | |
+ } else { | |
+ /* Resize mach_port_name_t array into mach_port_name_inlined_t. */ | |
+ /* Work in reverse order to avoid overriding subsequent entries. */ | |
+ mach_msg_type_number_t i; | |
+ for(i = dtableCnt; i > 0; i--) { | |
+ mach_port_name_t tmp_port_name = dtableP[i - 1]; | |
+ /* Clear the whole message with zeros. */ | |
+ OutP->dtable[i - 1].kernel_port_do_not_use = 0; | |
+ OutP->dtable[i - 1].name = tmp_port_name; | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(dtablePoly)) | |
@@ -1292,7 +1312,7 @@ | |
OutP->dtableType.msgtl_name = dtablePoly; | |
OutP->dtableType.msgtl_number = dtableCnt; | |
- OutP->Head.msgh_size = 56 + ((OutP->dtableType.msgtl_header.msgt_inline) ? (4 * dtableCnt + 7) & ~7 : sizeof(mach_port_t *)); | |
+ OutP->Head.msgh_size = 56 + ((OutP->dtableType.msgtl_header.msgt_inline) ? 8 * dtableCnt : sizeof(mach_port_t *)); | |
if (!msgh_simple) | |
OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; | |
@@ -1318,11 +1338,10 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t dtableType; | |
union { | |
- mach_port_t dtable[512]; | |
+ mach_port_name_inlined_t dtable[256]; | |
mach_port_t *dtableP; | |
}; | |
} Request; | |
@@ -1343,7 +1362,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1351,6 +1370,8 @@ | |
.msgt_unused = 0 | |
}; | |
+ mach_port_t *dtableP; | |
+ | |
#if TypeCheck | |
msgh_size = In0P->Head.msgh_size; | |
if (mig_unlikely ((msgh_size < 56) || | |
@@ -1366,16 +1387,27 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In0P->dtableType.msgtl_header.msgt_longform != TRUE) || | |
(In0P->dtableType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In0P->dtableType.msgtl_size != 32))) | |
+ (In0P->dtableType.msgtl_size != 64 && In0P->dtableType.msgtl_header.msgt_inline == TRUE) || | |
+ (In0P->dtableType.msgtl_size != 32 && In0P->dtableType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
#if TypeCheck | |
- if (mig_unlikely (msgh_size != 56 + ((In0P->dtableType.msgtl_header.msgt_inline) ? (4 * In0P->dtableType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *)))) | |
+ if (mig_unlikely (msgh_size != 56 + ((In0P->dtableType.msgtl_header.msgt_inline) ? 8 * In0P->dtableType.msgtl_number : sizeof(mach_port_t *)))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_msg_set_dtable(In0P->Head.msgh_request_port, In0P->refport, (In0P->dtableType.msgtl_header.msgt_inline) ? In0P->dtable : In0P->dtableP, In0P->dtableType.msgtl_number); | |
+ if (In0P->dtableType.msgtl_header.msgt_inline) { | |
+ dtableP = (mach_port_t *)In0P->dtable; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In0P->dtableType.msgtl_number; i++) { | |
+ dtableP[i] = In0P->dtable[i].name; | |
+ } | |
+ } else { | |
+ dtableP = In0P->dtableP; | |
+ } | |
+ OutP->RetCode = S_msg_set_dtable(In0P->Head.msgh_request_port, In0P->refport.name, dtableP, In0P->dtableType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In0P->dtableType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In0P->dtableP, 4 * In0P->dtableType.msgtl_number); | |
@@ -1400,8 +1432,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t fdType; | |
int fd; | |
char fdPad[4]; | |
@@ -1413,8 +1444,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1425,7 +1455,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1445,14 +1475,14 @@ | |
const mach_msg_type_t portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t portPoly; | |
@@ -1472,7 +1502,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_msg_get_fd(In0P->Head.msgh_request_port, In0P->refport, In0P->fd, &OutP->port, &portPoly); | |
+ OutP->RetCode = S_msg_get_fd(In0P->Head.msgh_request_port, In0P->refport.name, In0P->fd, &OutP->port.name, &portPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1510,14 +1540,12 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t fdType; | |
int fd; | |
char fdPad[4]; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -1534,7 +1562,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1554,7 +1582,7 @@ | |
const mach_msg_type_t portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1583,7 +1611,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_msg_set_fd(In0P->Head.msgh_request_port, In0P->refport, In0P->fd, In0P->port); | |
+ OutP->RetCode = S_msg_set_fd(In0P->Head.msgh_request_port, In0P->refport.name, In0P->fd, In0P->port.name); | |
} | |
/* Default implementation of S_msg_set_fd */ | |
@@ -1688,8 +1716,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t valueType; | |
union { | |
char value[2048]; | |
@@ -1713,7 +1740,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1745,7 +1772,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_msg_set_environment(In0P->Head.msgh_request_port, In0P->refport, (In0P->valueType.msgtl_header.msgt_inline) ? In0P->value : In0P->valueP, In0P->valueType.msgtl_number); | |
+ OutP->RetCode = S_msg_set_environment(In0P->Head.msgh_request_port, In0P->refport.name, (In0P->valueType.msgtl_header.msgt_inline) ? In0P->value : In0P->valueP, In0P->valueType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In0P->valueType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In0P->valueP, In0P->valueType.msgtl_number); | |
@@ -1871,8 +1898,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t variableType; | |
string_t variable; | |
mach_msg_type_t valueType; | |
@@ -1896,7 +1922,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1960,7 +1986,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_msg_set_env_variable(In0P->Head.msgh_request_port, In0P->refport, In0P->variable, In0P->value, In0P->replace); | |
+ OutP->RetCode = S_msg_set_env_variable(In0P->Head.msgh_request_port, In0P->refport.name, In0P->variable, In0P->value, In0P->replace); | |
} | |
/* Default implementation of S_msg_set_env_variable */ | |
@@ -1989,8 +2015,7 @@ | |
natural_t sigcode; | |
char sigcodePad[4]; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
} Request; | |
typedef struct { | |
@@ -2027,7 +2052,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2056,7 +2081,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_msg_sig_post_untraced(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->signal, In0P->sigcode, In0P->refport); | |
+ OutP->RetCode = S_msg_sig_post_untraced(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->signal, In0P->sigcode, In0P->refport.name); | |
} | |
/* Default implementation of S_msg_sig_post_untraced */ | |
@@ -2080,8 +2105,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t threadType; | |
- mach_port_t thread; | |
- char threadPad[4]; | |
+ mach_port_name_inlined_t thread; | |
} Request; | |
typedef struct { | |
@@ -2103,7 +2127,7 @@ | |
const mach_msg_type_t threadCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2144,7 +2168,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_msg_report_wait(In0P->Head.msgh_request_port, In0P->thread, OutP->wait_desc, &OutP->wait_rpc); | |
+ OutP->RetCode = S_msg_report_wait(In0P->Head.msgh_request_port, In0P->thread.name, OutP->wait_desc, &OutP->wait_rpc); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2174,8 +2198,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_long_t namesType; | |
union { | |
mach_port_name_t names[512]; | |
@@ -2205,7 +2228,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2256,7 +2279,7 @@ | |
descriptionsP = OutP->descriptions; | |
descriptionsCnt = 2048; | |
- OutP->RetCode = S_msg_describe_ports(In0P->Head.msgh_request_port, In0P->refport, (In0P->namesType.msgtl_header.msgt_inline) ? In0P->names : In0P->namesP, In0P->namesType.msgtl_number, &descriptionsP, &descriptionsCnt); | |
+ OutP->RetCode = S_msg_describe_ports(In0P->Head.msgh_request_port, In0P->refport.name, (In0P->namesType.msgtl_header.msgt_inline) ? In0P->names : In0P->namesP, In0P->namesType.msgtl_number, &descriptionsP, &descriptionsCnt); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In0P->namesType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In0P->namesP, 4 * In0P->namesType.msgtl_number); | |
@@ -2294,31 +2317,31 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t msg_server_routines[] = { | |
- _Xmsg_sig_post, | |
- _Xmsg_proc_newids, | |
- _Xmsg_add_auth, | |
- _Xmsg_del_auth, | |
- _Xmsg_get_init_port, | |
- _Xmsg_set_init_port, | |
- _Xmsg_get_init_ports, | |
- _Xmsg_set_init_ports, | |
- _Xmsg_get_init_int, | |
- _Xmsg_set_init_int, | |
- _Xmsg_get_init_ints, | |
- _Xmsg_set_init_ints, | |
- _Xmsg_get_dtable, | |
- _Xmsg_set_dtable, | |
- _Xmsg_get_fd, | |
- _Xmsg_set_fd, | |
- _Xmsg_get_environment, | |
- _Xmsg_set_environment, | |
- _Xmsg_get_env_variable, | |
- _Xmsg_set_env_variable, | |
+ _Xmsg_sig_post, /* 23000 */ | |
+ _Xmsg_proc_newids, /* 23001 */ | |
+ _Xmsg_add_auth, /* 23002 */ | |
+ _Xmsg_del_auth, /* 23003 */ | |
+ _Xmsg_get_init_port, /* 23004 */ | |
+ _Xmsg_set_init_port, /* 23005 */ | |
+ _Xmsg_get_init_ports, /* 23006 */ | |
+ _Xmsg_set_init_ports, /* 23007 */ | |
+ _Xmsg_get_init_int, /* 23008 */ | |
+ _Xmsg_set_init_int, /* 23009 */ | |
+ _Xmsg_get_init_ints, /* 23010 */ | |
+ _Xmsg_set_init_ints, /* 23011 */ | |
+ _Xmsg_get_dtable, /* 23012 */ | |
+ _Xmsg_set_dtable, /* 23013 */ | |
+ _Xmsg_get_fd, /* 23014 */ | |
+ _Xmsg_set_fd, /* 23015 */ | |
+ _Xmsg_get_environment, /* 23016 */ | |
+ _Xmsg_set_environment, /* 23017 */ | |
+ _Xmsg_get_env_variable, /* 23018 */ | |
+ _Xmsg_set_env_variable, /* 23019 */ | |
0, | |
0, | |
- _Xmsg_sig_post_untraced, | |
- _Xmsg_report_wait, | |
- _Xmsg_describe_ports, | |
+ _Xmsg_sig_post_untraced, /* 23022 */ | |
+ _Xmsg_report_wait, /* 23023 */ | |
+ _Xmsg_describe_ports, /* 23024 */ | |
}; | |
mig_external boolean_t msg_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/startup/ioServer.c 2023-11-24 15:42:36.345163014 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/startup/ioServer.c 2023-11-22 01:44:11.065614830 -0500 | |
@@ -671,8 +671,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t notify_portType; | |
- mach_port_t notify_port; | |
- char notify_portPad[4]; | |
+ mach_port_name_inlined_t notify_port; | |
} Request; | |
typedef struct { | |
@@ -681,8 +680,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t async_id_portType; | |
- mach_port_t async_id_port; | |
- char async_id_portPad[4]; | |
+ mach_port_name_inlined_t async_id_port; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -693,7 +691,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t notify_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -703,14 +701,14 @@ | |
const mach_msg_type_t async_id_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t async_id_portPoly; | |
@@ -725,7 +723,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_io_async(In0P->Head.msgh_request_port, In0P->notify_port, &OutP->async_id_port, &async_id_portPoly); | |
+ OutP->RetCode = S_io_async(In0P->Head.msgh_request_port, In0P->notify_port.name, &OutP->async_id_port.name, &async_id_portPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -885,8 +883,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t icky_async_id_portType; | |
- mach_port_t icky_async_id_port; | |
- char icky_async_id_portPad[4]; | |
+ mach_port_name_inlined_t icky_async_id_port; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -897,14 +894,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t icky_async_id_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t icky_async_id_portPoly; | |
@@ -914,7 +911,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_io_get_icky_async_id(In0P->Head.msgh_request_port, &OutP->icky_async_id_port, &icky_async_id_portPoly); | |
+ OutP->RetCode = S_io_get_icky_async_id(In0P->Head.msgh_request_port, &OutP->icky_async_id_port.name, &icky_async_id_portPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1087,8 +1084,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t rendezvous2Type; | |
- mach_port_t rendezvous2; | |
- char rendezvous2Pad[4]; | |
+ mach_port_name_inlined_t rendezvous2; | |
} Request; | |
typedef struct { | |
@@ -1105,7 +1101,7 @@ | |
const mach_msg_type_t rendezvous2Check = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1124,7 +1120,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_io_reauthenticate(In0P->Head.msgh_request_port, In0P->rendezvous2); | |
+ OutP->RetCode = S_io_reauthenticate(In0P->Head.msgh_request_port, In0P->rendezvous2.name); | |
} | |
/* Default implementation of S_io_reauthenticate */ | |
@@ -1161,8 +1157,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t new_objectType; | |
- mach_port_t new_object; | |
- char new_objectPad[4]; | |
+ mach_port_name_inlined_t new_object; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1177,14 +1172,14 @@ | |
const mach_msg_type_t new_objectType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t new_objectPoly; | |
@@ -1223,7 +1218,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_io_restrict_auth(In0P->Head.msgh_request_port, &OutP->new_object, &new_objectPoly, (In0P->uidsType.msgtl_header.msgt_inline) ? In0P->uids : In0P->uidsP, In0P->uidsType.msgtl_number, (In1P->gidsType.msgtl_header.msgt_inline) ? In1P->gids : In1P->gidsP, In1P->gidsType.msgtl_number); | |
+ OutP->RetCode = S_io_restrict_auth(In0P->Head.msgh_request_port, &OutP->new_object.name, &new_objectPoly, (In0P->uidsType.msgtl_header.msgt_inline) ? In0P->uids : In0P->uidsP, In0P->uidsType.msgtl_number, (In1P->gidsType.msgtl_header.msgt_inline) ? In1P->gids : In1P->gidsP, In1P->gidsType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In1P->gidsType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In1P->gidsP, 4 * In1P->gidsType.msgtl_number); | |
@@ -1276,8 +1271,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t newportType; | |
- mach_port_t newport; | |
- char newportPad[4]; | |
+ mach_port_name_inlined_t newport; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1288,14 +1282,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t newportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t newportPoly; | |
@@ -1305,7 +1299,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_io_duplicate(In0P->Head.msgh_request_port, &OutP->newport, &newportPoly); | |
+ OutP->RetCode = S_io_duplicate(In0P->Head.msgh_request_port, &OutP->newport.name, &newportPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1457,11 +1451,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t memobjrdType; | |
- mach_port_t memobjrd; | |
- char memobjrdPad[4]; | |
+ mach_port_name_inlined_t memobjrd; | |
mach_msg_type_t memobjwtType; | |
- mach_port_t memobjwt; | |
- char memobjwtPad[4]; | |
+ mach_port_name_inlined_t memobjwt; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1472,25 +1464,25 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t memobjrdType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t memobjwtType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t memobjrdPoly; | |
mach_msg_type_name_t memobjwtPoly; | |
@@ -1501,7 +1493,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_io_map(In0P->Head.msgh_request_port, &OutP->memobjrd, &memobjrdPoly, &OutP->memobjwt, &memobjwtPoly); | |
+ OutP->RetCode = S_io_map(In0P->Head.msgh_request_port, &OutP->memobjrd.name, &memobjrdPoly, &OutP->memobjwt.name, &memobjwtPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1553,8 +1545,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t memobjType; | |
- mach_port_t memobj; | |
- char memobjPad[4]; | |
+ mach_port_name_inlined_t memobj; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1565,14 +1556,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t memobjType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t memobjPoly; | |
@@ -1582,7 +1573,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_io_map_cntl(In0P->Head.msgh_request_port, &OutP->memobj, &memobjPoly); | |
+ OutP->RetCode = S_io_map_cntl(In0P->Head.msgh_request_port, &OutP->memobj.name, &memobjPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2079,11 +2070,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t idportType; | |
- mach_port_t idport; | |
- char idportPad[4]; | |
+ mach_port_name_inlined_t idport; | |
mach_msg_type_t fsidportType; | |
- mach_port_t fsidport; | |
- char fsidportPad[4]; | |
+ mach_port_name_inlined_t fsidport; | |
mach_msg_type_t filenoType; | |
ino64_t fileno; | |
} Reply; | |
@@ -2096,25 +2085,25 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t idportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t fsidportType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t filenoType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_64, | |
@@ -2136,7 +2125,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_io_identity(In0P->Head.msgh_request_port, &OutP->idport, &idportPoly, &OutP->fsidport, &fsidportPoly, &OutP->fileno); | |
+ OutP->RetCode = S_io_identity(In0P->Head.msgh_request_port, &OutP->idport.name, &idportPoly, &OutP->fsidport.name, &fsidportPoly, &OutP->fileno); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2313,38 +2302,38 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t io_server_routines[] = { | |
- _Xio_write, | |
- _Xio_read, | |
- _Xio_seek, | |
- _Xio_readable, | |
- _Xio_set_all_openmodes, | |
- _Xio_get_openmodes, | |
- _Xio_set_some_openmodes, | |
- _Xio_clear_some_openmodes, | |
- _Xio_async, | |
- _Xio_mod_owner, | |
- _Xio_get_owner, | |
- _Xio_get_icky_async_id, | |
- _Xio_select, | |
- _Xio_stat, | |
- _Xio_reauthenticate, | |
- _Xio_restrict_auth, | |
- _Xio_duplicate, | |
- _Xio_server_version, | |
- _Xio_map, | |
- _Xio_map_cntl, | |
- _Xio_get_conch, | |
- _Xio_release_conch, | |
- _Xio_eofnotify, | |
- _Xio_prenotify, | |
- _Xio_postnotify, | |
- _Xio_readnotify, | |
- _Xio_readsleep, | |
- _Xio_sigio, | |
- _Xio_pathconf, | |
- _Xio_identity, | |
- _Xio_revoke, | |
- _Xio_select_timeout, | |
+ _Xio_write, /* 21000 */ | |
+ _Xio_read, /* 21001 */ | |
+ _Xio_seek, /* 21002 */ | |
+ _Xio_readable, /* 21003 */ | |
+ _Xio_set_all_openmodes, /* 21004 */ | |
+ _Xio_get_openmodes, /* 21005 */ | |
+ _Xio_set_some_openmodes, /* 21006 */ | |
+ _Xio_clear_some_openmodes, /* 21007 */ | |
+ _Xio_async, /* 21008 */ | |
+ _Xio_mod_owner, /* 21009 */ | |
+ _Xio_get_owner, /* 21010 */ | |
+ _Xio_get_icky_async_id, /* 21011 */ | |
+ _Xio_select, /* 21012 */ | |
+ _Xio_stat, /* 21013 */ | |
+ _Xio_reauthenticate, /* 21014 */ | |
+ _Xio_restrict_auth, /* 21015 */ | |
+ _Xio_duplicate, /* 21016 */ | |
+ _Xio_server_version, /* 21017 */ | |
+ _Xio_map, /* 21018 */ | |
+ _Xio_map_cntl, /* 21019 */ | |
+ _Xio_get_conch, /* 21020 */ | |
+ _Xio_release_conch, /* 21021 */ | |
+ _Xio_eofnotify, /* 21022 */ | |
+ _Xio_prenotify, /* 21023 */ | |
+ _Xio_postnotify, /* 21024 */ | |
+ _Xio_readnotify, /* 21025 */ | |
+ _Xio_readsleep, /* 21026 */ | |
+ _Xio_sigio, /* 21027 */ | |
+ _Xio_pathconf, /* 21028 */ | |
+ _Xio_identity, /* 21029 */ | |
+ _Xio_revoke, /* 21030 */ | |
+ _Xio_select_timeout, /* 21031 */ | |
}; | |
mig_external boolean_t io_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/startup/notifyServer.c 2023-11-24 15:42:36.349162927 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/startup/notifyServer.c 2023-11-22 01:44:11.061614790 -0500 | |
@@ -164,8 +164,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t rightsType; | |
- mach_port_t rights; | |
- char rightsPad[4]; | |
+ mach_port_name_inlined_t rights; | |
} Request; | |
typedef struct { | |
@@ -182,7 +181,7 @@ | |
const mach_msg_type_t rightsCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_RECEIVE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -201,7 +200,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = do_mach_notify_port_destroyed(In0P->Head.msgh_request_port, In0P->rights); | |
+ OutP->RetCode = do_mach_notify_port_destroyed(In0P->Head.msgh_request_port, In0P->rights.name); | |
} | |
/* Default implementation of do_mach_notify_port_destroyed */ | |
@@ -368,14 +367,14 @@ | |
mig_routine_t notify_server_routines[] = { | |
0, | |
- _Xmach_notify_port_deleted, | |
- _Xmach_notify_msg_accepted, | |
+ _Xmach_notify_port_deleted, /* 65 */ | |
+ _Xmach_notify_msg_accepted, /* 66 */ | |
0, | |
0, | |
- _Xmach_notify_port_destroyed, | |
- _Xmach_notify_no_senders, | |
- _Xmach_notify_send_once, | |
- _Xmach_notify_dead_name, | |
+ _Xmach_notify_port_destroyed, /* 69 */ | |
+ _Xmach_notify_no_senders, /* 70 */ | |
+ _Xmach_notify_send_once, /* 71 */ | |
+ _Xmach_notify_dead_name, /* 72 */ | |
}; | |
mig_external boolean_t notify_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/startup/startupServer.c 2023-11-24 15:42:36.353162838 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/startup/startupServer.c 2023-11-22 01:44:11.065614830 -0500 | |
@@ -59,16 +59,13 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t taskType; | |
- mach_port_t task; | |
- char taskPad[4]; | |
+ mach_port_name_inlined_t task; | |
mach_msg_type_t excptType; | |
- mach_port_t excpt; | |
- char excptPad[4]; | |
+ mach_port_name_inlined_t excpt; | |
mach_msg_type_t nameType; | |
string_t name; | |
mach_msg_type_t credentialType; | |
- mach_port_t credential; | |
- char credentialPad[4]; | |
+ mach_port_name_inlined_t credential; | |
} Request; | |
typedef struct { | |
@@ -85,7 +82,7 @@ | |
const mach_msg_type_t taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -95,7 +92,7 @@ | |
const mach_msg_type_t excptCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_RECEIVE, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -115,7 +112,7 @@ | |
const mach_msg_type_t credentialCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -149,7 +146,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_startup_essential_task(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->task, In0P->excpt, In0P->name, In0P->credential); | |
+ OutP->RetCode = S_startup_essential_task(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->task.name, In0P->excpt.name, In0P->name, In0P->credential.name); | |
} | |
/* Default implementation of S_startup_essential_task */ | |
@@ -174,8 +171,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t notify_portType; | |
- mach_port_t notify_port; | |
- char notify_portPad[4]; | |
+ mach_port_name_inlined_t notify_port; | |
mach_msg_type_t nameType; | |
string_t name; | |
} Request; | |
@@ -194,7 +190,7 @@ | |
const mach_msg_type_t notify_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -228,7 +224,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_startup_request_notification(In0P->Head.msgh_request_port, In0P->notify_port, In0P->name); | |
+ OutP->RetCode = S_startup_request_notification(In0P->Head.msgh_request_port, In0P->notify_port.name, In0P->name); | |
} | |
/* Default implementation of S_startup_request_notification */ | |
@@ -249,8 +245,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t refportType; | |
- mach_port_t refport; | |
- char refportPad[4]; | |
+ mach_port_name_inlined_t refport; | |
mach_msg_type_t reboot_codeType; | |
int reboot_code; | |
char reboot_codePad[4]; | |
@@ -270,7 +265,7 @@ | |
const mach_msg_type_t refportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -304,7 +299,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_startup_reboot(In0P->Head.msgh_request_port, In0P->refport, In0P->reboot_code); | |
+ OutP->RetCode = S_startup_reboot(In0P->Head.msgh_request_port, In0P->refport.name, In0P->reboot_code); | |
} | |
/* Default implementation of S_startup_reboot */ | |
@@ -325,8 +320,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t startup_procType; | |
- process_t startup_proc; | |
- char startup_procPad[4]; | |
+ mach_port_name_inlined_t startup_proc; | |
} Request; | |
typedef struct { | |
@@ -335,17 +329,13 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t startup_taskType; | |
- mach_port_t startup_task; | |
- char startup_taskPad[4]; | |
+ mach_port_name_inlined_t startup_task; | |
mach_msg_type_t authType; | |
- auth_t auth; | |
- char authPad[4]; | |
+ mach_port_name_inlined_t auth; | |
mach_msg_type_t host_privType; | |
- mach_port_t host_priv; | |
- char host_privPad[4]; | |
+ mach_port_name_inlined_t host_priv; | |
mach_msg_type_t device_masterType; | |
- mach_port_t device_master; | |
- char device_masterPad[4]; | |
+ mach_port_name_inlined_t device_master; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -355,7 +345,7 @@ | |
const mach_msg_type_t startup_procCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -365,47 +355,47 @@ | |
const mach_msg_type_t startup_taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t authType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(auth_t) == 4 * 1, "expected auth_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t host_privType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t device_masterType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t host_privPoly; | |
mach_msg_type_name_t device_masterPoly; | |
@@ -421,7 +411,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_startup_procinit(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->startup_proc, &OutP->startup_task, &OutP->auth, &OutP->host_priv, &host_privPoly, &OutP->device_master, &device_masterPoly); | |
+ OutP->RetCode = S_startup_procinit(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->startup_proc.name, &OutP->startup_task.name, &OutP->auth.name, &OutP->host_priv.name, &host_privPoly, &OutP->device_master.name, &device_masterPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -466,8 +456,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t authType; | |
- mach_port_t auth; | |
- char authPad[4]; | |
+ mach_port_name_inlined_t auth; | |
} Request; | |
typedef struct { | |
@@ -476,8 +465,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t procType; | |
- mach_port_t proc; | |
- char procPad[4]; | |
+ mach_port_name_inlined_t proc; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -488,7 +476,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t authCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -498,14 +486,14 @@ | |
const mach_msg_type_t procType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t procPoly; | |
@@ -520,7 +508,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_startup_authinit(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->auth, &OutP->proc, &procPoly); | |
+ OutP->RetCode = S_startup_authinit(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->auth.name, &OutP->proc.name, &procPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -553,11 +541,11 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t startup_server_routines[] = { | |
- _Xstartup_essential_task, | |
- _Xstartup_request_notification, | |
- _Xstartup_reboot, | |
- _Xstartup_procinit, | |
- _Xstartup_authinit, | |
+ _Xstartup_essential_task, /* 29000 */ | |
+ _Xstartup_request_notification, /* 29001 */ | |
+ _Xstartup_reboot, /* 29002 */ | |
+ _Xstartup_procinit, /* 29003 */ | |
+ _Xstartup_authinit, /* 29004 */ | |
}; | |
mig_external boolean_t startup_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/startup/fsServer.c 2023-11-24 15:42:36.365162574 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/startup/fsServer.c 2023-11-22 01:44:11.049614670 -0500 | |
@@ -59,8 +59,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t exec_taskType; | |
- mach_port_t exec_task; | |
- char exec_taskPad[4]; | |
+ mach_port_name_inlined_t exec_task; | |
mach_msg_type_t flagsType; | |
int flags; | |
char flagsPad[4]; | |
@@ -76,12 +75,12 @@ | |
}; | |
mach_msg_type_long_t fdarrayType; | |
union { | |
- mach_port_t fdarray[512]; | |
+ mach_port_name_inlined_t fdarray[256]; | |
mach_port_t *fdarrayP; | |
}; | |
mach_msg_type_long_t portarrayType; | |
union { | |
- mach_port_t portarray[512]; | |
+ mach_port_name_inlined_t portarray[256]; | |
mach_port_t *portarrayP; | |
}; | |
mach_msg_type_long_t intarrayType; | |
@@ -124,7 +123,7 @@ | |
const mach_msg_type_t exec_taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -142,6 +141,9 @@ | |
.msgt_unused = 0 | |
}; | |
+ mach_port_t *fdarrayP; | |
+ mach_port_t *portarrayP; | |
+ | |
#if TypeCheck | |
msgh_size = In0P->Head.msgh_size; | |
if (mig_unlikely ((msgh_size < 120) || | |
@@ -194,11 +196,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In2P->fdarrayType.msgtl_header.msgt_longform != TRUE) || | |
(In2P->fdarrayType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In2P->fdarrayType.msgtl_size != 32))) | |
+ (In2P->fdarrayType.msgtl_size != 64 && In2P->fdarrayType.msgtl_header.msgt_inline == TRUE) || | |
+ (In2P->fdarrayType.msgtl_size != 32 && In2P->fdarrayType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In2P->fdarrayType.msgtl_header.msgt_inline) ? (4 * In2P->fdarrayType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In2P->fdarrayType.msgtl_header.msgt_inline) ? 8 * In2P->fdarrayType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 120 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -210,11 +213,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In3P->portarrayType.msgtl_header.msgt_longform != TRUE) || | |
(In3P->portarrayType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In3P->portarrayType.msgtl_size != 32))) | |
+ (In3P->portarrayType.msgtl_size != 64 && In3P->portarrayType.msgtl_header.msgt_inline == TRUE) || | |
+ (In3P->portarrayType.msgtl_size != 32 && In3P->portarrayType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In3P->portarrayType.msgtl_header.msgt_inline) ? (4 * In3P->portarrayType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In3P->portarrayType.msgtl_header.msgt_inline) ? 8 * In3P->portarrayType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 120 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -267,7 +271,27 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_file_exec(In0P->Head.msgh_request_port, In0P->exec_task, In0P->flags, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number, (In1P->envpType.msgtl_header.msgt_inline) ? In1P->envp : In1P->envpP, In1P->envpType.msgtl_number, (In2P->fdarrayType.msgtl_header.msgt_inline) ? In2P->fdarray : In2P->fdarrayP, In2P->fdarrayType.msgtl_number, (In3P->portarrayType.msgtl_header.msgt_inline) ? In3P->portarray : In3P->portarrayP, In3P->portarrayType.msgtl_number, (In4P->intarrayType.msgtl_header.msgt_inline) ? In4P->intarray : In4P->intarrayP, In4P->intarrayType.msgtl_number, (In5P->deallocnamesType.msgtl_header.msgt_inline) ? In5P->deallocnames : In5P->deallocnamesP, In5P->deallocnamesType.msgtl_number, (In6P->destroynamesType.msgtl_header.msgt_inline) ? In6P->destroynames : In6P->destroynamesP, In6P->destroynamesType.msgtl_number); | |
+ if (In2P->fdarrayType.msgtl_header.msgt_inline) { | |
+ fdarrayP = (mach_port_t *)In2P->fdarray; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In2P->fdarrayType.msgtl_number; i++) { | |
+ fdarrayP[i] = In2P->fdarray[i].name; | |
+ } | |
+ } else { | |
+ fdarrayP = In2P->fdarrayP; | |
+ } | |
+ if (In3P->portarrayType.msgtl_header.msgt_inline) { | |
+ portarrayP = (mach_port_t *)In3P->portarray; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In3P->portarrayType.msgtl_number; i++) { | |
+ portarrayP[i] = In3P->portarray[i].name; | |
+ } | |
+ } else { | |
+ portarrayP = In3P->portarrayP; | |
+ } | |
+ OutP->RetCode = S_file_exec(In0P->Head.msgh_request_port, In0P->exec_task.name, In0P->flags, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number, (In1P->envpType.msgtl_header.msgt_inline) ? In1P->envp : In1P->envpP, In1P->envpType.msgtl_number, fdarrayP, In2P->fdarrayType.msgtl_number, portarrayP, In3P->portarrayType.msgtl_number, (In4P->intarrayType.msgtl_header.msgt_inline) ? In4P->intarray : In4P->intarrayP, In4P->intarrayType.msgtl_number, (In5P->deallocnamesType.msgtl_header.msgt_inline) ? In5P->deallocnames : In5P->deallocnamesP, In5P->deallocnamesType.msgtl_number, (In6P->destroynamesType.msgtl_header.msgt_inline) ? In6P->destroynames : In6P->destroynamesP, In6P->destroynamesType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In6P->destroynamesType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In6P->destroynamesP, 4 * In6P->destroynamesType.msgtl_number); | |
@@ -892,8 +916,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -910,7 +933,7 @@ | |
const mach_msg_type_t portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -929,7 +952,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_file_notice_changes(In0P->Head.msgh_request_port, In0P->port); | |
+ OutP->RetCode = S_file_notice_changes(In0P->Head.msgh_request_port, In0P->port.name); | |
} | |
/* Default implementation of S_file_notice_changes */ | |
@@ -956,8 +979,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t controlType; | |
- mach_port_t control; | |
- char controlPad[4]; | |
+ mach_port_name_inlined_t control; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -968,14 +990,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t controlType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t controlPoly; | |
@@ -985,7 +1007,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_file_getcontrol(In0P->Head.msgh_request_port, &OutP->control, &controlPoly); | |
+ OutP->RetCode = S_file_getcontrol(In0P->Head.msgh_request_port, &OutP->control.name, &controlPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1239,7 +1261,7 @@ | |
char RetCodePad[4]; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t intsType; | |
@@ -1271,8 +1293,8 @@ | |
const mach_msg_type_long_t portsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -1337,7 +1359,7 @@ | |
#endif /* TypeCheck */ | |
portsP = OutP->ports; | |
- portsCnt = 512; | |
+ portsCnt = 256; | |
intsP = ints; | |
intsCnt = 512; | |
@@ -1358,8 +1380,19 @@ | |
if (portsP != OutP->ports) { | |
OutP->portsType.msgtl_header.msgt_inline = FALSE; | |
OutP->portsType.msgtl_header.msgt_deallocate = TRUE; | |
+ OutP->portsType.msgtl_header.msgt_size = 32; | |
OutP->portsP = portsP; | |
msgh_simple = FALSE; | |
+ } else { | |
+ /* Resize mach_port_name_t array into mach_port_name_inlined_t. */ | |
+ /* Work in reverse order to avoid overriding subsequent entries. */ | |
+ mach_msg_type_number_t i; | |
+ for(i = portsCnt; i > 0; i--) { | |
+ mach_port_name_t tmp_port_name = portsP[i - 1]; | |
+ /* Clear the whole message with zeros. */ | |
+ OutP->ports[i - 1].kernel_port_do_not_use = 0; | |
+ OutP->ports[i - 1].name = tmp_port_name; | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(portsPoly)) | |
@@ -1368,7 +1401,7 @@ | |
OutP->portsType.msgtl_name = portsPoly; | |
OutP->portsType.msgtl_number = portsCnt; | |
- msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? (4 * portsCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? 8 * portsCnt : sizeof(mach_port_t *); | |
msgh_size = 80 + msgh_size_delta; | |
OutP = (Reply *) ((char *) OutP + msgh_size_delta - 2048); | |
@@ -1381,8 +1414,9 @@ | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (intsCnt) | |
+ if (intsCnt) { | |
memcpy(OutP->ints, ints, 4 * intsCnt); | |
+ } | |
} | |
OutP->intsType.msgtl_number = intsCnt; | |
@@ -1399,8 +1433,9 @@ | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (offsetsCnt) | |
+ if (offsetsCnt) { | |
memcpy(OutP->offsets, offsets, 8 * offsetsCnt); | |
+ } | |
} | |
OutP->offsetsType.msgtl_number = offsetsCnt; | |
@@ -1417,8 +1452,9 @@ | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (dataCnt) | |
+ if (dataCnt) { | |
memcpy(OutP->data, data, dataCnt); | |
+ } | |
} | |
OutP->dataType.msgtl_number = dataCnt; | |
@@ -1462,8 +1498,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t linknodeType; | |
- mach_port_t linknode; | |
- char linknodePad[4]; | |
+ mach_port_name_inlined_t linknode; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1474,14 +1509,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t linknodeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t linknodePoly; | |
@@ -1491,7 +1526,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_file_getlinknode(In0P->Head.msgh_request_port, &OutP->linknode, &linknodePoly); | |
+ OutP->RetCode = S_file_getlinknode(In0P->Head.msgh_request_port, &OutP->linknode.name, &linknodePoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -1630,8 +1665,7 @@ | |
mach_msg_type_t retry_nameType; | |
string_t retry_name; | |
mach_msg_type_t resultType; | |
- mach_port_t result; | |
- char resultPad[4]; | |
+ mach_port_name_inlined_t result; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -1694,14 +1728,14 @@ | |
const mach_msg_type_t resultType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t resultPoly; | |
@@ -1726,7 +1760,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_dir_lookup(In0P->Head.msgh_request_port, In0P->file_name, In0P->flags, In0P->mode, &OutP->do_retry, OutP->retry_name, &OutP->result, &resultPoly); | |
+ OutP->RetCode = S_dir_lookup(In0P->Head.msgh_request_port, In0P->file_name, In0P->flags, In0P->mode, &OutP->do_retry, OutP->retry_name, &OutP->result.name, &resultPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2124,8 +2158,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t fileType; | |
- file_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
mach_msg_type_t nameType; | |
string_t name; | |
mach_msg_type_t exclType; | |
@@ -2147,7 +2180,7 @@ | |
const mach_msg_type_t fileCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2196,7 +2229,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_dir_link(In0P->Head.msgh_request_port, In0P->file, In0P->name, In0P->excl); | |
+ OutP->RetCode = S_dir_link(In0P->Head.msgh_request_port, In0P->file.name, In0P->name, In0P->excl); | |
} | |
/* Default implementation of S_dir_link */ | |
@@ -2220,8 +2253,7 @@ | |
mach_msg_type_t oldnameType; | |
string_t oldname; | |
mach_msg_type_t newdirectoryType; | |
- file_t newdirectory; | |
- char newdirectoryPad[4]; | |
+ mach_port_name_inlined_t newdirectory; | |
mach_msg_type_t newnameType; | |
string_t newname; | |
mach_msg_type_t exclType; | |
@@ -2253,7 +2285,7 @@ | |
const mach_msg_type_t newdirectoryCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2307,7 +2339,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_dir_rename(In0P->Head.msgh_request_port, In0P->oldname, In0P->newdirectory, In0P->newname, In0P->excl); | |
+ OutP->RetCode = S_dir_rename(In0P->Head.msgh_request_port, In0P->oldname, In0P->newdirectory.name, In0P->newname, In0P->excl); | |
} | |
/* Default implementation of S_dir_rename */ | |
@@ -2343,8 +2375,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t newnodeType; | |
- mach_port_t newnode; | |
- char newnodePad[4]; | |
+ mach_port_name_inlined_t newnode; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -2375,14 +2406,14 @@ | |
const mach_msg_type_t newnodeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t newnodePoly; | |
@@ -2402,7 +2433,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_dir_mkfile(In0P->Head.msgh_request_port, In0P->flags, In0P->mode, &OutP->newnode, &newnodePoly); | |
+ OutP->RetCode = S_dir_mkfile(In0P->Head.msgh_request_port, In0P->flags, In0P->mode, &OutP->newnode.name, &newnodePoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2440,8 +2471,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -2458,7 +2488,7 @@ | |
const mach_msg_type_t portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2477,7 +2507,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_dir_notice_changes(In0P->Head.msgh_request_port, In0P->port); | |
+ OutP->RetCode = S_dir_notice_changes(In0P->Head.msgh_request_port, In0P->port.name); | |
} | |
/* Default implementation of S_dir_notice_changes */ | |
@@ -2511,8 +2541,7 @@ | |
char *passiveP; | |
}; | |
mach_msg_type_t activeType; | |
- mach_port_t active; | |
- char activePad[4]; | |
+ mach_port_name_inlined_t active; | |
} Request; | |
typedef struct { | |
@@ -2563,7 +2592,7 @@ | |
const mach_msg_type_t activeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2613,7 +2642,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_file_set_translator(In0P->Head.msgh_request_port, In0P->passive_flags, In0P->active_flags, In0P->oldtrans_flags, (In0P->passiveType.msgtl_header.msgt_inline) ? In0P->passive : In0P->passiveP, In0P->passiveType.msgtl_number, In1P->active); | |
+ OutP->RetCode = S_file_set_translator(In0P->Head.msgh_request_port, In0P->passive_flags, In0P->active_flags, In0P->oldtrans_flags, (In0P->passiveType.msgtl_header.msgt_inline) ? In0P->passive : In0P->passiveP, In0P->passiveType.msgtl_number, In1P->active.name); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In0P->passiveType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In0P->passiveP, In0P->passiveType.msgtl_number); | |
@@ -2731,8 +2760,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t translator_cntlType; | |
- mach_port_t translator_cntl; | |
- char translator_cntlPad[4]; | |
+ mach_port_name_inlined_t translator_cntl; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -2743,14 +2771,14 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t translator_cntlType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t translator_cntlPoly; | |
@@ -2760,7 +2788,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_file_get_translator_cntl(In0P->Head.msgh_request_port, &OutP->translator_cntl, &translator_cntlPoly); | |
+ OutP->RetCode = S_file_get_translator_cntl(In0P->Head.msgh_request_port, &OutP->translator_cntl.name, &translator_cntlPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2879,8 +2907,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t parentType; | |
- mach_port_t parent; | |
- char parentPad[4]; | |
+ mach_port_name_inlined_t parent; | |
} Request; | |
typedef struct { | |
@@ -2889,8 +2916,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t new_fileType; | |
- mach_port_t new_file; | |
- char new_filePad[4]; | |
+ mach_port_name_inlined_t new_file; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -2901,7 +2927,7 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t parentCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2911,14 +2937,14 @@ | |
const mach_msg_type_t new_fileType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t new_filePoly; | |
@@ -2933,7 +2959,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_file_reparent(In0P->Head.msgh_request_port, In0P->parent, &OutP->new_file, &new_filePoly); | |
+ OutP->RetCode = S_file_reparent(In0P->Head.msgh_request_port, In0P->parent.name, &OutP->new_file.name, &new_filePoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -2970,8 +2996,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t exec_taskType; | |
- mach_port_t exec_task; | |
- char exec_taskPad[4]; | |
+ mach_port_name_inlined_t exec_task; | |
mach_msg_type_t flagsType; | |
int flags; | |
char flagsPad[4]; | |
@@ -2991,12 +3016,12 @@ | |
}; | |
mach_msg_type_long_t fdarrayType; | |
union { | |
- mach_port_t fdarray[512]; | |
+ mach_port_name_inlined_t fdarray[256]; | |
mach_port_t *fdarrayP; | |
}; | |
mach_msg_type_long_t portarrayType; | |
union { | |
- mach_port_t portarray[512]; | |
+ mach_port_name_inlined_t portarray[256]; | |
mach_port_t *portarrayP; | |
}; | |
mach_msg_type_long_t intarrayType; | |
@@ -3039,7 +3064,7 @@ | |
const mach_msg_type_t exec_taskCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -3077,6 +3102,9 @@ | |
.msgt_unused = 0 | |
}; | |
+ mach_port_t *fdarrayP; | |
+ mach_port_t *portarrayP; | |
+ | |
#if TypeCheck | |
msgh_size = In0P->Head.msgh_size; | |
if (mig_unlikely ((msgh_size < 2184) || | |
@@ -3139,11 +3167,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In2P->fdarrayType.msgtl_header.msgt_longform != TRUE) || | |
(In2P->fdarrayType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In2P->fdarrayType.msgtl_size != 32))) | |
+ (In2P->fdarrayType.msgtl_size != 64 && In2P->fdarrayType.msgtl_header.msgt_inline == TRUE) || | |
+ (In2P->fdarrayType.msgtl_size != 32 && In2P->fdarrayType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In2P->fdarrayType.msgtl_header.msgt_inline) ? (4 * In2P->fdarrayType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In2P->fdarrayType.msgtl_header.msgt_inline) ? 8 * In2P->fdarrayType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 2184 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -3155,11 +3184,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((In3P->portarrayType.msgtl_header.msgt_longform != TRUE) || | |
(In3P->portarrayType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (In3P->portarrayType.msgtl_size != 32))) | |
+ (In3P->portarrayType.msgtl_size != 64 && In3P->portarrayType.msgtl_header.msgt_inline == TRUE) || | |
+ (In3P->portarrayType.msgtl_size != 32 && In3P->portarrayType.msgtl_header.msgt_inline == FALSE))) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (In3P->portarrayType.msgtl_header.msgt_inline) ? (4 * In3P->portarrayType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (In3P->portarrayType.msgtl_header.msgt_inline) ? 8 * In3P->portarrayType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 2184 + msgh_size_delta)) | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
@@ -3212,7 +3242,27 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_file_exec_paths(In0P->Head.msgh_request_port, In0P->exec_task, In0P->flags, In0P->path, In0P->abspath, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number, (In1P->envpType.msgtl_header.msgt_inline) ? In1P->envp : In1P->envpP, In1P->envpType.msgtl_number, (In2P->fdarrayType.msgtl_header.msgt_inline) ? In2P->fdarray : In2P->fdarrayP, In2P->fdarrayType.msgtl_number, (In3P->portarrayType.msgtl_header.msgt_inline) ? In3P->portarray : In3P->portarrayP, In3P->portarrayType.msgtl_number, (In4P->intarrayType.msgtl_header.msgt_inline) ? In4P->intarray : In4P->intarrayP, In4P->intarrayType.msgtl_number, (In5P->deallocnamesType.msgtl_header.msgt_inline) ? In5P->deallocnames : In5P->deallocnamesP, In5P->deallocnamesType.msgtl_number, (In6P->destroynamesType.msgtl_header.msgt_inline) ? In6P->destroynames : In6P->destroynamesP, In6P->destroynamesType.msgtl_number); | |
+ if (In2P->fdarrayType.msgtl_header.msgt_inline) { | |
+ fdarrayP = (mach_port_t *)In2P->fdarray; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In2P->fdarrayType.msgtl_number; i++) { | |
+ fdarrayP[i] = In2P->fdarray[i].name; | |
+ } | |
+ } else { | |
+ fdarrayP = In2P->fdarrayP; | |
+ } | |
+ if (In3P->portarrayType.msgtl_header.msgt_inline) { | |
+ portarrayP = (mach_port_t *)In3P->portarray; | |
+ mach_msg_type_number_t i; | |
+ /* Resizes the mach_port_name_inlined_t input array as an array of mach_port_name_t. */ | |
+ for (i = 1; i < In3P->portarrayType.msgtl_number; i++) { | |
+ portarrayP[i] = In3P->portarray[i].name; | |
+ } | |
+ } else { | |
+ portarrayP = In3P->portarrayP; | |
+ } | |
+ OutP->RetCode = S_file_exec_paths(In0P->Head.msgh_request_port, In0P->exec_task.name, In0P->flags, In0P->path, In0P->abspath, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number, (In1P->envpType.msgtl_header.msgt_inline) ? In1P->envp : In1P->envpP, In1P->envpType.msgtl_number, fdarrayP, In2P->fdarrayType.msgtl_number, portarrayP, In3P->portarrayType.msgtl_number, (In4P->intarrayType.msgtl_header.msgt_inline) ? In4P->intarray : In4P->intarrayP, In4P->intarrayType.msgtl_number, (In5P->deallocnamesType.msgtl_header.msgt_inline) ? In5P->deallocnames : In5P->deallocnamesP, In5P->deallocnamesType.msgtl_number, (In6P->destroynamesType.msgtl_header.msgt_inline) ? In6P->destroynames : In6P->destroynamesP, In6P->destroynamesType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In6P->destroynamesType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In6P->destroynamesP, 4 * In6P->destroynamesType.msgtl_number); | |
@@ -3349,8 +3399,7 @@ | |
mach_msg_type_t flock64Type; | |
flock_t flock64; | |
mach_msg_type_t rendezvousType; | |
- mach_port_t rendezvous; | |
- char rendezvousPad[4]; | |
+ mach_port_name_inlined_t rendezvous; | |
} Request; | |
typedef struct { | |
@@ -3389,7 +3438,7 @@ | |
const mach_msg_type_t rendezvousCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -3429,7 +3478,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_file_record_lock(In0P->Head.msgh_request_port, In0P->cmd, &In0P->flock64, In0P->rendezvous); | |
+ OutP->RetCode = S_file_record_lock(In0P->Head.msgh_request_port, In0P->cmd, &In0P->flock64, In0P->rendezvous.name); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -3453,43 +3502,43 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t fs_server_routines[] = { | |
- _Xfile_exec, | |
- _Xfile_chown, | |
- _Xfile_chauthor, | |
- _Xfile_chmod, | |
- _Xfile_chflags, | |
- _Xfile_utimes, | |
- _Xfile_set_size, | |
- _Xfile_lock, | |
- _Xfile_lock_stat, | |
- _Xfile_check_access, | |
- _Xfile_notice_changes, | |
- _Xfile_getcontrol, | |
- _Xfile_statfs, | |
- _Xfile_sync, | |
- _Xfile_syncfs, | |
- _Xfile_get_storage_info, | |
- _Xfile_getlinknode, | |
- _Xfile_getfh, | |
- _Xdir_lookup, | |
- _Xdir_readdir, | |
- _Xdir_mkdir, | |
- _Xdir_rmdir, | |
- _Xdir_unlink, | |
- _Xdir_link, | |
- _Xdir_rename, | |
- _Xdir_mkfile, | |
- _Xdir_notice_changes, | |
- _Xfile_set_translator, | |
- _Xfile_get_translator, | |
- _Xfile_get_translator_cntl, | |
- _Xfile_get_fs_options, | |
- _Xfile_reparent, | |
+ _Xfile_exec, /* 20000 */ | |
+ _Xfile_chown, /* 20001 */ | |
+ _Xfile_chauthor, /* 20002 */ | |
+ _Xfile_chmod, /* 20003 */ | |
+ _Xfile_chflags, /* 20004 */ | |
+ _Xfile_utimes, /* 20005 */ | |
+ _Xfile_set_size, /* 20006 */ | |
+ _Xfile_lock, /* 20007 */ | |
+ _Xfile_lock_stat, /* 20008 */ | |
+ _Xfile_check_access, /* 20009 */ | |
+ _Xfile_notice_changes, /* 20010 */ | |
+ _Xfile_getcontrol, /* 20011 */ | |
+ _Xfile_statfs, /* 20012 */ | |
+ _Xfile_sync, /* 20013 */ | |
+ _Xfile_syncfs, /* 20014 */ | |
+ _Xfile_get_storage_info, /* 20015 */ | |
+ _Xfile_getlinknode, /* 20016 */ | |
+ _Xfile_getfh, /* 20017 */ | |
+ _Xdir_lookup, /* 20018 */ | |
+ _Xdir_readdir, /* 20019 */ | |
+ _Xdir_mkdir, /* 20020 */ | |
+ _Xdir_rmdir, /* 20021 */ | |
+ _Xdir_unlink, /* 20022 */ | |
+ _Xdir_link, /* 20023 */ | |
+ _Xdir_rename, /* 20024 */ | |
+ _Xdir_mkfile, /* 20025 */ | |
+ _Xdir_notice_changes, /* 20026 */ | |
+ _Xfile_set_translator, /* 20027 */ | |
+ _Xfile_get_translator, /* 20028 */ | |
+ _Xfile_get_translator_cntl, /* 20029 */ | |
+ _Xfile_get_fs_options, /* 20030 */ | |
+ _Xfile_reparent, /* 20031 */ | |
0, | |
0, | |
- _Xfile_exec_paths, | |
- _Xfile_utimens, | |
- _Xfile_record_lock, | |
+ _Xfile_exec_paths, /* 20034 */ | |
+ _Xfile_utimens, /* 20035 */ | |
+ _Xfile_record_lock, /* 20036 */ | |
}; | |
mig_external boolean_t fs_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/startup/fsysServer.c 2023-11-24 15:42:36.349162927 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/startup/fsysServer.c 2023-11-22 01:44:11.049614670 -0500 | |
@@ -62,8 +62,7 @@ | |
int openflags; | |
char openflagsPad[4]; | |
mach_msg_type_t control_portType; | |
- mach_port_t control_port; | |
- char control_portPad[4]; | |
+ mach_port_name_inlined_t control_port; | |
} Request; | |
typedef struct { | |
@@ -72,8 +71,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t realnodeType; | |
- mach_port_t realnode; | |
- char realnodePad[4]; | |
+ mach_port_name_inlined_t realnode; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -94,7 +92,7 @@ | |
const mach_msg_type_t control_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -104,14 +102,14 @@ | |
const mach_msg_type_t realnodeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t realnodePoly; | |
@@ -131,7 +129,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_fsys_startup(In0P->Head.msgh_request_port, In0P->openflags, In0P->control_port, &OutP->realnode, &realnodePoly); | |
+ OutP->RetCode = S_fsys_startup(In0P->Head.msgh_request_port, In0P->openflags, In0P->control_port.name, &OutP->realnode.name, &realnodePoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -226,8 +224,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t dotdot_nodeType; | |
- mach_port_t dotdot_node; | |
- char dotdot_nodePad[4]; | |
+ mach_port_name_inlined_t dotdot_node; | |
mach_msg_type_long_t gen_uidsType; | |
union { | |
uid_t gen_uids[512]; | |
@@ -254,8 +251,7 @@ | |
mach_msg_type_t retry_nameType; | |
string_t retry_name; | |
mach_msg_type_t fileType; | |
- mach_port_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -271,7 +267,7 @@ | |
const mach_msg_type_t dotdot_nodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -313,14 +309,14 @@ | |
const mach_msg_type_t fileType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t filePoly; | |
@@ -372,7 +368,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_fsys_getroot(In0P->Head.msgh_request_port, In0P->dotdot_node, (In0P->gen_uidsType.msgtl_header.msgt_inline) ? In0P->gen_uids : In0P->gen_uidsP, In0P->gen_uidsType.msgtl_number, (In1P->gen_gidsType.msgtl_header.msgt_inline) ? In1P->gen_gids : In1P->gen_gidsP, In1P->gen_gidsType.msgtl_number, In2P->flags, &OutP->do_retry, OutP->retry_name, &OutP->file, &filePoly); | |
+ OutP->RetCode = S_fsys_getroot(In0P->Head.msgh_request_port, In0P->dotdot_node.name, (In0P->gen_uidsType.msgtl_header.msgt_inline) ? In0P->gen_uids : In0P->gen_uidsP, In0P->gen_uidsType.msgtl_number, (In1P->gen_gidsType.msgtl_header.msgt_inline) ? In1P->gen_gids : In1P->gen_gidsP, In1P->gen_gidsType.msgtl_number, In2P->flags, &OutP->do_retry, OutP->retry_name, &OutP->file.name, &filePoly); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In1P->gen_gidsType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In1P->gen_gidsP, 4 * In1P->gen_gidsType.msgtl_number); | |
@@ -448,8 +444,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t fileType; | |
- mach_port_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -465,14 +460,14 @@ | |
const mach_msg_type_t fileType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t filePoly; | |
@@ -527,7 +522,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_fsys_getfile(In0P->Head.msgh_request_port, (In0P->gen_uidsType.msgtl_header.msgt_inline) ? In0P->gen_uids : In0P->gen_uidsP, In0P->gen_uidsType.msgtl_number, (In1P->gen_gidsType.msgtl_header.msgt_inline) ? In1P->gen_gids : In1P->gen_gidsP, In1P->gen_gidsType.msgtl_number, (In2P->filehandleType.msgtl_header.msgt_inline) ? In2P->filehandle : In2P->filehandleP, In2P->filehandleType.msgtl_number, &OutP->file, &filePoly); | |
+ OutP->RetCode = S_fsys_getfile(In0P->Head.msgh_request_port, (In0P->gen_uidsType.msgtl_header.msgt_inline) ? In0P->gen_uids : In0P->gen_uidsP, In0P->gen_uidsType.msgtl_number, (In1P->gen_gidsType.msgtl_header.msgt_inline) ? In1P->gen_gids : In1P->gen_gidsP, In1P->gen_gidsType.msgtl_number, (In2P->filehandleType.msgtl_header.msgt_inline) ? In2P->filehandle : In2P->filehandleP, In2P->filehandleType.msgtl_number, &OutP->file.name, &filePoly); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In2P->filehandleType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In2P->filehandleP, In2P->filehandleType.msgtl_number); | |
@@ -752,14 +747,11 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t host_privType; | |
- mach_port_t host_priv; | |
- char host_privPad[4]; | |
+ mach_port_name_inlined_t host_priv; | |
mach_msg_type_t device_masterType; | |
- mach_port_t device_master; | |
- char device_masterPad[4]; | |
+ mach_port_name_inlined_t device_master; | |
mach_msg_type_t fstaskType; | |
- mach_port_t fstask; | |
- char fstaskPad[4]; | |
+ mach_port_name_inlined_t fstask; | |
} Reply; | |
Request *In0P = (Request *) InHeadP; | |
@@ -770,36 +762,36 @@ | |
boolean_t msgh_simple = msgh_simple; | |
const mach_msg_type_t host_privType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t device_masterType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t fstaskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
mach_msg_type_name_t host_privPoly; | |
mach_msg_type_name_t device_masterPoly; | |
@@ -811,7 +803,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_fsys_getpriv(In0P->Head.msgh_request_port, &OutP->host_priv, &host_privPoly, &OutP->device_master, &device_masterPoly, &OutP->fstask, &fstaskPoly); | |
+ OutP->RetCode = S_fsys_getpriv(In0P->Head.msgh_request_port, &OutP->host_priv.name, &host_privPoly, &OutP->device_master.name, &device_masterPoly, &OutP->fstask.name, &fstaskPoly); | |
if (OutP->RetCode != KERN_SUCCESS) | |
return; | |
@@ -865,11 +857,9 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t proc_serverType; | |
- mach_port_t proc_server; | |
- char proc_serverPad[4]; | |
+ mach_port_name_inlined_t proc_server; | |
mach_msg_type_t auth_handleType; | |
- auth_t auth_handle; | |
- char auth_handlePad[4]; | |
+ mach_port_name_inlined_t auth_handle; | |
} Request; | |
typedef struct { | |
@@ -886,7 +876,7 @@ | |
const mach_msg_type_t proc_serverCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -896,7 +886,7 @@ | |
const mach_msg_type_t auth_handleCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -920,7 +910,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_fsys_init(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->proc_server, In0P->auth_handle); | |
+ OutP->RetCode = S_fsys_init(In0P->Head.msgh_request_port, In0P->Head.msgh_reply_port, MACH_MSGH_BITS_REPLY(In0P->Head.msgh_bits), In0P->proc_server.name, In0P->auth_handle.name); | |
} | |
/* Default implementation of S_fsys_init */ | |
@@ -943,8 +933,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t requestorType; | |
- mach_port_t requestor; | |
- char requestorPad[4]; | |
+ mach_port_name_inlined_t requestor; | |
mach_msg_type_long_t argvType; | |
union { | |
char argv[2048]; | |
@@ -968,7 +957,7 @@ | |
const mach_msg_type_t requestorCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1000,7 +989,7 @@ | |
{ OutP->RetCode = MIG_BAD_ARGUMENTS; return; } | |
#endif /* TypeCheck */ | |
- OutP->RetCode = S_fsys_forward(In0P->Head.msgh_request_port, In0P->requestor, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number); | |
+ OutP->RetCode = S_fsys_forward(In0P->Head.msgh_request_port, In0P->requestor.name, (In0P->argvType.msgtl_header.msgt_inline) ? In0P->argv : In0P->argvP, In0P->argvType.msgtl_number); | |
if (OutP->RetCode == KERN_SUCCESS) | |
if (!In0P->argvType.msgtl_header.msgt_inline) | |
__mig_deallocate((vm_offset_t) In0P->argvP, In0P->argvType.msgtl_number); | |
@@ -1121,7 +1110,7 @@ | |
}; | |
mach_msg_type_long_t controlsType; | |
union { | |
- mach_port_t controls[512]; | |
+ mach_port_name_inlined_t controls[256]; | |
mach_port_t *controlsP; | |
}; | |
} Reply; | |
@@ -1150,8 +1139,8 @@ | |
const mach_msg_type_long_t controlsType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -1160,7 +1149,7 @@ | |
}; | |
mach_msg_type_number_t namesCnt; | |
- mach_port_t controls[512]; | |
+ mach_port_t controls[256]; | |
mach_msg_type_name_t controlsPoly; | |
mach_msg_type_number_t controlsCnt; | |
@@ -1177,7 +1166,7 @@ | |
namesCnt = 2048; | |
controlsP = controls; | |
- controlsCnt = 512; | |
+ controlsCnt = 256; | |
OutP->RetCode = S_fsys_get_children(In0P->Head.msgh_request_port, &namesP, &namesCnt, &controlsP, &controlsPoly, &controlsCnt); | |
if (OutP->RetCode != KERN_SUCCESS) | |
@@ -1201,12 +1190,20 @@ | |
if (controlsP != controls) { | |
OutP->controlsType.msgtl_header.msgt_inline = FALSE; | |
+ OutP->controlsType.msgtl_header.msgt_size = 32; | |
OutP->controlsP = controlsP; | |
msgh_simple = FALSE; | |
} | |
else { | |
- if (controlsCnt) | |
- memcpy(OutP->controls, controls, 4 * controlsCnt); | |
+ if (controlsCnt) { | |
+ /* Copy array of mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_msg_type_number_t i; | |
+ for(i = 0; i < controlsCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ OutP->controls[i].kernel_port_do_not_use = 0; | |
+ OutP->controls[i].name = controls[i]; | |
+ } | |
+ } | |
} | |
if (MACH_MSG_TYPE_PORT_ANY(controlsPoly)) | |
@@ -1215,7 +1212,7 @@ | |
OutP->controlsType.msgtl_name = controlsPoly; | |
OutP->controlsType.msgtl_number = controlsCnt; | |
- msgh_size += (OutP->controlsType.msgtl_header.msgt_inline) ? (4 * controlsCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size += (OutP->controlsType.msgtl_header.msgt_inline) ? 8 * controlsCnt : sizeof(mach_port_t *); | |
OutP = (Reply *) OutHeadP; | |
if (!msgh_simple) | |
@@ -1296,18 +1293,18 @@ | |
#endif /* MIG_EOPNOTSUPP */ | |
mig_routine_t fsys_server_routines[] = { | |
- _Xfsys_startup, | |
- _Xfsys_goaway, | |
- _Xfsys_getroot, | |
- _Xfsys_getfile, | |
- _Xfsys_syncfs, | |
- _Xfsys_set_options, | |
- _Xfsys_getpriv, | |
- _Xfsys_init, | |
- _Xfsys_forward, | |
- _Xfsys_get_options, | |
- _Xfsys_get_children, | |
- _Xfsys_get_source, | |
+ _Xfsys_startup, /* 22000 */ | |
+ _Xfsys_goaway, /* 22001 */ | |
+ _Xfsys_getroot, /* 22002 */ | |
+ _Xfsys_getfile, /* 22003 */ | |
+ _Xfsys_syncfs, /* 22004 */ | |
+ _Xfsys_set_options, /* 22005 */ | |
+ _Xfsys_getpriv, /* 22006 */ | |
+ _Xfsys_init, /* 22007 */ | |
+ _Xfsys_forward, /* 22008 */ | |
+ _Xfsys_get_options, /* 22009 */ | |
+ _Xfsys_get_children, /* 22010 */ | |
+ _Xfsys_get_source, /* 22011 */ | |
}; | |
mig_external boolean_t fsys_server | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libfshelp-tests/ioUser.c 2023-11-24 15:42:38.529114922 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libfshelp-tests/ioUser.c 2023-11-22 01:44:13.009634317 -0500 | |
@@ -359,14 +359,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->dataType.msgtl_header.msgt_inline) | |
- *data = OutP->dataP; | |
+ *data = OutP->dataP; | |
else if (OutP->dataType.msgtl_number > *dataCnt) { | |
- __mig_allocate((vm_offset_t *)data, | |
- OutP->dataType.msgtl_number); | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
else if (OutP->dataType.msgtl_number) { | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
*dataCnt = OutP->dataType.msgtl_number; | |
@@ -1039,8 +1038,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t notify_portType; | |
- mach_port_t notify_port; | |
- char notify_portPad[4]; | |
+ mach_port_name_inlined_t notify_port; | |
} Request; | |
typedef struct { | |
@@ -1049,8 +1047,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t async_id_portType; | |
- mach_port_t async_id_port; | |
- char async_id_portPad[4]; | |
+ mach_port_name_inlined_t async_id_port; | |
} Reply; | |
union { | |
@@ -1069,14 +1066,14 @@ | |
const mach_msg_type_t notify_portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -1090,7 +1087,7 @@ | |
const mach_msg_type_t async_id_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1100,7 +1097,7 @@ | |
InP->notify_portType = notify_portType; | |
- InP->notify_port = notify_port; | |
+ InP->notify_port.name = notify_port; | |
if (MACH_MSG_TYPE_PORT_ANY(notify_portPoly)) | |
msgh_simple = FALSE; | |
@@ -1160,7 +1157,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *async_id_port = OutP->async_id_port; | |
+ *async_id_port = OutP->async_id_port.name; | |
return KERN_SUCCESS; | |
} | |
@@ -1388,8 +1385,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t icky_async_id_portType; | |
- mach_port_t icky_async_id_port; | |
- char icky_async_id_portPad[4]; | |
+ mach_port_name_inlined_t icky_async_id_port; | |
} Reply; | |
union { | |
@@ -1420,7 +1416,7 @@ | |
const mach_msg_type_t icky_async_id_portCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1479,7 +1475,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *icky_async_id_port = OutP->icky_async_id_port; | |
+ *icky_async_id_port = OutP->icky_async_id_port.name; | |
return KERN_SUCCESS; | |
} | |
@@ -1730,8 +1726,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t rendezvous2Type; | |
- mach_port_t rendezvous2; | |
- char rendezvous2Pad[4]; | |
+ mach_port_name_inlined_t rendezvous2; | |
} Request; | |
union { | |
@@ -1744,18 +1739,18 @@ | |
const mach_msg_type_t rendezvous2Type = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
InP->rendezvous2Type = rendezvous2Type; | |
- InP->rendezvous2 = rendezvous2; | |
+ InP->rendezvous2.name = rendezvous2; | |
if (MACH_MSG_TYPE_PORT_ANY(rendezvous2Poly)) | |
msgh_simple = FALSE; | |
@@ -1809,8 +1804,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t new_objectType; | |
- mach_port_t new_object; | |
- char new_objectPad[4]; | |
+ mach_port_name_inlined_t new_object; | |
} Reply; | |
union { | |
@@ -1862,7 +1856,7 @@ | |
const mach_msg_type_t new_objectCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1953,7 +1947,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *new_object = OutP->new_object; | |
+ *new_object = OutP->new_object.name; | |
return KERN_SUCCESS; | |
} | |
@@ -1975,8 +1969,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t newportType; | |
- mach_port_t newport; | |
- char newportPad[4]; | |
+ mach_port_name_inlined_t newport; | |
} Reply; | |
union { | |
@@ -2007,7 +2000,7 @@ | |
const mach_msg_type_t newportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2066,7 +2059,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *newport = OutP->newport; | |
+ *newport = OutP->newport.name; | |
return KERN_SUCCESS; | |
} | |
@@ -2260,11 +2253,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t memobjrdType; | |
- mach_port_t memobjrd; | |
- char memobjrdPad[4]; | |
+ mach_port_name_inlined_t memobjrd; | |
mach_msg_type_t memobjwtType; | |
- mach_port_t memobjwt; | |
- char memobjwtPad[4]; | |
+ mach_port_name_inlined_t memobjwt; | |
} Reply; | |
union { | |
@@ -2295,7 +2286,7 @@ | |
const mach_msg_type_t memobjrdCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2305,7 +2296,7 @@ | |
const mach_msg_type_t memobjwtCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2364,14 +2355,14 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *memobjrd = OutP->memobjrd; | |
+ *memobjrd = OutP->memobjrd.name; | |
#if TypeCheck | |
if (BAD_TYPECHECK (&OutP->memobjwtType, &memobjwtCheck)) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *memobjwt = OutP->memobjwt; | |
+ *memobjwt = OutP->memobjwt.name; | |
return KERN_SUCCESS; | |
} | |
@@ -2393,8 +2384,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t memobjType; | |
- mach_port_t memobj; | |
- char memobjPad[4]; | |
+ mach_port_name_inlined_t memobj; | |
} Reply; | |
union { | |
@@ -2425,7 +2415,7 @@ | |
const mach_msg_type_t memobjCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2484,7 +2474,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *memobj = OutP->memobj; | |
+ *memobj = OutP->memobj.name; | |
return KERN_SUCCESS; | |
} | |
@@ -3332,11 +3322,9 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t idportType; | |
- mach_port_t idport; | |
- char idportPad[4]; | |
+ mach_port_name_inlined_t idport; | |
mach_msg_type_t fsidportType; | |
- mach_port_t fsidport; | |
- char fsidportPad[4]; | |
+ mach_port_name_inlined_t fsidport; | |
mach_msg_type_t filenoType; | |
ino64_t fileno; | |
} Reply; | |
@@ -3369,7 +3357,7 @@ | |
const mach_msg_type_t idportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -3379,7 +3367,7 @@ | |
const mach_msg_type_t fsidportCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -3448,14 +3436,14 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *idport = OutP->idport; | |
+ *idport = OutP->idport.name; | |
#if TypeCheck | |
if (BAD_TYPECHECK (&OutP->fsidportType, &fsidportCheck)) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *fsidport = OutP->fsidport; | |
+ *fsidport = OutP->fsidport.name; | |
#if TypeCheck | |
if (BAD_TYPECHECK (&OutP->filenoType, &filenoCheck)) | |
--- dev-hurd/cross-hurd/build-x86_64/native/hurd.obj/libfshelp-tests/fsUser.c 2023-11-24 15:42:38.525115009 -0500 | |
+++ cross-hurd/build-x86_64/native/hurd.obj/libfshelp-tests/fsUser.c 2023-11-22 01:44:13.009634317 -0500 | |
@@ -78,8 +78,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t exec_taskType; | |
- mach_port_t exec_task; | |
- char exec_taskPad[4]; | |
+ mach_port_name_inlined_t exec_task; | |
mach_msg_type_t flagsType; | |
int flags; | |
char flagsPad[4]; | |
@@ -95,12 +94,12 @@ | |
}; | |
mach_msg_type_long_t fdarrayType; | |
union { | |
- mach_port_t fdarray[512]; | |
+ mach_port_name_inlined_t fdarray[256]; | |
const mach_port_t *fdarrayP; | |
}; | |
mach_msg_type_long_t portarrayType; | |
union { | |
- mach_port_t portarray[512]; | |
+ mach_port_name_inlined_t portarray[256]; | |
const mach_port_t *portarrayP; | |
}; | |
mach_msg_type_long_t intarrayType; | |
@@ -141,14 +140,14 @@ | |
const mach_msg_type_t exec_taskType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t flagsType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -188,8 +187,8 @@ | |
const mach_msg_type_long_t fdarrayType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -200,8 +199,8 @@ | |
const mach_msg_type_long_t portarrayType = { | |
.msgtl_header = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
- .msgt_number = 512, | |
+ .msgt_size = 64, | |
+ .msgt_number = 256, | |
.msgt_inline = TRUE, | |
.msgt_longform = TRUE, | |
.msgt_deallocate = FALSE, | |
@@ -257,7 +256,7 @@ | |
InP->exec_taskType = exec_taskType; | |
- InP->exec_task = exec_task; | |
+ InP->exec_task.name = exec_task; | |
InP->flagsType = flagsType; | |
@@ -295,36 +294,54 @@ | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->fdarrayType = fdarrayType; | |
- if (fdarrayCnt > 512) { | |
+ if (fdarrayCnt > 256) { | |
InP->fdarrayType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->fdarrayType.msgtl_header.msgt_size = 32; | |
InP->fdarrayP = fdarray; | |
} | |
else if (fdarrayCnt) { | |
- memcpy(InP->fdarray, fdarray, 4 * fdarrayCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_fdarray = (mach_port_name_inlined_t *)InP->fdarray; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < fdarrayCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_fdarray[i].kernel_port_do_not_use = 0; | |
+ inlined_fdarray[i].name = (fdarray)[i]; | |
+ } | |
} | |
InP->fdarrayType.msgtl_name = fdarrayPoly; | |
InP->fdarrayType.msgtl_number = fdarrayCnt; | |
- msgh_size_delta = (InP->fdarrayType.msgtl_header.msgt_inline) ? (4 * fdarrayCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (InP->fdarrayType.msgtl_header.msgt_inline) ? 8 * fdarrayCnt : sizeof(mach_port_t *); | |
msgh_size += msgh_size_delta; | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->portarrayType = portarrayType; | |
- if (portarrayCnt > 512) { | |
+ if (portarrayCnt > 256) { | |
InP->portarrayType.msgtl_header.msgt_inline = FALSE; | |
+ /* We are passing mach_port_name_t out of line. */ | |
+ InP->portarrayType.msgtl_header.msgt_size = 32; | |
InP->portarrayP = portarray; | |
} | |
else if (portarrayCnt) { | |
- memcpy(InP->portarray, portarray, 4 * portarrayCnt); | |
+ /* Transform mach_port_name_t into mach_port_name_inlined_t. */ | |
+ mach_port_name_inlined_t *inlined_portarray = (mach_port_name_inlined_t *)InP->portarray; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < portarrayCnt; i++) { | |
+ /* Clear the whole message with zeros. */ | |
+ inlined_portarray[i].kernel_port_do_not_use = 0; | |
+ inlined_portarray[i].name = (portarray)[i]; | |
+ } | |
} | |
InP->portarrayType.msgtl_name = portarrayPoly; | |
InP->portarrayType.msgtl_number = portarrayCnt; | |
- msgh_size_delta = (InP->portarrayType.msgtl_header.msgt_inline) ? (4 * portarrayCnt + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (InP->portarrayType.msgtl_header.msgt_inline) ? 8 * portarrayCnt : sizeof(mach_port_t *); | |
msgh_size += msgh_size_delta; | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->intarrayType = intarrayType; | |
@@ -1375,8 +1392,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -1399,14 +1415,14 @@ | |
const mach_msg_type_t portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -1420,7 +1436,7 @@ | |
InP->portType = portType; | |
- InP->port = port; | |
+ InP->port.name = port; | |
if (MACH_MSG_TYPE_PORT_ANY(portPoly)) | |
msgh_simple = FALSE; | |
@@ -1487,8 +1503,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t controlType; | |
- mach_port_t control; | |
- char controlPad[4]; | |
+ mach_port_name_inlined_t control; | |
} Reply; | |
union { | |
@@ -1519,7 +1534,7 @@ | |
const mach_msg_type_t controlCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -1578,7 +1593,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *control = OutP->control; | |
+ *control = OutP->control.name; | |
return KERN_SUCCESS; | |
} | |
@@ -1948,7 +1963,7 @@ | |
char RetCodePad[4]; | |
mach_msg_type_long_t portsType; | |
union { | |
- mach_port_t ports[512]; | |
+ mach_port_name_inlined_t ports[256]; | |
mach_port_t *portsP; | |
}; | |
mach_msg_type_long_t intsType; | |
@@ -2044,11 +2059,12 @@ | |
#if TypeCheck | |
if (mig_unlikely ((OutP->portsType.msgtl_header.msgt_longform != TRUE) || | |
(OutP->portsType.msgtl_name != MACH_MSG_TYPE_PORT_SEND) || | |
- (OutP->portsType.msgtl_size != 32))) | |
+ (OutP->portsType.msgtl_size != 64 && OutP->portsType.msgtl_header.msgt_inline == TRUE) || | |
+ (OutP->portsType.msgtl_size != 32 && OutP->portsType.msgtl_header.msgt_inline == FALSE))) | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? (4 * OutP->portsType.msgtl_number + 7) & ~7 : sizeof(mach_port_t *); | |
+ msgh_size_delta = (OutP->portsType.msgtl_header.msgt_inline) ? 8 * OutP->portsType.msgtl_number : sizeof(mach_port_t *); | |
#if TypeCheck | |
if (mig_unlikely (msgh_size < 80 + msgh_size_delta)) | |
return MIG_TYPE_ERROR; | |
@@ -2056,14 +2072,23 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->portsType.msgtl_header.msgt_inline) | |
- *ports = OutP->portsP; | |
+ *ports = OutP->portsP; | |
else if (OutP->portsType.msgtl_number > *portsCnt) { | |
- __mig_allocate((vm_offset_t *)ports, | |
- 4 * OutP->portsType.msgtl_number); | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
else if (OutP->portsType.msgtl_number) { | |
- memcpy(*ports, OutP->ports, 4 * OutP->portsType.msgtl_number); | |
+ /* Transform mach_port_name_inlined_t into mach_port_name_t. */ | |
+ mach_port_name_inlined_t *inlined_ports = (mach_port_name_inlined_t *)OutP->ports; | |
+ mach_msg_type_number_t i; | |
+ for (i = 0; i < OutP->portsType.msgtl_number; i++) { | |
+ (*ports)[i] = inlined_ports[i].name; | |
+ } | |
} | |
*portsCnt = OutP->portsType.msgtl_number; | |
@@ -2085,14 +2110,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->intsType.msgtl_header.msgt_inline) | |
- *ints = OutP->intsP; | |
+ *ints = OutP->intsP; | |
else if (OutP->intsType.msgtl_number > *intsCnt) { | |
- __mig_allocate((vm_offset_t *)ints, | |
- 4 * OutP->intsType.msgtl_number); | |
- memcpy(*ints, OutP->ints, 4 * OutP->intsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)ints, 4 * OutP->intsType.msgtl_number); | |
+ memcpy(*ints, OutP->ints, 4 * OutP->intsType.msgtl_number); | |
} | |
else if (OutP->intsType.msgtl_number) { | |
- memcpy(*ints, OutP->ints, 4 * OutP->intsType.msgtl_number); | |
+ memcpy(*ints, OutP->ints, 4 * OutP->intsType.msgtl_number); | |
} | |
*intsCnt = OutP->intsType.msgtl_number; | |
@@ -2114,14 +2138,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->offsetsType.msgtl_header.msgt_inline) | |
- *offsets = OutP->offsetsP; | |
+ *offsets = OutP->offsetsP; | |
else if (OutP->offsetsType.msgtl_number > *offsetsCnt) { | |
- __mig_allocate((vm_offset_t *)offsets, | |
- 8 * OutP->offsetsType.msgtl_number); | |
- memcpy(*offsets, OutP->offsets, 8 * OutP->offsetsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)offsets, 8 * OutP->offsetsType.msgtl_number); | |
+ memcpy(*offsets, OutP->offsets, 8 * OutP->offsetsType.msgtl_number); | |
} | |
else if (OutP->offsetsType.msgtl_number) { | |
- memcpy(*offsets, OutP->offsets, 8 * OutP->offsetsType.msgtl_number); | |
+ memcpy(*offsets, OutP->offsets, 8 * OutP->offsetsType.msgtl_number); | |
} | |
*offsetsCnt = OutP->offsetsType.msgtl_number; | |
@@ -2141,14 +2164,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->dataType.msgtl_header.msgt_inline) | |
- *data = OutP->dataP; | |
+ *data = OutP->dataP; | |
else if (OutP->dataType.msgtl_number > *dataCnt) { | |
- __mig_allocate((vm_offset_t *)data, | |
- OutP->dataType.msgtl_number); | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
else if (OutP->dataType.msgtl_number) { | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
*dataCnt = OutP->dataType.msgtl_number; | |
@@ -2173,8 +2195,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t linknodeType; | |
- mach_port_t linknode; | |
- char linknodePad[4]; | |
+ mach_port_name_inlined_t linknode; | |
} Reply; | |
union { | |
@@ -2205,7 +2226,7 @@ | |
const mach_msg_type_t linknodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2264,7 +2285,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *linknode = OutP->linknode; | |
+ *linknode = OutP->linknode.name; | |
return KERN_SUCCESS; | |
} | |
@@ -2378,14 +2399,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->filehandleType.msgtl_header.msgt_inline) | |
- *filehandle = OutP->filehandleP; | |
+ *filehandle = OutP->filehandleP; | |
else if (OutP->filehandleType.msgtl_number > *filehandleCnt) { | |
- __mig_allocate((vm_offset_t *)filehandle, | |
- OutP->filehandleType.msgtl_number); | |
- memcpy(*filehandle, OutP->filehandle, OutP->filehandleType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)filehandle, OutP->filehandleType.msgtl_number); | |
+ memcpy(*filehandle, OutP->filehandle, OutP->filehandleType.msgtl_number); | |
} | |
else if (OutP->filehandleType.msgtl_number) { | |
- memcpy(*filehandle, OutP->filehandle, OutP->filehandleType.msgtl_number); | |
+ memcpy(*filehandle, OutP->filehandle, OutP->filehandleType.msgtl_number); | |
} | |
*filehandleCnt = OutP->filehandleType.msgtl_number; | |
@@ -2428,8 +2448,7 @@ | |
mach_msg_type_t retry_nameType; | |
string_t retry_name; | |
mach_msg_type_t resultType; | |
- mach_port_t result; | |
- char resultPad[4]; | |
+ mach_port_name_inlined_t result; | |
} Reply; | |
union { | |
@@ -2513,7 +2532,7 @@ | |
const mach_msg_type_t resultCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -2598,7 +2617,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *result = OutP->result; | |
+ *result = OutP->result.name; | |
return KERN_SUCCESS; | |
} | |
@@ -2784,14 +2803,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->dataType.msgtl_header.msgt_inline) | |
- *data = OutP->dataP; | |
+ *data = OutP->dataP; | |
else if (OutP->dataType.msgtl_number > *dataCnt) { | |
- __mig_allocate((vm_offset_t *)data, | |
- OutP->dataType.msgtl_number); | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
else if (OutP->dataType.msgtl_number) { | |
- memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
+ memcpy(*data, OutP->data, OutP->dataType.msgtl_number); | |
} | |
*dataCnt = OutP->dataType.msgtl_number; | |
@@ -3127,8 +3145,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t fileType; | |
- file_t file; | |
- char filePad[4]; | |
+ mach_port_name_inlined_t file; | |
mach_msg_type_t nameType; | |
string_t name; | |
mach_msg_type_t exclType; | |
@@ -3155,14 +3172,14 @@ | |
const mach_msg_type_t fileType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(file_t) == 4 * 1, "expected file_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t nameType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_STRING_C, | |
@@ -3198,7 +3215,7 @@ | |
InP->fileType = fileType; | |
- InP->file = file; | |
+ InP->file.name = file; | |
InP->nameType = nameType; | |
@@ -3264,8 +3281,7 @@ | |
mach_msg_type_t oldnameType; | |
string_t oldname; | |
mach_msg_type_t newdirectoryType; | |
- file_t newdirectory; | |
- char newdirectoryPad[4]; | |
+ mach_port_name_inlined_t newdirectory; | |
mach_msg_type_t newnameType; | |
string_t newname; | |
mach_msg_type_t exclType; | |
@@ -3303,14 +3319,14 @@ | |
const mach_msg_type_t newdirectoryType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_COPY_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(file_t) == 4 * 1, "expected file_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t newnameType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_STRING_C, | |
@@ -3350,7 +3366,7 @@ | |
InP->newdirectoryType = newdirectoryType; | |
- InP->newdirectory = newdirectory; | |
+ InP->newdirectory.name = newdirectory; | |
InP->newnameType = newnameType; | |
@@ -3426,8 +3442,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t newnodeType; | |
- mach_port_t newnode; | |
- char newnodePad[4]; | |
+ mach_port_name_inlined_t newnode; | |
} Reply; | |
union { | |
@@ -3480,7 +3495,7 @@ | |
const mach_msg_type_t newnodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -3547,7 +3562,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *newnode = OutP->newnode; | |
+ *newnode = OutP->newnode.name; | |
return KERN_SUCCESS; | |
} | |
@@ -3563,8 +3578,7 @@ | |
typedef struct { | |
mach_msg_header_t Head; | |
mach_msg_type_t portType; | |
- mach_port_t port; | |
- char portPad[4]; | |
+ mach_port_name_inlined_t port; | |
} Request; | |
typedef struct { | |
@@ -3587,14 +3601,14 @@ | |
const mach_msg_type_t portType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -3608,7 +3622,7 @@ | |
InP->portType = portType; | |
- InP->port = port; | |
+ InP->port.name = port; | |
if (MACH_MSG_TYPE_PORT_ANY(portPoly)) | |
msgh_simple = FALSE; | |
@@ -3688,8 +3702,7 @@ | |
const char *passiveP; | |
}; | |
mach_msg_type_t activeType; | |
- mach_port_t active; | |
- char activePad[4]; | |
+ mach_port_name_inlined_t active; | |
} Request; | |
typedef struct { | |
@@ -3759,14 +3772,14 @@ | |
const mach_msg_type_t activeType = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_POLYMORPHIC, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
.msgt_deallocate = FALSE, | |
.msgt_unused = 0 | |
}; | |
- _Static_assert(sizeof(mach_port_t) == 4 * 1, "expected mach_port_t to be size 4 * 1"); | |
+ _Static_assert(sizeof(mach_port_name_inlined_t) == 8 * 1, "expected mach_port_name_inlined_t to be size 8 * 1"); | |
const mach_msg_type_t RetCodeCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_INTEGER_32, | |
@@ -3808,7 +3821,7 @@ | |
InP = (Request *) ((char *) InP + msgh_size_delta - 2048); | |
InP->activeType = activeType; | |
- InP->active = active; | |
+ InP->active.name = active; | |
if (MACH_MSG_TYPE_PORT_ANY(activePoly)) | |
msgh_simple = FALSE; | |
@@ -3967,14 +3980,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->translatorType.msgtl_header.msgt_inline) | |
- *translator = OutP->translatorP; | |
+ *translator = OutP->translatorP; | |
else if (OutP->translatorType.msgtl_number > *translatorCnt) { | |
- __mig_allocate((vm_offset_t *)translator, | |
- OutP->translatorType.msgtl_number); | |
- memcpy(*translator, OutP->translator, OutP->translatorType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)translator, OutP->translatorType.msgtl_number); | |
+ memcpy(*translator, OutP->translator, OutP->translatorType.msgtl_number); | |
} | |
else if (OutP->translatorType.msgtl_number) { | |
- memcpy(*translator, OutP->translator, OutP->translatorType.msgtl_number); | |
+ memcpy(*translator, OutP->translator, OutP->translatorType.msgtl_number); | |
} | |
*translatorCnt = OutP->translatorType.msgtl_number; | |
@@ -3999,8 +4011,7 @@ | |
kern_return_t RetCode; | |
char RetCodePad[4]; | |
mach_msg_type_t translator_cntlType; | |
- mach_port_t translator_cntl; | |
- char translator_cntlPad[4]; | |
+ mach_port_name_inlined_t translator_cntl; | |
} Reply; | |
union { | |
@@ -4031,7 +4042,7 @@ | |
const mach_msg_type_t translator_cntlCheck = { | |
.msgt_name = (unsigned char) MACH_MSG_TYPE_PORT_SEND, | |
- .msgt_size = 32, | |
+ .msgt_size = 64, | |
.msgt_number = 1, | |
.msgt_inline = TRUE, | |
.msgt_longform = FALSE, | |
@@ -4090,7 +4101,7 @@ | |
return MIG_TYPE_ERROR; | |
#endif /* TypeCheck */ | |
- *translator_cntl = OutP->translator_cntl; | |
+ *translator_cntl = OutP->translator_cntl.name; | |
return KERN_SUCCESS; | |
} | |
@@ -4204,14 +4215,13 @@ | |
#endif /* TypeCheck */ | |
if (!OutP->optionsType.msgtl_header.msgt_inline) | |
- *options = OutP->optionsP; | |
+ *options = OutP->optionsP; | |
else if (OutP->optionsType.msgtl_number > *optionsCnt) { | |
- __mig_allocate((vm_offset_t *)options, | |
- OutP->optionsType.msgtl_number); | |
- memcpy(*options, OutP->options, OutP->optionsType.msgtl_number); | |
+ __mig_allocate((vm_offset_t *)options, OutP->optionsType.msgtl_number); | |
+ memcpy(*options, OutP->options, OutP->optionsType.msgtl_number); | |
} | |
else if (OutP->optionsType.msgtl_number) { | |
- memcpy(*options, OutP->options, OutP->optionsType.msgtl_number); | |
+ memcpy(*options, OutP->options, OutP->optionsType.msgtl_number); | |
} | |
*optionsCnt = OutP->optionsType.msgtl_number; | |
@@ -4230,8 +4240,7 @@ | |
typedef struct { | |
mach_m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment