diff options
author | Aleksandar Rikalo <arikalo@wavecomp.com> | 2019-06-28 12:43:34 +0200 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2019-07-02 16:56:46 +0200 |
commit | efa921845c03ef4df6b9d4b3b1ee1a103e7d4b46 (patch) | |
tree | 30325fa8cc76abfe2dba420d88e086ebf19a8cdc /linux-user/strace.list | |
parent | 7d0e02405fc02a181319b1ab8681d2f72246b7c6 (diff) |
linux-user: Add support for translation of statx() syscall
Implement support for translation of system call statx().
The implementation is based on "best effort" approach: if host
is capable of executing statx(), host statx() is used. If not,
the implementation includes invoking a more mature system call
fstatat() on the host side to achieve as close as possible
functionality.
Support for statx() in kernel and glibc was, however, introduced
at different points of time (the difference is more than a year):
- kernel: Linux 4.11 (30 April 2017)
- glibc: glibc 2.28 (1 Aug 2018)
In this patch, the availability of statx() support is established
via __NR_statx (if it is defined, statx() is considered available).
This coincedes with statx() introduction in kernel.
However, the structure statx definition may not be available in
any header for hosts with glibc older than 2.28 (and it is, by
design, to be defined in one of glibc headers), even though the
full statx() functionality may be supported in kernel. Hence, a
structure "target_statx" is defined in this patch, to remove that
dependency on glibc headers, and to use statx() functionality as
soon as the host kernel is capable of supporting it. Such statx
structure definition is used for both target and host structures
statx (of course, this doesn't mean the endian arrangement is
the same on target and host - the endian conversion is done in
all necessary cases).
Signed-off-by: Aleksandar Rikalo <arikalo@wavecomp.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <1561718618-20218-2-git-send-email-aleksandar.markovic@rt-rk.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/strace.list')
0 files changed, 0 insertions, 0 deletions