summary refs log tree commit diff stats
path: root/scripts/tracetool/backend/ust.py
diff options
context:
space:
mode:
authorFilip Bozuta <Filip.Bozuta@syrmia.com>2020-08-11 13:31:01 +0200
committerLaurent Vivier <laurent@vivier.eu>2020-08-23 16:57:58 +0200
commitb3a3af70c377a3e67d43f3be39a333228487b50c (patch)
tree9ef5d065d786c8f33bc38b784084d1c56073a1f5 /scripts/tracetool/backend/ust.py
parent828cb3a1a89e3ed4b1284c085eeabff39313ddfc (diff)
downloadfocaccia-qemu-b3a3af70c377a3e67d43f3be39a333228487b50c.tar.gz
focaccia-qemu-b3a3af70c377a3e67d43f3be39a333228487b50c.zip
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>
Diffstat (limited to 'scripts/tracetool/backend/ust.py')
0 files changed, 0 insertions, 0 deletions