Bitdefender Hypervisor Memory Introspection
|
Go to the source code of this file.
Data Structures | |
struct | _DTR_HOOK_STATE |
struct | _HOOK_DTR |
Typedefs | |
typedef INTSTATUS(* | PFUNC_DtrReadWriteHookCallback) (DTR *OldDtr, DTR *NewDtr, DWORD Flags, INTRO_ACTION *Action) |
Called when a descriptor table register is accessed. More... | |
typedef struct _DTR_HOOK_STATE | DTR_HOOK_STATE |
typedef struct _DTR_HOOK_STATE * | PDTR_HOOK_STATE |
typedef struct _HOOK_DTR | HOOK_DTR |
typedef struct _HOOK_DTR * | PHOOK_DTR |
Functions | |
INTSTATUS | IntHookDtrSetHook (DWORD Flags, PFUNC_DtrReadWriteHookCallback Callback, void **Hook) |
Places a descriptor table register hook. More... | |
INTSTATUS | IntHookDtrRemoveHook (HOOK_DTR *Hook) |
Remove a descriptor register hook. More... | |
INTSTATUS | IntHookDtrCommit (void) |
Commit the descriptor registers hooks. More... | |
INTSTATUS | IntHookDtrInit (void) |
Initialize the descriptor registers hook state. More... | |
INTSTATUS | IntHookDtrUninit (void) |
Uninit the descriptor registers hooks state. More... | |
typedef struct _DTR_HOOK_STATE DTR_HOOK_STATE |
Global DTR hooks state.
typedef struct _DTR_HOOK_STATE * PDTR_HOOK_STATE |
typedef INTSTATUS(* PFUNC_DtrReadWriteHookCallback) (DTR *OldDtr, DTR *NewDtr, DWORD Flags, INTRO_ACTION *Action) |
Called when a descriptor table register is accessed.
[in] | OldDtr | Old descriptor table register value. |
[in] | NewDtr | New descriptor table register value. |
[in] | Flags | A combination of IG_DESC_ACCESS. |
[out] | Action | The desired action. |
Definition at line 21 of file hook_dtr.h.
INTSTATUS IntHookDtrCommit | ( | void | ) |
Commit the descriptor registers hooks.
This function will iterate the list of DTR hooks, and it will delete all the hooks that were flagged for removal.
INT_STATUS_SUCCESS | On success. |
INT_STATUS_NOT_INITIALIZED | If the DTR hooks state is not initialized. |
Definition at line 165 of file hook_dtr.c.
Referenced by IntGuestPreReturnCallback().
INTSTATUS IntHookDtrInit | ( | void | ) |
Initialize the descriptor registers hook state.
INT_STATUS_SUCCESS | On success. |
INT_STATUS_INSUFFICIENT_RESOURCES | If a memory alloc fails. |
Definition at line 203 of file hook_dtr.c.
Referenced by IntGuestInit().
Remove a descriptor register hook.
Removes a DTR hook. First of all, this function will mark the hook as being disabled (the callback will never be called again). If we are currently in the context of a DTR violation, we will wait for the commit phase to permanently delete the hook. Otherwise, the hook will be deleted immediately.
[in] | Hook | The hook to be removed. |
INT_STATUS_SUCCESS | On success. |
INT_STATUS_INVALID_PARAMETER | If an invalid parameter is supplied. |
Definition at line 106 of file hook_dtr.c.
Referenced by IntGdtrUnprotect(), IntHandleDtrViolation(), IntHookDtrRemoveAllHooks(), and IntIdtrUnprotect().
INTSTATUS IntHookDtrSetHook | ( | DWORD | Flags, |
PFUNC_DtrReadWriteHookCallback | Callback, | ||
void ** | Hook | ||
) |
Places a descriptor table register hook.
Establishes a hook on a descriptor table register. The Flags argument indicates which register is hooked and for what access. On each load or store on the hooked register, the callback will be called. NOTE: Make sure that the Flags contains only one of:
[in] | Flags | A combination of IG_DESC_ACCESS indicating what register & for what access the hook is set. |
[in] | Callback | The callback to be called when the indicated register is loaded/stored. |
[out] | Hook | The handle to the newly placed hook. |
INT_STATUS_SUCCESS | On success. |
INT_STATUS_INVALID_PARAMETER | If an invalid parameter is supplied. |
INT_STATUS_INSUFFICIENT_RESOURCES | If a memory alloc fails. |
Definition at line 11 of file hook_dtr.c.
Referenced by IntGdtrProtect(), and IntIdtrProtect().
INTSTATUS IntHookDtrUninit | ( | void | ) |
Uninit the descriptor registers hooks state.
INT_STATUS_SUCCESS | On success. |
INT_STATUS_NOT_INITIALIZED_HINT | If the DTR hooks state is not initialized. |
Definition at line 226 of file hook_dtr.c.
Referenced by IntGuestUninit().