-
Notifications
You must be signed in to change notification settings - Fork 11
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
uapi: Use libc for syscall constants #18
Conversation
a55e26e
to
2f81ca1
Compare
Thanks! Can you please remove the Cargo.lock from the commit? |
Sure, want me to add it to the |
Please just squash the commits. |
cb63f81
to
37ceefd
Compare
Cargo.toml
Outdated
@@ -16,7 +16,7 @@ readme = "README.md" | |||
|
|||
[dependencies] | |||
enumflags2 = "0.7" | |||
libc = "0.2" | |||
libc = "0.2.134" |
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.
Is it the earlier libc version where the Landlock syscalls have been added? It's a pity that the libc crate is using such versioning because we cannot have any guarantee that the used crate will have these flags… This is unfortunate but I still think this commit is worth it.
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.
The earliest version is actually 0.2.133
, I've changed it to make support a tiny bit better even.
It's a pity that the libc crate is using such versioning because we cannot have any guarantee that the used crate will have these flags
I'm not sure what you mean about this. The negotiation for versions should only ever go up, so it shouldn't be possible to pull landlock and end up with a version under 0.2.133
(after my latest change). So I think we can guarantee that the used crate will have these flags?
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.
Correct, I was thinking about the 0.*
exception but it is unrelated.
You actually pushed rust-lang/libc#2904, thanks! |
If you want to keep your commit signature, please prefix the subject with "uapi: ", otherwise I'll do it myself. |
37ceefd
to
a279b51
Compare
This patch switches from internally defined system call constants for the landlock system calls to the ones defined by `libc`. Besides removing unnecessary code already provided by the latest libc, this also adds support for additional architectures like ARM since the existing constants were limited to x86_64. Signed-off-by: Christian Duerr <chris.durr@phylum.io>
a279b51
to
0133aa5
Compare
Thanks! I removed the Cargo.lock file. |
This patch switches from internally defined system call constants for
the landlock system calls to the ones defined by
libc
.Besides removing unnecessary code already provided by the latest libc,
this also adds support for additional architectures like ARM since the
existing constants were limited to x86_64.