musl/src/linux/statx.c, branch master musl - an implementation of the standard library for Linux-based systems statx: fix uninitialized attributes/mask in fallback path 2024年09月13日T21:11:00+00:00 Rich Felker dalias@aerifal.cx 2024年09月13日T21:08:11+00:00 4ca8c267768e371930ef7ec9593a5f8b44a7f810 commit b817541f1cfd38e4b81257b3215e276ea9d0fc61 introduced statx with a fallback using fstatat, but failed to fill in stx_rdev_major/minor and stx_attributes[_mask]. the rdev omission has been addressed separately. rather than explicitly zeroing the attributes and their mask, pre-fill the entire structure with zeros. this will also cover the padding adjacent to stx_mode, in case it's ever used in the future. explicit zeroing of stx_btime is removed since, with this change, it will already be pre-zeroed. as an aside, zeroing it was not strictly necessary, since STATX_BASIC_STATS does not include STATX_BTIME and thus does not indicate any validity for it.
commit b817541f1cfd38e4b81257b3215e276ea9d0fc61 introduced statx with
a fallback using fstatat, but failed to fill in stx_rdev_major/minor
and stx_attributes[_mask]. the rdev omission has been addressed
separately. rather than explicitly zeroing the attributes and their
mask, pre-fill the entire structure with zeros. this will also cover
the padding adjacent to stx_mode, in case it's ever used in the
future.
explicit zeroing of stx_btime is removed since, with this change, it
will already be pre-zeroed. as an aside, zeroing it was not strictly
necessary, since STATX_BASIC_STATS does not include STATX_BTIME and
thus does not indicate any validity for it.
statx: fix ENOSYS emulation not setting stx_rdev_* 2024年09月13日T20:58:21+00:00 Gabriel Ravier gabravier@gmail.com 2024年09月13日T20:00:15+00:00 251cbb6366403a056b39638264932c82d18ec610 The current implementation of the statx function fails to set the values of stx->stx_rdev_major and stx->stx_rdev_minor if the statx syscall fails with ENOSYS and thus the statx function has to fall back on fstatat-based emulation.
The current implementation of the statx function fails to set the
values of stx->stx_rdev_major and stx->stx_rdev_minor if the statx
syscall fails with ENOSYS and thus the statx function has to fall back
on fstatat-based emulation.
add statx interface using syscall, fallback to fstatat 2024年02月24日T17:27:09+00:00 Duncan Bellamy dunk@denkimushi.com 2022年08月31日T19:07:34+00:00 b817541f1cfd38e4b81257b3215e276ea9d0fc61

AltStyle によって変換されたページ (->オリジナル) /