Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os: os.Root: use openat2 with RESOLVE_BENEATH on Linux #73077

Open
neild opened this issue Mar 27, 2025 · 1 comment
Open

os: os.Root: use openat2 with RESOLVE_BENEATH on Linux #73077

neild opened this issue Mar 27, 2025 · 1 comment
Labels
LibraryProposal Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool NeedsFix The path to resolution is known, but the work has not been done. OS-Linux Performance

Comments

@neild
Copy link
Contributor

neild commented Mar 27, 2025

Linux's openat2 syscall with the RESOLVE_BENEATH flag opens a file within some root directory. We should use it when available.

openat2 is only supported since Linux 5.6, so we'll still need a fallback on older versions.

@gabyhelp
Copy link

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@gabyhelp gabyhelp added the LibraryProposal Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool label Mar 27, 2025
@dmitshur dmitshur added Performance OS-Linux NeedsFix The path to resolution is known, but the work has not been done. labels Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LibraryProposal Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool NeedsFix The path to resolution is known, but the work has not been done. OS-Linux Performance
Projects
None yet
Development

No branches or pull requests

3 participants