about summary refs log tree commit diff
path: root/library/std/src/sys/sgx
AgeCommit message (Collapse)AuthorLines
2021-04-22Remove `sys::args::Args::inner_debug` and use `Debug` insteadChristiaan Dirkx-3/+4
2021-04-22Move all cleanup to `sys::cleanup`Christiaan Dirkx-4/+0
2021-04-22Rework `at_exit` to `cleanup`Christiaan Dirkx-2/+5
2021-04-21Ensure TLS destructors run before thread joins in SGXMohsen Zohrevandi-10/+65
2021-04-20Change uses of never typeChristiaan Dirkx-35/+36
2021-04-20Replace `Void` with never typeChristiaan Dirkx-10/+5
2021-04-18Rename `NotSupported` to `Unsupported`Christiaan Dirkx-1/+1
2021-04-18Use `NotSupported` in more placesChristiaan Dirkx-1/+1
2021-03-25Auto merge of #83387 - cuviper:min-llvm-10, r=nagisabors-7/+4
Update the minimum external LLVM to 10 r? `@nikic`
2021-03-22Fix asm! from AT&T to Intel syntaxJosh Stone-1/+1
2021-03-22Update the minimum external LLVM to 10Josh Stone-6/+3
2021-03-21Use io::Error::new_const everywhere to avoid allocations.Mara Bos-9/+9
2021-03-03Auto merge of #76345 - okready:sgx-mem-range-overflow-checks, r=joshtriplettbors-8/+34
Add is_enclave_range/is_user_range overflow checks Fixes #76343. This adds overflow checking to `is_enclave_range` and `is_user_range` in `sgx::os::fortanix_sgx::mem` in order to mitigate possible security issues with enclave code. It also accounts for an edge case where the memory range provided ends exactly at the end of the address space, where calculating `p + len` would overflow back to zero despite the range potentially being valid.
2021-01-13deprecate atomic::spin_loop_hint in favour of hint::spin_loopAshley Mannix-2/+3
2020-12-22Migrate standard library away from compare_and_swapLinus Färnstrand-5/+5
2020-11-24Auto merge of #78953 - mzohreva:mz/from_raw_fd, r=Mark-Simulacrumbors-10/+35
Add Metadata in std::os::fortanix_sgx::io::FromRawFd Needed for https://github.com/fortanix/rust-sgx/pull/291 cc `@jethrogb`
2020-11-17Rollup merge of #78138 - fortanix:raoul/dlmalloc0.2, r=Mark-SimulacrumMara Bos-1/+57
Upgrade dlmalloc to version 0.2 In preparation of adding dynamic memory management support for SGXv2-enabled platforms, the dlmalloc crate has been refactored. More specifically, support has been added to implement platform specification outside of the dlmalloc crate. (see https://github.com/alexcrichton/dlmalloc-rs/pull/15) This PR upgrades dlmalloc to version 0.2 for the `wasm` and `sgx` targets. As the dlmalloc changes have received a positive review, but have not been merged yet, this PR contains a commit to prevent tidy from aborting CI prematurely. cc: `@jethrogb`
2020-11-12Upgrading dlmalloc to 0.2.1Raoul Strackx-1/+57
2020-11-12Add missing stability attributeMohsen Zohrevandi-0/+2
2020-11-11Add Metadata in std::os::fortanix_sgx::io::FromRawFdMohsen Zohrevandi-10/+33
2020-11-07Convert a bunch of intra-doc linksCamelid-1/+1
2020-10-18Remove redundant 'static from library cratesest31-8/+8
2020-10-08Auto merge of #77346 - Caduser2020:master, r=Mark-Simulacrumbors-119/+170
`#[deny(unsafe_op_in_unsafe_fn)]` in sys/sgx This is part of #73904. Enclose unsafe operations in unsafe blocks in `libstd/sys/sgx`.
2020-10-08`#[deny(unsafe_op_in_unsafe_fn)]` in sys/sgxCaduser2020-119/+170
Run `./x.py` fmt Add reference link Fix reference link Apply review suggestions.
2020-10-02Make it possible to have unboxed condvars on specific platforms.Mara Bos-0/+2
This commit keeps all condvars boxed on all platforms, but makes it trivial to remove the box on some platforms later.
2020-10-02Make it possible to have unboxed mutexes on specific platforms.Mara Bos-0/+2
This commit keeps all mutexes boxed on all platforms, but makes it trivial to remove the box on some platforms later.
2020-09-28Prefer asm! in std - all in sgx moduleLzu Tao-16/+24
2020-09-15Consolidate byte-identical modules.Eric Huss-542/+4
2020-09-04Add is_enclave_range/is_user_range overflow checksTheodore Cipicchio-8/+34
Functions such as `is_enclave_range` and `is_user_range` in `sgx::os::fortanix_sgx::mem` are often used to make sure memory ranges passed to an enclave from untrusted code or passed to other trusted code functions are safe to use for their intended purpose. Currently, these functions do not perform any checks to make sure the range provided doesn't overflow when adding the range length to the base address. While debug builds will panic if overflow occurs, release builds will simply wrap the result, leading to false positive results for either function. The burden is placed on application authors to know to perform overflow checks on their own before calling these functions, which can easily lead to security vulnerabilities if omitted. Additionally, since such checks are performed in the Intel SGX SDK versions of these functions, developers migrating from Intel SGX SDK code may expect these functions to operate the same. This commit adds explicit overflow checking to `is_enclave_range` and `is_user_range`, returning `false` if overflow occurs in order to prevent misuse of invalid memory ranges. It also alters the checks to account for ranges that lie exactly at the end of the address space, where calculating `p + len` would overflow despite the range being valid.
2020-09-03Improve SGX RWLock initializer testJethro Beekman-23/+11
2020-08-31std: move "mod tests/benches" to separate filesLzu Tao-547/+538
Also doing fmt inplace as requested.
2020-08-21Make raw standard stream constructors constTomasz Miąsko-3/+3
2020-08-21Remove result type from raw standard streams constructorsTomasz Miąsko-6/+6
Raw standard streams constructors are infallible. Remove unnecessary result type.
2020-07-27mv std libs to library/mark-0/+5201