about summary refs log tree commit diff
path: root/src/libstd/sys/sgx/mod.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-162/+0
2020-07-16Rollup merge of #73269 - mzohreva:mz/sgx-wait-timeout, r=jethrogbManish Goregaokar-3/+6
Enable some timeouts in SGX platform This would partially resolve https://github.com/fortanix/rust-sgx/issues/31 cc @jethrogb and @Goirad
2020-07-15Move usercall_wait_timeout to abi::usercalls::wait_timeoutMohsen Zohrevandi-76/+0
2020-07-12adjust remaining targetsRalf Jung-1/+1
2020-07-10Address review commentsMohsen Zohrevandi-16/+15
2020-06-18Improve wait_timeout_sgx, simplify usercalls::waitMohsen Zohrevandi-17/+50
2020-06-12Handle spurious wakeups in wait_timeout_sgxMohsen Zohrevandi-4/+12
2020-06-12Enable some timeouts in SGX platformMohsen Zohrevandi-3/+42
This would partially resolve https://github.com/fortanix/rust-sgx/issues/31
2020-05-17abort_internal is safeRalf Jung-2/+2
2019-12-22Format the worldMark Rousskov-8/+8
2019-07-05Remove last use of mem::uninitialized in SGXJethro Beekman-3/+1
2019-07-04Permit use of mem::uninitialized via allow(deprecated)Mark Rousskov-0/+2
2019-05-25std: Depend on `backtrace` crate from crates.ioAlex Crichton-2/+0
This commit removes all in-tree support for generating backtraces in favor of depending on the `backtrace` crate on crates.io. This resolves a very longstanding piece of duplication where the standard library has long contained the ability to generate a backtrace on panics, but the code was later extracted and duplicated on crates.io with the `backtrace` crate. Since that fork each implementation has seen various improvements one way or another, but typically `backtrace`-the-crate has lagged behind libstd in one way or another. The goal here is to remove this duplication of a fairly critical piece of code and ensure that there's only one source of truth for generating backtraces between the standard library and the crate on crates.io. Recently I've been working to bring the `backtrace` crate on crates.io up to speed with the support in the standard library which includes: * Support for `StackWalkEx` on MSVC to recover inline frames with debuginfo. * Using `libbacktrace` by default on MinGW targets. * Supporting `libbacktrace` on OSX as an option. * Ensuring all the requisite support in `backtrace`-the-crate compiles with `#![no_std]`. * Updating the `libbacktrace` implementation in `backtrace`-the-crate to initialize the global state with the correct filename where necessary. After reviewing the code in libstd the `backtrace` crate should be at exact feature parity with libstd today. The backtraces generated should have the same symbols and same number of frames in general, and there's not known divergence from libstd currently. Note that one major difference between libstd's backtrace support and the `backtrace` crate is that on OSX the crates.io crate enables the `coresymbolication` feature by default. This feature, however, uses private internal APIs that aren't published for OSX. While they provide more accurate backtraces this isn't appropriate for libstd distributed as a binary, so libstd's dependency on the `backtrace` crate explicitly disables this feature and forces OSX to use `libbacktrace` as a symbolication strategy. The long-term goal of this refactoring is to eventually move us towards a world where we can drop `libbacktrace` entirely and simply use Gimli and the surrounding crates for backtrace support. That's still aways off but hopefully will much more easily enabled by having the source of truth for backtraces live in crates.io! Procedurally if we go forward with this I'd like to transfer the `backtrace-rs` crate to the rust-lang GitHub organization as well, but I figured I'd hold off on that until we get closer to merging.
2019-04-06Rollup merge of #59624 - jethrogb:jb/sgx-unwind-syms, r=alexcrichtonMazdak Farrokhzad-0/+9
SGX target: Use linker option to avoid code CGU assignment kludge cc @VardhanThigle @faern
2019-04-01SGX target: Use linker option to avoid code CGU assignment kludgeJethro Beekman-0/+9
2019-04-01SGX target: convert a bunch of panics to abortsJethro Beekman-1/+1
2019-03-21Unify OsString/OsStr for byte-based implementationsJethro Beekman-1/+2
2019-02-28libstd => 2018Taiki Endo-30/+31
2019-02-13Add vectored read and write supportSteven Fackler-26/+26
This functionality has lived for a while in the tokio ecosystem, where it can improve performance by minimizing copies.
2019-02-06SGX target: simplify usercall internalsJethro Beekman-1/+1
This moves logic from assembly to Rust and removes the special case for exit/panic handling, merging it with regular usercall handling. Also, this fixes a bug in the exit usercall introduced in a75ae00. The bug would make regular exits look like panics with high probability. It would also with some probability leak information through uncleared registers.
2019-01-29SGX target: improve panic & exit handlingJethro Beekman-1/+1
2018-12-27Auto merge of #57119 - jethrogb:jb/sgx-os-mod2, r=joshtriplettbors-0/+7
Add `io` and `arch` modules to `std::os::fortanix_sgx` This PR adds two more (unstable) modules to `std::os::fortanix_sgx` for the `x86_64-fortanix-unknown-sgx` target. ### io `io` allows conversion between raw file descriptors and Rust types, similar to `std::os::unix::io`. ### arch `arch` exposes the `ENCLU[EREPORT]` and `ENCLU[EGETKEY]` instructions. The current functions are very likely not going to be the final form of these functions (see also https://github.com/fortanix/rust-sgx/issues/15), but this should be sufficient to enable experimentation in libraries. I tried using the actual types (from the [`sgx-isa` crate](https://crates.io/crates/sgx-isa)) instead of byte arrays, but that would make `std` dependent on the `bitflags` crate which I didn't want to do at this time.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-25Add `io` and `arch` modules to `std::os::fortanix_sgx`Jethro Beekman-0/+7
2018-12-07SGX target: implement streamsJethro Beekman-0/+1
2018-12-07SGX target: implement synchronization primitives and threadingJethro Beekman-0/+1
2018-12-07Add x86_64-fortanix-unknown-sgx target to libstd and dependenciesJethro Beekman-0/+151
The files src/libstd/sys/sgx/*.rs are mostly copied/adapted from the wasm target. This also updates the dlmalloc submodule to the very latest version.