Skip to content
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

Fix CI #561

Merged
merged 4 commits into from
Feb 29, 2024
Merged

Fix CI #561

merged 4 commits into from
Feb 29, 2024

Conversation

raoulstrackx
Copy link
Contributor

CI is currently broken due to a more intelligent nightly compiler and warnings being treated as errors. This PR fixes these errors.

Fixes #560

@@ -418,8 +418,8 @@ impl<W: Write> SgxsWrite for W {
let mut buf = [0u8; 64];
unsafe {
let (tag, headerdst) = buf.split_at_mut(8);
let tag = &mut *(&mut tag[0] as *mut _ as *mut u64);
let headerdst = &mut headerdst[0] as *mut _;
let tag = &mut *(&mut tag[0..8] as *mut _ as *mut u64);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wow, so new nightly compiler will warn this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it surprised me too!

@nshyrei nshyrei self-requested a review February 29, 2024 10:51
@nshyrei nshyrei self-requested a review February 29, 2024 10:53
let tag = &mut *(&mut tag[0] as *mut _ as *mut u64);
let headerdst = &mut headerdst[0] as *mut _;
let tag = &mut *(&mut tag[0..8] as *mut _ as *mut u64);
let headerdst = &mut headerdst[0..56] as *mut _;
Copy link
Contributor

Choose a reason for hiding this comment

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

@raoulstrackx Where is this 56 byte size mentioned? I understand in the line above that 8 bytes translate to u64, but what is this type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's size comes from how MRENCLAVE is being measured. See the sgxs documentation and Intel Manual vol 3D ch 36.4.1.1 At the Rust code level, there isn't one an explicit type for it. Based on what's being added (ECreate, Unsized,...) different types are used.

@raoulstrackx raoulstrackx added this pull request to the merge queue Feb 29, 2024
Merged via the queue into master with commit 8bfe2ac Feb 29, 2024
1 check passed
@Taowyoo Taowyoo deleted the raoul/gh-560-fix_CI branch April 12, 2024 23:25
@Taowyoo Taowyoo mentioned this pull request Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI is currently broken on the latest nightly compiler
3 participants