[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 14/15] hack vm memory object proxy creation for vm arrays
From: |
Luca Dariz |
Subject: |
[PATCH 14/15] hack vm memory object proxy creation for vm arrays |
Date: |
Tue, 28 Jun 2022 12:10:53 +0200 |
* vm/memory_object_proxy.c: truncate vm array types as if they were
the rpc_ version because MIG can't handle that. This rpc can't
handle more than one element anyway.
Note that the same issue with vm arrays is present at least with
syscall emulation, but that functionality seems unused for now.
A better fix could be to add a vm descriptor type in include/mach/message.h,
but then probably we don't need to use the rpc_ types in MIG anymore,
they would be needed only for the syscall definitions.
Signed-off-by: Luca Dariz <luca@orpolo.org>
---
vm/memory_object_proxy.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/vm/memory_object_proxy.c b/vm/memory_object_proxy.c
index 4d50bab4..f397351e 100644
--- a/vm/memory_object_proxy.c
+++ b/vm/memory_object_proxy.c
@@ -155,6 +155,11 @@ memory_object_create_proxy (ipc_space_t space, vm_prot_t
max_protection,
if (!IP_VALID(object[0]))
return KERN_INVALID_NAME;
+ /* FIXME: fix mig or add a new VM data type in message.h */
+ *offset &= 0xFFFFFFFF;
+ *start &= 0xFFFFFFFF;
+ *len &= 0xFFFFFFFF;
+
/* FIXME: Support a different offset from 0. */
if (offset[0] != 0)
return KERN_INVALID_ARGUMENT;
--
2.30.2
- [PATCH 06/15] kmsg: fix msg body alignment, (continued)
- [PATCH 06/15] kmsg: fix msg body alignment, Luca Dariz, 2022/06/28
- [PATCH 09/15] x86_64: fix exception stack alignment, Luca Dariz, 2022/06/28
- [PATCH 04/15] compute mach port size from the corresponding type, Luca Dariz, 2022/06/28
- [PATCH 05/15] sign-extend mask in vm_map() with 32-bit userspace, Luca Dariz, 2022/06/28
- [PATCH 08/15] use port name type in mach_port_names(), Luca Dariz, 2022/06/28
- [PATCH 10/15] x86_64: expand and shrink messages in copy{in, out}msg routines, Luca Dariz, 2022/06/28
- [PATCH 02/15] simplify ipc_kmsg_copyout_body() usage, Luca Dariz, 2022/06/28
- [PATCH 07/15] fix host_info structure definition, Luca Dariz, 2022/06/28
- [PATCH 11/15] update syscall signature with rpc_vm_* and mach_port_name_t, Luca Dariz, 2022/06/28
- [PATCH 15/15] enable syscalls on x86_64, Luca Dariz, 2022/06/28
- [PATCH 14/15] hack vm memory object proxy creation for vm arrays,
Luca Dariz <=
- [PATCH 13/15] cleanup headers in printf.c, Luca Dariz, 2022/06/28
- [PATCH 12/15] fix warnings for 32 bit builds, Luca Dariz, 2022/06/28