Skip to content

Add std::os::fortanix_sgx module #56978

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 4 commits into from
Dec 24, 2018
Merged

Conversation

jethrogb
Copy link
Contributor

@jethrogb jethrogb commented Dec 19, 2018

This PR adds the std::os::sgx module to expose platform-specific APIs behind the sgx_platform feature gate.

Depends on #56972 to be able to meaningfully build std::os documentation for non-standard targets.

Tracking issue: #56975

@rust-highfive
Copy link
Contributor

r? @joshtriplett

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 19, 2018
@@ -40,7 +40,7 @@ rustc_tsan = { path = "../librustc_tsan" }
dlmalloc = { version = "0.1", features = ['rustc-dep-of-std'] }

[target.x86_64-fortanix-unknown-sgx.dependencies]
fortanix-sgx-abi = { version = "0.3.1", features = ['rustc-dep-of-std'] }
fortanix-sgx-abi = { version = "0.3.2", features = ['rustc-dep-of-std'] }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Diff: fortanix/rust-sgx@769d806 (adding stability attributes)

@@ -63,4 +48,19 @@ cfg_if! {
}
}

#[cfg(target_os = "android")] pub mod android;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These changes are from #56972

@joshtriplett
Copy link
Member

cc @jsakkine-intel

@joshtriplett
Copy link
Member

joshtriplett commented Dec 19, 2018

I don't think it's reasonable for std::os::sgx to be an interface to specifically the fortanix SGX ABI, as opposed to some other SGX ABI. SGX enclaves can define any number of ABIs.

I would suggest calling this either std::os::sgx_fortanix or std::os::fortanix.

(For clarity, I don't think it makes sense for any other ABI to get the name std::os::sgx either. That would be like having std::os::x86_64 or similar; that isn't an OS, it's a platform on which you can provide many different OS interfaces.)

@jethrogb jethrogb changed the title Add std::os::sgx module Add std::os::fortanix_sgx module Dec 20, 2018
@jethrogb
Copy link
Contributor Author

Ok, changed to std::os::fortanix_sgx.

@joshtriplett
Copy link
Member

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 20, 2018

📌 Commit dcb5db8 has been approved by joshtriplett

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 20, 2018
Centril added a commit to Centril/rust that referenced this pull request Dec 24, 2018
Add `std::os::fortanix_sgx` module

This PR adds the `std::os::sgx` module to expose platform-specific APIs behind the `sgx_platform` feature gate.

Depends on rust-lang#56972 to be able to meaningfully build `std::os` documentation for non-standard targets.

Tracking issue: rust-lang#56975
bors added a commit that referenced this pull request Dec 24, 2018
Rollup of 10 pull requests

Successful merges:

 - #55470 (box: Add documentation for `From` impls)
 - #56242 (Add missing link in docs)
 - #56944 (bootstrap: Link LLVM as a dylib with ThinLTO)
 - #56978 (Add `std::os::fortanix_sgx` module)
 - #56985 (Allow testing pointers for inboundedness while forbidding dangling pointers)
 - #56986 (rustc: Move jemalloc from rustc_driver to rustc)
 - #57010 (Actually run compiletest tests on CI)
 - #57021 (Enable emission of alignment attrs for pointer params)
 - #57074 (Fix recursion limits)
 - #57085 (librustc_codegen_llvm: Don't eliminate empty structs in C ABI on linux-sparc64)

Failed merges:

r? @ghost
@bors bors merged commit dcb5db8 into rust-lang:master Dec 24, 2018
@bors
Copy link
Collaborator

bors commented Dec 24, 2018

⌛ Testing commit dcb5db8 with merge 50f3d6e...

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
O-SGX Target: SGX S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants