summaryrefslogtreecommitdiff
path: root/vm
diff options
context:
space:
mode:
authorLuca Dariz <luca@orpolo.org>2022-06-28 12:10:53 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-08-28 16:02:00 +0200
commit66775cd2279be8e81269c06575c836900aa64793 (patch)
tree4b23714d6d229ba9baa4b946a5bb11331dfa3b49 /vm
parent4f82ae66628a517585d6bef9465662a45481d024 (diff)
hack vm memory object proxy creation for vm arrays
* 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> Message-Id: <20220628101054.446126-15-luca@orpolo.org>
Diffstat (limited to 'vm')
-rw-r--r--vm/memory_object_proxy.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/vm/memory_object_proxy.c b/vm/memory_object_proxy.c
index 4d50bab4..46a57932 100644
--- a/vm/memory_object_proxy.c
+++ b/vm/memory_object_proxy.c
@@ -155,6 +155,13 @@ memory_object_create_proxy (ipc_space_t space, vm_prot_t max_protection,
if (!IP_VALID(object[0]))
return KERN_INVALID_NAME;
+#ifdef USER32
+ /* FIXME: simplify RPC, fix mig, or add a new VM data type in message.h */
+ *offset &= 0xFFFFFFFFU;
+ *start &= 0xFFFFFFFFU;
+ *len &= 0xFFFFFFFFU;
+#endif
+
/* FIXME: Support a different offset from 0. */
if (offset[0] != 0)
return KERN_INVALID_ARGUMENT;