Skip to content

Commit acd9b22

Browse files
committed
revert changes
1 parent 9fe334c commit acd9b22

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/hyperlight_guest/src/entrypoint.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ use crate::guest_function_call::dispatch_function;
2727
use crate::guest_logger::init_logger;
2828
use crate::host_function_call::{outb, OutBAction};
2929
use crate::{
30-
HEAP_ALLOCATOR, MIN_STACK_ADDRESS, OS_PAGE_SIZE, OUTB_PTR, OUTB_PTR_WITH_CONTEXT, P_PEB,
31-
RUNNING_MODE, __SECURITY_COOKIE,
30+
__security_cookie, HEAP_ALLOCATOR, MIN_STACK_ADDRESS, OS_PAGE_SIZE, OUTB_PTR,
31+
OUTB_PTR_WITH_CONTEXT, P_PEB, RUNNING_MODE,
3232
};
3333

3434
#[inline(never)]
@@ -84,7 +84,7 @@ pub extern "win64" fn entrypoint(peb_address: u64, seed: u64, ops: u64, max_log_
8484
unsafe {
8585
P_PEB = Some(peb_address as *mut HyperlightPEB);
8686
let peb_ptr = P_PEB.unwrap();
87-
__SECURITY_COOKIE = peb_address ^ seed;
87+
__security_cookie = peb_address ^ seed;
8888

8989
let srand_seed = ((peb_address << 8 ^ seed >> 4) >> 32) as u32;
9090

src/hyperlight_guest/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pub(crate) static HEAP_ALLOCATOR: LockedHeap<32> = LockedHeap::<32>::empty();
8787

8888
///cbindgen:ignore
8989
#[no_mangle]
90-
pub(crate) static mut __SECURITY_COOKIE: u64 = 0;
90+
pub(crate) static mut __security_cookie: u64 = 0;
9191

9292
pub(crate) static mut P_PEB: Option<*mut HyperlightPEB> = None;
9393
pub static mut MIN_STACK_ADDRESS: u64 = 0;

src/hyperlight_guest/src/security_check.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ limitations under the License.
1919

2020
use hyperlight_common::flatbuffer_wrappers::guest_error::ErrorCode::GsCheckFailed;
2121

22+
use crate::__security_cookie;
2223
use crate::guest_error::set_error_and_halt;
23-
use crate::__SECURITY_COOKIE;
2424

2525
///cbindgen:ignore
2626
#[no_mangle]
2727
pub(crate) extern "C" fn __security_check_cookie(cookie: u64) {
2828
unsafe {
29-
if __SECURITY_COOKIE != cookie {
29+
if __security_cookie != cookie {
3030
set_error_and_halt(GsCheckFailed, "GS Check Failed");
3131
}
3232
}

0 commit comments

Comments
 (0)