File tree Expand file tree Collapse file tree 2 files changed +0
-15
lines changed Expand file tree Collapse file tree 2 files changed +0
-15
lines changed Original file line number Diff line number Diff 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-
4437pub fn is_user_range ( p : * const u8 , len : usize ) -> bool {
4538 let start=p as u64 ;
4639 let end=start + ( len as u64 ) ;
Original file line number Diff line number Diff 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-
4436pub fn write ( fd : Fd , buf : & [ u8 ] ) -> IoResult < usize > {
4537 unsafe {
4638 let userbuf = alloc:: User :: new_from_enclave ( buf) ;
You can’t perform that action at this time.
0 commit comments