Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
Sources: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/uapi/linux/fsverity.h?id=07c99001312cbf90a357d4877a358f796eede65b https://docs.kernel.org/filesystems/fsverity.html Latest uapi introduced in kernel version 5.12.
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This branch has not been deployed
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.
Sources:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/uapi/linux/fsverity.h?id=07c99001312cbf90a357d4877a358f796eede65b
https://docs.kernel.org/filesystems/fsverity.html
Latest uapi introduced in kernel version 5.12.
Description
The linked commit is the one that introduced the current version of the uapi, which shipped in version 5.12 and remains unchanged as of kernel version 7.3.
Since the hash algo is either __u32, __u16, or __u8 in the structs I chose the smallest one for the ALGO constants. I'm not sure that's the best choice, maybe c_int would be better?
fs-verity should exist on android as well, but tests broke when I added it and I don't know what the problem is, nor am I terribly motivated to diagnose/fix it, so this commit introduces them only on target_os="linux".
Testing:
cargo test --workspaceis clean except for some compiler warnings that were already present on main.ci/style.pyreports "good style!".ci/verify-build.pywas successful with stable toolchain, targets.*linux-(musl|gnu).*. I also ran a test program that enables/measures fs-verity against the new bindings, confirmed by the official fsverity-utils (x86_64-unknown-linux-gnu, Kernel version 6.18).LLM disclosure: used for research&code review
Checklist
libc-test/semverhave been updated*LASTor*MAXhave the standarddoc comment
cargo test -p libc-test --target mytarget);especially relevant for platforms that may not be checked in CI
@rustbot label +stable-nominated