Skip to content

Commit 1346619

Browse files
committed
Remove some dead code from sgx
1 parent 799cadb commit 1346619

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

src/libstd/sys/sgx/abi/mem.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ fn image_base() -> u64 {
3434
base
3535
}
3636

37-
pub fn is_enclave_range(p: *const u8, len: usize) -> bool {
38-
let start=p as u64;
39-
let end=start + (len as u64);
40-
start >= image_base() &&
41-
end <= image_base() + (unsafe { ENCLAVE_SIZE } as u64) // unsafe ok: link-time constant
42-
}
43-
4437
pub fn is_user_range(p: *const u8, len: usize) -> bool {
4538
let start=p as u64;
4639
let end=start + (len as u64);

src/libstd/sys/sgx/abi/usercalls/mod.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ pub fn read(fd: Fd, buf: &mut [u8]) -> IoResult<usize> {
3333
}
3434
}
3535

36-
pub fn read_alloc(fd: Fd) -> IoResult<Vec<u8>> {
37-
unsafe {
38-
let mut userbuf = alloc::User::<ByteBuffer>::uninitialized();
39-
raw::read_alloc(fd, userbuf.as_raw_mut_ptr()).from_sgx_result()?;
40-
Ok(copy_user_buffer(&userbuf))
41-
}
42-
}
43-
4436
pub fn write(fd: Fd, buf: &[u8]) -> IoResult<usize> {
4537
unsafe {
4638
let userbuf = alloc::User::new_from_enclave(buf);

0 commit comments

Comments
 (0)