Bitdefender Hypervisor Memory Introspection
swapgs.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 Bitdefender
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #ifndef _SWAPGS_H_
6 #define _SWAPGS_H_
7 
8 #include "thread_safeness.h"
9 
12  void
13  );
14 
15 void
17  void
18  );
19 
20 void
22  void
23  );
24 
25 BOOLEAN
27  _In_ QWORD Ptr,
28  _In_ THS_PTR_TYPE Type,
29  _Out_opt_ QWORD *Gadget
30  );
31 
32 QWORD
34  _In_ QWORD Ptr
35  );
36 
37 #endif // _SWAPGS_H_
_Bool BOOLEAN
Definition: intro_types.h:58
void IntSwapgsDisable(void)
Disable SWAPGS mitigations. Must be used only for PrepareUninit.
Definition: swapgs.c:501
#define _In_
Definition: intro_sal.h:21
int INTSTATUS
The status data type.
Definition: introstatus.h:24
void IntSwapgsUninit(void)
Uninit the SWAPGS mitigation.
Definition: swapgs.c:446
BOOLEAN IntSwapgsIsPtrInHandler(QWORD Ptr, THS_PTR_TYPE Type, QWORD *Gadget)
Check if a pointer points inside a SWAPGS handler.
Definition: swapgs.c:531
#define _Out_opt_
Definition: intro_sal.h:30
QWORD IntSwapgsRelocatePtrIfNeeded(QWORD Ptr)
Relocate a pointer if it points inside a SWAPGS gadget, and make it point inside the installed handle...
Definition: swapgs.c:579
unsigned long long QWORD
Definition: intro_types.h:53
THS_PTR_TYPE
The type of pointer to be checked.
INTSTATUS IntSwapgsStartMitigation(void)
Scan the kernel for vulnerable SWAPGS gadgets, and mitigate CVE-2019-1125, when such gadgets are foun...
Definition: swapgs.c:190