- Notifications
You must be signed in to change notification settings - Fork1.1k
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
linux: Add devmem constants and structs#4299
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Implementation LGTM. Could you add permalinks to the headers in the PR description and fix the style failure?
Thanks! @rustbot label +stable-nominated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
AreSO_RESERVE_MEM
and similar available on sparc? CI seems to think they aren't. If they are more recent, the test crate's build script will need to be updated.
My guess is that there will one more architecture that this PR will be break. |
The devmem constants requires headers >= 6.12 on gnu libc.Musl hardcodes these constants into "sys/socket.h", which are not yet present.For reference:https://elixir.bootlin.com/linux/v6.13.5/source/include/uapi/asm-generic/socket.h#L142Signed-off-by: Pedro Tammela <pctammela@gmail.com>
For reference:https://elixir.bootlin.com/linux/v6.13.5/source/include/uapi/linux/uio.h#L23Signed-off-by: Pedro Tammela <pctammela@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks like things are passing now, thanks for the CI fix!
The devmem constants requires headers >= 6.12 on gnu libc.Musl hardcodes these constants into "sys/socket.h", which are not yet present.For reference:https://elixir.bootlin.com/linux/v6.13.5/source/include/uapi/asm-generic/socket.h#L142Signed-off-by: Pedro Tammela <pctammela@gmail.com>(backport <rust-lang#4299>)(cherry picked from commitae98edd)
For reference:https://elixir.bootlin.com/linux/v6.13.5/source/include/uapi/linux/uio.h#L23Signed-off-by: Pedro Tammela <pctammela@gmail.com>(backport <rust-lang#4299>)(cherry picked from commit4985e60)
Description
Adds devmem constants and structs. Devmem was merged recently (6.12).
I had also add all the other missing
SO_
constants for completion.As usual, musl is way behind (even on 1.2) so all of these will be skipped there.
Sources
https://github.com/torvalds/linux/blob/c0d35086a21b8d5536da5029fd76b9aeecf3217d/include/uapi/asm-generic/socket.h#L125
https://github.com/torvalds/linux/blob/c0d35086a21b8d5536da5029fd76b9aeecf3217d/include/uapi/linux/uio.h#L23
Checklist
libc-test/semver
have been updated*LAST
or*MAX
areincluded (see#3131)
cd libc-test && cargo test --target mytarget
);especially relevant for platforms that may not be checked in CI