fsimpl/gofer/tmpfs: Support statx btime#13290
Open
copybara-service[bot] wants to merge 1 commit into
Open
Conversation
93dd95d to
3075041
Compare
gVisor did not report valid statx btime: gofer/directfs used fstat(2), which has no btime, and tmpfs did not track creation time. Use host statx(AT_EMPTY_PATH) for gofer/directfs metadata. Restrict host statx in gofer/sandbox seccomp filters to FD-only calls using a fixed empty path and AT_EMPTY_PATH. Track optional STATX_BTIME availability so filesystems without btime support do not expose zero btime. For tmpfs, initialize btime at inode creation and report STATX_BTIME, matching Linux >= 5.18. Reference: fs/stat.c:vfs_statx(), mm/shmem.c:shmem_getattr() Co-authored-by: Ayush Ranjan <ayushranjan@google.com> FUTURE_COPYBARA_INTEGRATE_REVIEW=#13038 from tanyifeng:fsimpl-statx-btime 4c56998 PiperOrigin-RevId: 921686588
3075041 to
100d64e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fsimpl/gofer/tmpfs: Support statx btime
gVisor did not report valid statx btime: gofer/directfs used fstat(2), which has no btime, and tmpfs did not track creation time.
Use host statx(AT_EMPTY_PATH) for gofer/directfs metadata. Restrict host statx in gofer/sandbox seccomp filters to FD-only calls using a fixed empty path and AT_EMPTY_PATH.
Track optional STATX_BTIME availability so filesystems without btime support do not expose zero btime. For tmpfs, initialize btime at inode creation and report STATX_BTIME, matching Linux >= 5.18.
Reference: fs/stat.c:vfs_statx(), mm/shmem.c:shmem_getattr()
Co-authored-by: Ayush Ranjan ayushranjan@google.com
FUTURE_COPYBARA_INTEGRATE_REVIEW=#13038 from tanyifeng:fsimpl-statx-btime 4c56998