aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLuca Dariz <luca@orpolo.org>2022-06-28 12:10:40 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-08-28 02:41:21 +0200
commit88444dca8edf573a79730562519220b9ebc9e88c (patch)
tree4489bc3d20d119ba34ec2aa52df71224228440ba /include
parent17335d49a3c9e866a81abc051420d73a59d669bf (diff)
downloadgnumach-88444dca8edf573a79730562519220b9ebc9e88c.tar.gz
gnumach-88444dca8edf573a79730562519220b9ebc9e88c.tar.bz2
gnumach-88444dca8edf573a79730562519220b9ebc9e88c.zip
fix rpc types for KERNEL_USER stubs
* include/mach/mach_types.defs: use rpc_ vm types for KERNEL_USER stubs. This change fixes two use cases: * internal rpc, e.g. when a memory object is initialized as a consequence of vm_map(); for example, the bootstrap modules use the "time" kernel device and memory-map it during startup. This triggers a kernel-side rpc to initialize the memory object and install the map, which is completely transparent form user-space. * notifications from kernel to user-space Signed-off-by: Luca Dariz <luca@orpolo.org> Message-Id: <20220628101054.446126-2-luca@orpolo.org>
Diffstat (limited to 'include')
-rw-r--r--include/mach/mach_types.defs16
1 files changed, 11 insertions, 5 deletions
diff --git a/include/mach/mach_types.defs b/include/mach/mach_types.defs
index a271d597..5c9fb2a8 100644
--- a/include/mach/mach_types.defs
+++ b/include/mach/mach_types.defs
@@ -110,9 +110,9 @@ type ipc_space_t = mach_port_t
#endif /* KERNEL_SERVER */
;
-#if defined(KERNEL_SERVER) && defined(USER32)
+#if defined(KERNEL) && defined(USER32)
type rpc_vm_size_t = uint32_t;
-#else /* KERNEL_SERVER and USER32 */
+#else /* KERNEL and USER32 */
#if defined(__x86_64__)
type rpc_vm_size_t = uint64_t;
#else /* __x86_64__ */
@@ -121,21 +121,27 @@ type rpc_vm_size_t = uint32_t;
#endif /* KERNEL_SERVER and USER32 */
type vm_address_t = rpc_vm_size_t
-#if defined(KERNEL_SERVER) || defined(KERNEL_USER)
+#if defined(KERNEL_SERVER)
intran: vm_address_t convert_vm_from_user(rpc_vm_address_t)
outtran: rpc_vm_address_t convert_vm_to_user(vm_address_t)
+#elif defined(KERNEL_USER)
+ ctype: rpc_vm_address_t
#endif
;
type vm_offset_t = rpc_vm_size_t
-#if defined(KERNEL_SERVER) || defined(KERNEL_USER)
+#if defined(KERNEL_SERVER)
intran: vm_offset_t convert_vm_from_user(rpc_vm_offset_t)
outtran: rpc_vm_offset_t convert_vm_to_user(vm_offset_t)
+#elif defined(KERNEL_USER)
+ ctype: rpc_vm_offset_t
#endif
;
type vm_size_t = rpc_vm_size_t
-#if defined(KERNEL_SERVER) || defined(KERNEL_USER)
+#if defined(KERNEL_SERVER)
intran: vm_size_t convert_vm_from_user(rpc_vm_size_t)
outtran: rpc_vm_size_t convert_vm_to_user(vm_size_t)
+#elif defined(KERNEL_USER)
+ ctype: rpc_vm_size_t
#endif
;
type vm_prot_t = int;