qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 5/8] linux-user: Fix msgrcv() and msgsnd() sy


From: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH v5 5/8] linux-user: Fix msgrcv() and msgsnd() syscalls support
Date: Sun, 18 Sep 2016 01:43:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0


Le 14/09/2016 à 22:19, Aleksandar Markovic a écrit :
> From: Aleksandar Markovic <address@hidden>
> 
> If syscalls msgrcv() and msgsnd() fail, they return E2BIG, EACCES,
> EAGAIN, EFAULT, EIDRM, EINTR, EINVAL, ENOMEM, or ENOMSG.
> 
> By examining negative scenarios of these syscalls for Mips, it was
> established that ENOMSG does not have the same value accross all
> platforms, but it is nevertheless not included for conversion in
> the correspondant conversion table defined in linux-user/syscall.c.
> This is certainly a bug, since it leads to the incorrect emulation
> of msgrcv() and msgsnd() for scenarios involving ENOMSG.
> 
> This patch fixes this by extending the conversion table to include
> ENOMSG.
> 
> Also, LTP test msgrcv04 will be fixed for some platforms.
> 
> Signed-off-by: Aleksandar Markovic <address@hidden>

Reviewed-by: Laurent Vivier <address@hidden>

> ---
>  linux-user/syscall.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 7f8ae41..bdc12ae 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -750,6 +750,9 @@ static uint16_t 
> host_to_target_errno_table[ERRNO_TABLE_SIZE] = {
>  #ifdef ENOTRECOVERABLE
>      [ENOTRECOVERABLE]        = TARGET_ENOTRECOVERABLE,
>  #endif
> +#ifdef ENOMSG
> +    [ENOMSG]            = TARGET_ENOMSG,
> +#endif
>  };
>  
>  static inline int host_to_target_errno(int err)
> 



reply via email to

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