From 5447f965f1e109f7ac9aeb91c0e3906969a4adb8 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Mon, 13 Mar 2023 01:41:57 -0400 Subject: Use c_string to define host_get_kernel_version and host_get_kernel_boot_info. The existing definitions for kernel_version_t and kernel_boot_info_t use (MACH_MSG_TYPE_STRING, length*8) which result in message types that have a single element of 512 or 4096 bytes (set as msgt_size). This results in MiG generating mach_msg_type_long_t. Using c_string has the benefit of moving this size to be defined as msgt_number which doesn't overflow. This will allow us to simplify the 64 bit RPC ABI since all msgt_size can be defined with just 8 bits (as it should be expected). The resulting implementation is the same but we still need to define new RPCs since server and user expect different mach_msg_type_t. Message-Id: --- kern/machine.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'kern/machine.c') diff --git a/kern/machine.c b/kern/machine.c index bf9677c9..c9e368a0 100644 --- a/kern/machine.c +++ b/kern/machine.c @@ -674,3 +674,11 @@ host_get_boot_info( (void) strncpy(boot_info, src, KERNEL_BOOT_INFO_MAX); return KERN_SUCCESS; } + +kern_return_t +host_get_kernel_boot_info( + host_t priv_host, + kernel_boot_info_t boot_info) +{ + return host_get_boot_info(priv_host, boot_info); +} -- cgit v1.2.3