[PATCH 0/3] stat syscall family: support modern 32-bit ABI requirements
Yury Norov
ynorov@caviumnetworks.com
Thu Aug 4 10:03:00 GMT 2016
In modern APIs stat and statfs structures has their layouts identical
to 64-bit version after changing off_t, ino_t etc sizes to 64-bit.
It means we can pass it to kernel same way as 64-bit ABI does. The only
exception is time_t-related fields. It can be handled by introducing
pads where needed.
Patch 1 is helper for patch 2 that does all the work by introducing paddings
where needed in structures stat and statfs. Patch 3 enables new ABI for
aarch64/ilp32 and should be applied with the rest of ilp32 series:
https://github.com/norov/glibc/tree/ilp32-2.24
Yury Norov (3):
endian.h: introduce __type3264() macro
32-bit ABIs: support stat syscall family
[AARCH64] ILP32: redirect stat syscall family to 64-bit handlers
string/endian.h | 12 +++++
sysdeps/unix/sysv/linux/aarch64/bits/typesizes.h | 6 +++
sysdeps/unix/sysv/linux/aarch64/ilp32/fstatfs64.c | 35 +++++++++++++
sysdeps/unix/sysv/linux/aarch64/ilp32/statfs64.c | 38 ++++++++++++++
sysdeps/unix/sysv/linux/fstatfs64.c | 7 +++
sysdeps/unix/sysv/linux/fxstat64.c | 11 ++++
sysdeps/unix/sysv/linux/fxstatat64.c | 15 +++++-
sysdeps/unix/sysv/linux/generic/bits/stat.h | 58 ++++++++++++++++------
sysdeps/unix/sysv/linux/generic/bits/statfs.h | 40 +++++++--------
.../unix/sysv/linux/generic/wordsize-32/fstatfs.c | 3 ++
.../unix/sysv/linux/generic/wordsize-32/fxstat.c | 3 ++
.../unix/sysv/linux/generic/wordsize-32/fxstatat.c | 2 +
.../unix/sysv/linux/generic/wordsize-32/lxstat.c | 2 +
.../unix/sysv/linux/generic/wordsize-32/lxstat64.c | 20 +++++++-
.../unix/sysv/linux/generic/wordsize-32/statfs.c | 2 +
.../unix/sysv/linux/generic/wordsize-32/xstat.c | 2 +
.../unix/sysv/linux/generic/wordsize-32/xstat64.c | 16 +++++-
sysdeps/unix/sysv/linux/kernel-time.h | 45 +++++++++++++++++
sysdeps/unix/sysv/linux/statfs64.c | 8 +++
time/time.h | 12 ++++-
20 files changed, 298 insertions(+), 39 deletions(-)
create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/fstatfs64.c
create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/statfs64.c
create mode 100644 sysdeps/unix/sysv/linux/kernel-time.h
--
2.7.4
More information about the Libc-alpha
mailing list