[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 07/10] linux-user: Fix msgrcv() and msgsnd() sysc
From: |
Aleksandar Markovic |
Subject: |
[Qemu-devel] [PATCH v7 07/10] linux-user: Fix msgrcv() and msgsnd() syscalls support |
Date: |
Thu, 22 Sep 2016 18:56:56 +0200 |
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 d89f21b..eee9707 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -789,6 +789,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)
--
2.9.3
- [Qemu-devel] [PATCH v7 00/10] linux-user: Fix assorted Qemu user mode issues, Aleksandar Markovic, 2016/09/22
- [Qemu-devel] [PATCH v7 01/10] linux-user: Add support for adjtimex() syscall, Aleksandar Markovic, 2016/09/22
- [Qemu-devel] [PATCH v7 02/10] linux-user: Add support for clock_adjtime() syscall, Aleksandar Markovic, 2016/09/22
- [Qemu-devel] [PATCH v7 03/10] linux-user: Add support for syncfs() syscall, Aleksandar Markovic, 2016/09/22
- [Qemu-devel] [PATCH v7 04/10] linux-user: Add support for sysfs() syscall, Aleksandar Markovic, 2016/09/22
- [Qemu-devel] [PATCH v7 05/10] linux-user: Add support for ustat() syscall, Aleksandar Markovic, 2016/09/22
- [Qemu-devel] [PATCH v7 06/10] linux-user: Fix mq_open() syscall support, Aleksandar Markovic, 2016/09/22
- [Qemu-devel] [PATCH v7 07/10] linux-user: Fix msgrcv() and msgsnd() syscalls support,
Aleksandar Markovic <=
- [Qemu-devel] [PATCH v7 08/10] linux-user: Fix socketcall() syscall support, Aleksandar Markovic, 2016/09/22
- [Qemu-devel] [PATCH v7 09/10] linux-user: Fix syslog() syscall support, Aleksandar Markovic, 2016/09/22
- [Qemu-devel] [PATCH v7 10/10] linux-user: Remove a duplicate item from strace.list, Aleksandar Markovic, 2016/09/22
- Re: [Qemu-devel] [PATCH v7 00/10] linux-user: Fix assorted Qemu user mode issues, Laurent Vivier, 2016/09/22
- Re: [Qemu-devel] [PATCH v7 00/10] linux-user: Fix assorted Qemu user mode issues, Riku Voipio, 2016/09/24