qemu-irix/linux-user
Peter Maydell 10fa993aae linux-user: Translate flags argument to dup3 syscall
The third argument to dup3() is a flags word which may be
O_CLOEXEC. We weren't translating this flag from target to
host value, which meant that if the target used a different
value from the host (eg sparc guest and x86 host) the dup3()
call would fail EINVAL. Do the correct translation.

Fixes: https://bugs.launchpad.net/qemu/+bug/1704658
Reported-by: Bruno Haible  <bruno@clisp.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <1513351080-25917-1-git-send-email-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2018-01-23 14:20:52 +01:00
..
aarch64 linux-user: Add separate aarch64_be uname 2018-01-11 13:25:31 +00:00
alpha
arm linux-user/arm/nwfpe: Check coprocessor number for FPA emulation 2018-01-11 13:25:39 +00:00
cris
host Replace 'struct ucontext' with 'ucontext_t' type 2017-07-20 10:10:28 +01:00
hppa linux-user/hppa: Fix typo for TARGET_NR_epoll_wait 2017-11-07 21:58:13 +02:00
i386
m68k
microblaze
mips
mips64
nios2
openrisc
ppc
s390x
sh4
sparc sparc: embed sparc_def_t into CPUSPARCState 2017-09-01 11:54:24 -03:00
sparc64
tilegx
unicore32
x86_64
Makefile.objs
elfload.c linux-user: Fix calculation of auxv length 2017-11-20 16:15:41 +02:00
errno_defs.h
flat.h
flatload.c
ioctls.h linux-user: Add some random ioctls 2017-10-16 21:00:04 +03:00
linux_loop.h
linuxload.c
m68k-sim.c
main.c linux-user: wrap fork() in a start/end exclusive section 2018-01-23 14:20:52 +01:00
mmap.c
qemu.h
safe-syscall.S
signal.c linux-user: Fix endianess of aarch64 signal trampoline 2018-01-11 13:25:31 +00:00
socket.h
strace.c linux-user: fix O_TMPFILE handling 2017-10-16 16:00:56 +03:00
strace.list linux-user: add rt_tgsigqueueinfo() strace 2017-05-29 14:56:08 +03:00
syscall.c linux-user: Translate flags argument to dup3 syscall 2018-01-23 14:20:52 +01:00
syscall_defs.h linux-user: Don't use CMSG_ALIGN(sizeof struct cmsghdr) 2018-01-23 14:20:52 +01:00
syscall_types.h
target_flat.h
trace-events trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00
uaccess.c
uname.c
uname.h
vm86.c