bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH 2/5] fix copyin/outmsg header for ! USER32


From: Samuel Thibault
Subject: Re: [PATCH 2/5] fix copyin/outmsg header for ! USER32
Date: Mon, 27 Feb 2023 22:36:04 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Applied, thanks!

Luca Dariz, le lun. 27 févr. 2023 21:44:58 +0100, a ecrit:
> * x86_64/copy_user.c: fix copyin/out, we already have a pointer to
>   user/kernel buffers
> ---
>  x86_64/copy_user.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/x86_64/copy_user.c b/x86_64/copy_user.c
> index dd9fe2d7..86d23525 100644
> --- a/x86_64/copy_user.c
> +++ b/x86_64/copy_user.c
> @@ -192,7 +192,7 @@ int copyinmsg (const void *userbuf, void *kernelbuf, 
> const size_t usize)
>    /* The 64 bit interface ensures the header is the same size, so it does 
> not need any resizing. */
>    _Static_assert(sizeof(mach_msg_header_t) == sizeof(mach_msg_user_header_t),
>                "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)))
> +  if (copyin(umsg, kmsg, sizeof(mach_msg_header_t)))
>      return 1;
>  #endif
>  
> @@ -290,7 +290,7 @@ int copyoutmsg (const void *kernelbuf, void *userbuf, 
> const size_t ksize)
>               sizeof(kmsg->msgh_seqno) + sizeof(kmsg->msgh_id)))
>      return 1;
>  #else
> -  if (copyout(&kmsg, &umsg, sizeof(mach_msg_header_t)))
> +  if (copyout(kmsg, umsg, sizeof(mach_msg_header_t)))
>      return 1;
>  #endif  /* USER32 */
>  
> -- 
> 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]