diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-09-11 10:25:48 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-09-27 09:30:24 -0300 |
commit | 551101e8240b7514fc646d1722f8b79c90362b8f (patch) | |
tree | 350c748f6d9bf80e3cacf581fe3a7fed7d94fd9f /stdlib/tst-secure-getenv.c | |
parent | 64b1a44183a3094672ed304532bedb9acc707554 (diff) | |
download | glibc-551101e8240b7514fc646d1722f8b79c90362b8f.tar.gz glibc-551101e8240b7514fc646d1722f8b79c90362b8f.tar.xz glibc-551101e8240b7514fc646d1722f8b79c90362b8f.zip |
io: Do not implement fstat with fstatat
AT_EMPTY_PATH is a requirement to implement fstat over fstatat, however it does not prevent the kernel to read the path argument. It is not an issue, but on x86-64 with SMAP-capable CPUs the kernel is forced to perform expensive user memory access. After that regular lookup is performed which adds even more overhead. Instead, issue the fstat syscall directly on LFS fstat implementation (32 bit architectures will still continue to use statx, which is required to have 64 bit time_t support). it should be even a small performance gain on non x86_64, since there is no need to handle the path argument. Checked on x86_64-linux-gnu.
Diffstat (limited to 'stdlib/tst-secure-getenv.c')
0 files changed, 0 insertions, 0 deletions