mirror of
https://github.com/reactos/reactos.git
synced 2025-06-24 22:29:58 +00:00
27 lines
523 B
ArmAsm
27 lines
523 B
ArmAsm
//
|
|
// __security_check_cookie.asm
|
|
//
|
|
// Copyright (c) 2024 Timo Kreuzer
|
|
//
|
|
// Implementation of __security_check_cookie for x64.
|
|
//
|
|
// SPDX-License-Identifier: MIT
|
|
//
|
|
|
|
#include <asm.inc>
|
|
|
|
EXTERN __security_cookie:QWORD
|
|
EXTERN __report_gsfailure:PROC
|
|
|
|
.code64
|
|
|
|
// This function must not clobber any registers!
|
|
PUBLIC __security_check_cookie
|
|
__security_check_cookie:
|
|
cmp rcx, qword ptr __security_cookie[rip]
|
|
jne __security_check_cookie_fail
|
|
ret
|
|
__security_check_cookie_fail:
|
|
jmp __report_gsfailure
|
|
|
|
END
|