bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 01/15] fix rpc types for KERNEL_USER stubs


From: Samuel Thibault
Subject: Re: [PATCH 01/15] fix rpc types for KERNEL_USER stubs
Date: Sun, 28 Aug 2022 02:41:43 +0200
User-agent: NeoMutt/20170609 (1.8.3)

Luca Dariz, le mar. 28 juin 2022 12:10:40 +0200, a ecrit:
> * 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>

Applied, thanks!

> ---
>  include/mach/mach_types.defs | 16 +++++++++++-----
>  1 file 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;
> -- 
> 2.30.2
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]