about summary refs log tree commit diff
path: root/library/std/src/sys/sgx/abi/usercalls
AgeCommit message (Collapse)AuthorLines
2024-01-11std: begin moving platform support modules into `pal`joboet-1473/+0
2023-11-26Making `User<T>` and `User<[T]>` `Send`Raoul Strackx-0/+6
2023-07-31Clean up SGX user memory copiesJethro Beekman-122/+85
2023-04-12remove some unneeded importsKaDiWa-1/+0
2022-09-04Make code worling w/ pointers in ↵Maybe Waffle-14/+14
`library/std/src/sys/sgx/abi/usercalls/alloc.rs` nicer - Use `.addr()` instead of `as`-cast - Use `add` instead of `offset` and remove some `as isize` casts by doing that - Remove some casts
2022-08-22Rollup merge of #100820 - WaffleLapkin:use_ptr_is_aligned_methods, r=scottmcmDylan DPC-2/+2
Use pointer `is_aligned*` methods This PR replaces some manual alignment checks with calls to `pointer::{is_aligned, is_aligned_to}` and removes a useless pointer cast. r? `@scottmcm` _split off from #100746_
2022-08-21Rollup merge of #100822 - WaffleLapkin:no_offset_question_mark, r=scottmcmMatthias Krüger-2/+2
Replace most uses of `pointer::offset` with `add` and `sub` As PR title says, it replaces `pointer::offset` in compiler and standard library with `pointer::add` and `pointer::sub`. This generally makes code cleaner, easier to grasp and removes (or, well, hides) integer casts. This is generally trivially correct, `.offset(-constant)` is just `.sub(constant)`, `.offset(usized as isize)` is just `.add(usized)`, etc. However in some cases we need to be careful with signs of things. r? ````@scottmcm```` _split off from #100746_
2022-08-21Make use of `pointer::is_aligned[_to]`Maybe Waffle-2/+2
2022-08-21Replace most uses of `pointer::offset` with `add` and `sub`Maybe Waffle-2/+2
2022-08-20Rollup merge of #100642 - mzohreva:mz/update-sgx-abi-cancel-queue, ↵Matthias Krüger-4/+30
r=Mark-Simulacrum Update fortanix-sgx-abi and export some useful SGX usercall traits Update `fortanix-sgx-abi` to 0.5.0 to add support for cancel queue (see https://github.com/fortanix/rust-sgx/pull/405 and https://github.com/fortanix/rust-sgx/pull/404). Export some useful traits for processing SGX usercall. This is needed for https://github.com/fortanix/rust-sgx/pull/404 to avoid duplication. cc `@raoulstrackx` and `@jethrogb`
2022-08-17Mitigate Stale Data Read for xAPIC vulnerabilityRaoul Strackx-7/+137
In order to mitigate the Stale Data Read for xAPIC vulnerability completely, reading userspace from an SGX enclave must be aligned and in 8-bytes chunks. References: - https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00657.html - https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/advisory-guidance/stale-data-read-from-xapic.html
2022-08-16Update fortanix-sgx-abi and export some useful SGX usercall traitsMohsen Zohrevandi-4/+30
Update fortanix-sgx-abi to 0.5.0 to add support for cancel queue (see https://github.com/fortanix/rust-sgx/pull/405 and https://github.com/fortanix/rust-sgx/pull/404). Export some useful traits for processing SGX usercall. This is needed for https://github.com/fortanix/rust-sgx/pull/404 to avoid duplication.
2022-08-16Refactor copying data to userspaceRaoul Strackx-19/+32
2022-08-05cleanup code w/ pointers in std a littleMaybe Waffle-1/+1
2022-06-22Address reviewer commentsRaoul Strackx-5/+10
2022-06-15Test `copy_to_userspace` functionRaoul Strackx-1/+33
2022-06-15Ensure userspace allocation is 8-byte alignedRaoul Strackx-1/+4
2022-06-15Mitigate MMIO stale data vulnerabilitiesRaoul Strackx-2/+98
Intel Security Advisory: https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00615.html
2022-06-15Unify copying data from enclave to userspaceRaoul Strackx-7/+3
2022-05-09Use Rust 2021 prelude in std itself.Mara Bos-1/+0
2022-04-01Remove need for associated_type_bounds in std.Mara Bos-2/+4
2022-03-10Use implicit capture syntax in format_argsT-O-R-U-S-3/+3
This updates the standard library's documentation to use the new syntax. The documentation is worthwhile to update as it should be more idiomatic (particularly for features like this, which are nice for users to get acquainted with). The general codebase is likely more hassle than benefit to update: it'll hurt git blame, and generally updates can be done by folks updating the code if (and when) that makes things more readable with the new format. A few places in the compiler and library code are updated (mostly just due to already having been done when this commit was first authored).
2020-10-08`#[deny(unsafe_op_in_unsafe_fn)]` in sys/sgxCaduser2020-58/+86
Run `./x.py` fmt Add reference link Fix reference link Apply review suggestions.
2020-07-27mv std libs to library/mark-0/+1175