qemu/linux-user
Filip Bozuta b3a3af70c3 linux-user: Fix 'utimensat()' implementation
Implementation of syscall 'utimensat()' in 'syscall.c' uses functions
target_to_host/host_to_target_timespec() to convert values of
'struct timespec' between host and target. However, the implementation
doesn't check whether the conversion succeeds and thus can cause an
inappropriate error or succeed unappropriately instead of setting errno
EFAULT ('Bad address') which is supposed to be set in these cases.

This was confirmed with the LTP test for utimensat ('testcases/utimensat')
which fails for test cases when the errno EFAULT is expected. After changes
from this patch, the test passes for all test cases.

Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200811113101.6636-1-Filip.Bozuta@syrmia.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-08-23 16:57:58 +02:00
..
aarch64
alpha meson: linux-user 2020-08-21 06:30:38 -04:00
arm meson: linux-user 2020-08-21 06:30:38 -04:00
cris
generic
host
hppa meson: linux-user 2020-08-21 06:30:38 -04:00
i386 meson: linux-user 2020-08-21 06:30:38 -04:00
m68k meson: linux-user 2020-08-21 06:30:38 -04:00
microblaze meson: linux-user 2020-08-21 06:30:38 -04:00
mips meson: linux-user 2020-08-21 06:30:38 -04:00
mips64 meson: linux-user 2020-08-21 06:30:38 -04:00
nios2
openrisc
ppc meson: linux-user 2020-08-21 06:30:38 -04:00
riscv
s390x meson: linux-user 2020-08-21 06:30:38 -04:00
sh4 meson: linux-user 2020-08-21 06:30:38 -04:00
sparc meson: linux-user 2020-08-21 06:30:38 -04:00
sparc64 meson: linux-user 2020-08-21 06:30:38 -04:00
tilegx
x86_64 meson: linux-user 2020-08-21 06:30:38 -04:00
xtensa meson: linux-user 2020-08-21 06:30:38 -04:00
cpu_loop-common.h
elfload.c
errno_defs.h
exit.c
fd-trans.c
fd-trans.h
flat.h
flatload.c
ioctls.h
linux_loop.h
linuxload.c
main.c
meson.build meson: linux-user 2020-08-21 06:30:38 -04:00
mmap.c linux-user: Adjust guest page protection for the host 2020-08-23 16:57:58 +02:00
qemu.h
safe-syscall.S
signal-common.h
signal.c
socket.h
strace.c linux-user: Fix "print_fdset()" in "strace.c" to not print ", " after last value 2020-08-23 16:57:58 +02:00
strace.list
syscall.c linux-user: Fix 'utimensat()' implementation 2020-08-23 16:57:58 +02:00
syscall_defs.h linux-user: Add support for a group of 2038 safe syscalls 2020-08-23 16:57:58 +02:00
syscall_types.h
target_flat.h
trace-events
trace.h
uaccess.c
uname.c
uname.h
vm86.c