Update SGX SDK 2.15.1
This commit is contained in:
parent
a26a7627fe
commit
8fbb9b4796
2
deps/rust-sgx-sdk
vendored
2
deps/rust-sgx-sdk
vendored
@ -1 +1 @@
|
||||
Subproject commit e61c9a5ce5e4a0161696e9c1a75807fef105c9aa
|
||||
Subproject commit ae7ec5901c75b41626011a9e3c87b4a9b194f598
|
30
src/libos/Cargo.lock
generated
30
src/libos/Cargo.lock
generated
@ -232,7 +232,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown_tstd"
|
||||
version = "0.9.0"
|
||||
version = "0.11.2"
|
||||
|
||||
[[package]]
|
||||
name = "ident_case"
|
||||
@ -588,11 +588,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sgx_alloc"
|
||||
version = "1.1.3"
|
||||
version = "1.1.4"
|
||||
|
||||
[[package]]
|
||||
name = "sgx_backtrace_sys"
|
||||
version = "1.1.3"
|
||||
version = "1.1.4"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"sgx_build_helper",
|
||||
@ -601,11 +601,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sgx_build_helper"
|
||||
version = "0.1.3"
|
||||
version = "1.1.4"
|
||||
|
||||
[[package]]
|
||||
name = "sgx_cov"
|
||||
version = "1.1.3"
|
||||
version = "1.1.4"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"profiler_builtins",
|
||||
@ -617,18 +617,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sgx_demangle"
|
||||
version = "1.1.3"
|
||||
version = "1.1.4"
|
||||
|
||||
[[package]]
|
||||
name = "sgx_libc"
|
||||
version = "1.1.3"
|
||||
version = "1.1.4"
|
||||
dependencies = [
|
||||
"sgx_types",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sgx_rand"
|
||||
version = "1.1.3"
|
||||
version = "1.1.4"
|
||||
dependencies = [
|
||||
"sgx_trts",
|
||||
"sgx_tstd",
|
||||
@ -637,14 +637,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sgx_tcrypto"
|
||||
version = "1.1.3"
|
||||
version = "1.1.4"
|
||||
dependencies = [
|
||||
"sgx_types",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sgx_tprotected_fs"
|
||||
version = "1.1.3"
|
||||
version = "1.1.4"
|
||||
dependencies = [
|
||||
"sgx_trts",
|
||||
"sgx_types",
|
||||
@ -652,7 +652,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sgx_trts"
|
||||
version = "1.1.3"
|
||||
version = "1.1.4"
|
||||
dependencies = [
|
||||
"sgx_libc",
|
||||
"sgx_types",
|
||||
@ -660,14 +660,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sgx_tse"
|
||||
version = "1.1.3"
|
||||
version = "1.1.4"
|
||||
dependencies = [
|
||||
"sgx_types",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sgx_tstd"
|
||||
version = "1.1.3"
|
||||
version = "1.1.4"
|
||||
dependencies = [
|
||||
"hashbrown_tstd",
|
||||
"sgx_alloc",
|
||||
@ -682,11 +682,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sgx_types"
|
||||
version = "1.1.3"
|
||||
version = "1.1.4"
|
||||
|
||||
[[package]]
|
||||
name = "sgx_unwind"
|
||||
version = "0.1.1"
|
||||
version = "1.1.4"
|
||||
dependencies = [
|
||||
"sgx_build_helper",
|
||||
]
|
||||
|
@ -1 +1 @@
|
||||
nightly-2020-10-25
|
||||
nightly-2021-09-13
|
||||
|
@ -14,7 +14,6 @@
|
||||
#![feature(negative_impls)]
|
||||
// for may_dangle in rw_lock
|
||||
#![feature(dropck_eyepatch)]
|
||||
#![feature(option_expect_none)]
|
||||
// for UntrustedSliceAlloc in slice_alloc
|
||||
#![feature(slice_ptr_get)]
|
||||
#![feature(maybe_uninit_extra)]
|
||||
@ -23,6 +22,7 @@
|
||||
#![feature(test)]
|
||||
#![feature(atomic_from_mut)]
|
||||
#![feature(btree_drain_filter)]
|
||||
#![feature(bench_black_box)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate alloc;
|
||||
|
@ -214,11 +214,12 @@ impl Thread {
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
THREAD_NOTIFIERS
|
||||
.lock()
|
||||
.unwrap()
|
||||
.insert(self.tid(), eventfd)
|
||||
.expect_none("this thread should not have an eventfd before start");
|
||||
let event_file = THREAD_NOTIFIERS.lock().unwrap().insert(self.tid(), eventfd);
|
||||
|
||||
assert!(
|
||||
event_file.is_none(),
|
||||
"this thread should not have an eventfd before start"
|
||||
);
|
||||
|
||||
#[cfg(feature = "syscall_timing")]
|
||||
self.profiler()
|
||||
|
@ -1,5 +1,5 @@
|
||||
use super::*;
|
||||
use std::alloc::{AllocError, AllocRef, Layout};
|
||||
use std::alloc::{AllocError, Allocator, Layout};
|
||||
use std::ptr::{self, write_bytes, NonNull};
|
||||
|
||||
/// The global memory allocator for untrusted memory
|
||||
@ -7,8 +7,8 @@ pub static mut UNTRUSTED_ALLOC: UntrustedAlloc = UntrustedAlloc;
|
||||
|
||||
pub struct UntrustedAlloc;
|
||||
|
||||
unsafe impl AllocRef for UntrustedAlloc {
|
||||
fn alloc(&self, layout: Layout) -> std::result::Result<NonNull<[u8]>, AllocError> {
|
||||
unsafe impl Allocator for UntrustedAlloc {
|
||||
fn allocate(&self, layout: Layout) -> std::result::Result<NonNull<[u8]>, AllocError> {
|
||||
if layout.size() == 0 {
|
||||
return Err(AllocError);
|
||||
}
|
||||
@ -43,7 +43,7 @@ unsafe impl AllocRef for UntrustedAlloc {
|
||||
.unwrap())
|
||||
}
|
||||
|
||||
unsafe fn dealloc(&self, ptr: NonNull<u8>, layout: Layout) {
|
||||
unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout) {
|
||||
// Pre-condition: out-of-enclave
|
||||
debug_assert!(sgx_trts::trts::rsgx_raw_is_outside_enclave(
|
||||
ptr.as_ptr(),
|
||||
|
@ -1,5 +1,5 @@
|
||||
use super::*;
|
||||
use std::alloc::{AllocError, AllocRef, Layout};
|
||||
use std::alloc::{AllocError, Allocator, Layout};
|
||||
use std::ptr::NonNull;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
||||
@ -26,7 +26,7 @@ impl UntrustedSliceAlloc {
|
||||
}
|
||||
|
||||
let layout = Layout::from_size_align(buf_size, 1)?;
|
||||
let buf_ptr = unsafe { UNTRUSTED_ALLOC.alloc(layout)?.as_mut_ptr() };
|
||||
let buf_ptr = unsafe { UNTRUSTED_ALLOC.allocate(layout)?.as_mut_ptr() };
|
||||
|
||||
let buf_pos = AtomicUsize::new(0);
|
||||
Ok(Self {
|
||||
@ -72,7 +72,7 @@ impl Drop for UntrustedSliceAlloc {
|
||||
|
||||
let layout = Layout::from_size_align(self.buf_size, 1).unwrap();
|
||||
unsafe {
|
||||
UNTRUSTED_ALLOC.dealloc(NonNull::new(self.buf_ptr).unwrap(), layout);
|
||||
UNTRUSTED_ALLOC.deallocate(NonNull::new(self.buf_ptr).unwrap(), layout);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user