bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH 3/5] fix port name copyin


From: Samuel Thibault
Subject: Re: [PATCH 3/5] fix port name copyin
Date: Mon, 27 Feb 2023 22:38:11 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Applied, thanks!

Luca Dariz, le lun. 27 févr. 2023 21:44:59 +0100, a ecrit:
> * x86_64/copy_user.c: in mach_msg_user_header_t there are some holes
>   that need to be cleared, to adapt to the different layout of
>   mach_msg_header_t.
> ---
>  x86_64/copy_user.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/x86_64/copy_user.c b/x86_64/copy_user.c
> index 86d23525..ae17c368 100644
> --- a/x86_64/copy_user.c
> +++ b/x86_64/copy_user.c
> @@ -194,6 +194,8 @@ int copyinmsg (const void *userbuf, void *kernelbuf, 
> const size_t usize)
>                "mach_msg_header_t and mach_msg_user_header_t expected to be 
> of the same size");
>    if (copyin(umsg, kmsg, sizeof(mach_msg_header_t)))
>      return 1;
> +  kmsg->msgh_remote_port &= 0xFFFFFFFF; // FIXME: still have port names here
> +  kmsg->msgh_local_port &= 0xFFFFFFFF;  // also, this assumes little-endian
>  #endif
>  
>    vm_offset_t usaddr, ueaddr, ksaddr;
> -- 
> 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]