about summary refs log tree commit diff
path: root/library/std/src/sys/sgx/abi
AgeCommit message (Collapse)AuthorLines
2021-06-22Rollup merge of #85054 - jethrogb:jb/sgx-inline-asm, r=AmanieuYuki Okushi-2/+2
Revert SGX inline asm syntax This was erroneously changed in #83387
2021-05-13Add support for const operands and options to global_asm!Amanieu d'Antras-1/+1
On x86, the default syntax is also switched to Intel to match asm!
2021-05-07Revert SGX inline asm syntaxJethro Beekman-2/+2
This was erroneously changed in #83387
2021-05-07Rearrange SGX split module filesJethro Beekman-0/+0
In #75979 several inlined modules were split out into multiple files. This PR keeps the multiple files but moves a few things around to organize things in a coherent way.
2021-04-21Ensure TLS destructors run before thread joins in SGXMohsen Zohrevandi-2/+4
2021-03-22Fix asm! from AT&T to Intel syntaxJosh Stone-1/+1
2021-03-22Update the minimum external LLVM to 10Josh Stone-2/+1
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.
2020-12-22Migrate standard library away from compare_and_swapLinus Färnstrand-4/+4
2020-11-12Upgrading dlmalloc to 0.2.1Raoul Strackx-0/+12
2020-10-08Auto merge of #77346 - Caduser2020:master, r=Mark-Simulacrumbors-62/+93
`#[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-62/+93
Run `./x.py` fmt Add reference link Fix reference link Apply review suggestions.
2020-09-28Prefer asm! in std - all in sgx moduleLzu Tao-2/+9
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-08-31std: move "mod tests/benches" to separate filesLzu Tao-114/+112
Also doing fmt inplace as requested.
2020-07-27mv std libs to library/mark-0/+2027