qemu-e2k/linux-user
Filip Bozuta b09d64064b linux-user: Fix 'clock_nanosleep()' implementation
Implementation of syscall 'clock_nanosleep()' in 'syscall.c' uses
functions 'target_to_host_timespec()' and 'host_to_target_timespec()'
to transfer the value of 'struct timespec' between target and host.
However, the implementation doesn't check whether this conversion
succeeds and thus can return an unaproppriate error instead of 'EFAULT'
that is expected. This was confirmed with the modified LTP test suite
where testcases with bad 'struct timespec' adress for 'clock_nanosleep()'
were added. This modified LTP suite can be found at:
https://github.com/bozutaf/ltp

(Patch with this new test case will be sent to LTP mailing list soon)

Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200727201326.401519-1-Filip.Bozuta@syrmia.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-08-27 12:29:49 +02:00
..
aarch64 linux-user, aarch64: sync syscall numbers with kernel v5.5 2020-03-20 16:02:00 +01:00
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 linux-user: Introduce cpu_clone_regs_parent 2019-11-06 13:43:25 +01:00
generic linux-user: implement OFD locks 2020-06-05 21:23:22 +02:00
host linux-user: Add safe_syscall for riscv64 host 2018-12-26 06:40:02 +11:00
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 linux-user, nios2: sync syscall numbers with kernel v5.5 2020-03-20 16:02:00 +01:00
openrisc linux-user, openrisc: sync syscall numbers with kernel v5.5 2020-03-20 16:02:00 +01:00
ppc meson: linux-user 2020-08-21 06:30:38 -04:00
riscv linux-user/riscv: fix up struct target_ucontext definition 2020-04-29 13:16:37 -07:00
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 linux-user: Introduce cpu_clone_regs_parent 2019-11-06 13:43:25 +01:00
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 cpu: Replace ENV_GET_CPU with env_cpu 2019-06-10 07:03:34 -07:00
elfload.c linux-user: don't use MAP_FIXED in pgd_find_hole_fallback 2020-07-27 09:41:18 +01:00
errno_defs.h Supply missing header guards 2019-06-12 13:20:21 +02:00
exit.c build: move TARGET_GPROF to config-host.mak 2020-02-12 16:29:27 +01:00
fd-trans.c linux-user: add netlink RTM_SETLINK command 2020-07-13 21:26:33 +02:00
fd-trans.h linux-user: move TargetFdTrans functions to their own file 2018-09-25 22:36:47 +02:00
flat.h Supply missing header guards 2019-06-12 13:20:21 +02:00
flatload.c linux-user: completely re-write init_guest_space 2020-05-15 15:25:16 +01:00
ioctls.h linux-user: Add thunk argument types for SIOCGSTAMP and SIOCGSTAMPNS 2020-06-29 13:10:11 +02:00
linux_loop.h linux-user: Add loop control ioctls 2016-07-19 15:22:33 +03:00
linuxload.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
main.c linux-user: Ensure mmap_min_addr is non-zero 2020-07-27 22:02:40 +02:00
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 linux-user: Add strace support for printing arguments of ioctl() 2020-07-04 18:08:51 +02:00
safe-syscall.S linux-user: Provide safe_syscall for fixing races between signals and syscalls 2016-05-27 14:49:51 +03:00
signal-common.h linux-user: Make sigaltstack stacks per-thread 2019-07-26 19:24:33 +02:00
signal.c linux-user: Use `qemu_log' for strace 2020-02-19 11:17:40 +01:00
socket.h Supply missing header guards 2019-06-12 13:20:21 +02:00
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 linux-user: Add strace support for printing arguments of ioctl() 2020-07-04 18:08:51 +02:00
syscall.c linux-user: Fix 'clock_nanosleep()' implementation 2020-08-27 12:29:49 +02:00
syscall_defs.h linux-user: Fix 'semop()' and 'semtimedop()' implementation 2020-08-27 12:29:49 +02:00
syscall_types.h linux-user: Add thunk argument types for SIOCGSTAMP and SIOCGSTAMPNS 2020-06-29 13:10:11 +02:00
target_flat.h Supply missing header guards 2019-06-12 13:20:21 +02:00
trace-events linux-user: fix use of SIGRTMIN 2020-02-12 18:56:41 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
uaccess.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
uname.c cpu: Replace ENV_GET_CPU with env_cpu 2019-06-10 07:03:34 -07:00
uname.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
vm86.c linux-user: Use `qemu_log' for non-strace logging 2020-02-19 11:17:40 +01:00