Skip to content

Linux: add name_to_handle_at and open_by_handle_at#4988

Open
samu698 wants to merge 1 commit intorust-lang:mainfrom
samu698:main
Open

Linux: add name_to_handle_at and open_by_handle_at#4988
samu698 wants to merge 1 commit intorust-lang:mainfrom
samu698:main

Conversation

@samu698
Copy link

@samu698 samu698 commented Feb 21, 2026

Description

Add file handle operations for Linux.

In particular I added:

  • name_to_handle_at()
  • open_by_handle_at()
  • file_handle
  • MAX_HANDLE_SZ
  • AT_HANDLE_MNT_ID_UNIQUE
  • AT_HANDLE_FID
  • AT_HANDLE_CONNECTABLE

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot label +stable-nominated

@rustbot rustbot added S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Feb 21, 2026
@samu698 samu698 marked this pull request as draft February 21, 2026 14:01
@samu698 samu698 force-pushed the main branch 3 times, most recently from 2699446 to c343e34 Compare February 21, 2026 18:26
Comment on lines +4494 to +4498
// FIXME(linux): Requires >= 6.13 kernel headers.
"AT_HANDLE_CONNECTABLE" => true,

// FIXME(linux): Requires >= 6.12 kernel headers.
"AT_HANDLE_MNT_ID_UNIQUE" => true,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These flags are a recent addition to Linux and they are present only in the more recent versions of glibc

Comment on lines +4500 to +4502
// FIXME(musl): This value is not yet in musl.
// eabihf targets are tested using an older version of glibc
"AT_HANDLE_FID" if musl || eabihf => true,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eabihf targets use an older version of glibc in CI, where this flag wasn't added

@samu698 samu698 marked this pull request as ready for review February 22, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants