-
Notifications
You must be signed in to change notification settings - Fork 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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more definitions from linux/tls.h #3422
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
pub const TLS_1_2_VERSION: ::__u16 = | ||
((TLS_1_2_VERSION_MAJOR as ::__u16) << 8) | (TLS_1_2_VERSION_MINOR as ::__u16); |
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 actual header uses a macro for this and TLS_1_3_VERSION
:
#define TLS_VERSION_NUMBER(id) ((((id##_VERSION_MAJOR) & 0xFF) << 8) | \
((id##_VERSION_MINOR) & 0xFF))
I've inlined the calculation here rather than bind it to a fn
because I figured there's no reason a user would want to use it.
@bors r+ |
Add more definitions from linux/tls.h
💔 Test failed - checks-actions |
What does the CI failure mean? That the mips builder's version of the header doesn't define the CHACHA20-POLY1305-related items? The definitions in the header aren't arch-specific so I guess the builder just has old headers (added in v5.11). What should be done? |
e.g. |
Can I get a bors rerun please? |
libc-test/build.rs
Outdated
@@ -3593,6 +3593,10 @@ fn test_linux(target: &str) { | |||
// FIXME: The size of `iv` has been changed since Linux v6.0 | |||
// https://github.com/torvalds/linux/commit/94dfc73e7cf4a31da66b8843f0b9283ddd6b8381 | |||
"af_alg_iv" => true, | |||
|
|||
// FIXME: Requires >= 5.11 kernel headers | |||
"tls12_crypto_info_chacha20_poly1305" if (mips || mips64) && musl => true, |
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.
Did you check there is really no more to add than this ?
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.
Yes, I ran ci/run-docker.sh
for the mips target locally. The issue is only with Chacha20-Poly1305 definitions, so this one struct and the six consts.
Could you squash commits into one? |
Sure. I was hoping to have the CI run first just in case there are other architectures that are also broken, since the previous CI run cancelled them when mips failed. |
@JohnTitor Can you re-run bors please? |
👍 @bors r+ |
Add more definitions from linux/tls.h
💔 Test failed - checks-actions |
Sigh, i686 failed this time. And again because it cancelled all the other jobs I don't know what else is broken. I'm going to have to run them all locally... |
Every target that uses install-musl.sh also pulls in ancient headers without TLS 1.3 or AES-256-GCM support, so I've updated build.rs to catch those too. I ran all the targets that CI tests locally and they all pass now. So bors should work too. @JohnTitor Can you rerun it please? |
@bors r+ |
☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14 |
No description provided.