HyperDbg/hyperdbg/include/platform/kernel/header/PlatformEvent.h
Max Raulea 2f59ad7c70 Kernel Module now Links and compiles!!
The kernel module now links and compiles, there are still a lot of empty
TODOs left, there are empty stubs for hypertrace, assembly files and
kdserial etc. these can be introduced one by one. My first step will be
loading the kernel module from the userspace cli.

Big step forward! :)
2026-08-24 11:20:24 +02:00

56 lines
1.8 KiB
C

/**
* @file PlatformEvent.h
* @author Sina Karvandi (sina@hyperdbg.org)
* @brief Cross platform APIs for kernel event and object management
* @details
* @version 0.19
* @date 2026-05-09
*
* @copyright This project is released under the GNU Public License v3.
*
*/
#pragma once
#if defined(__linux__)
# include "../../../../include/SDK/HyperDbgSdk.h"
#endif // defined(__linux__)
#if defined(__linux__)
//
// NT's global event object-type pointer (ntddk). Shared code passes
// *ExEventObjectType when referencing a user-mode event handle; Linux has no
// object manager, so this is a placeholder token that the (fail-closed)
// PlatformObjectReferenceByHandle stub ignores. Defined in PlatformEvent.c.
//
extern POBJECT_TYPE * ExEventObjectType;
#endif // defined(__linux__)
//////////////////////////////////////////////////
// Functions //
//////////////////////////////////////////////////
VOID
PlatformObjectDereference(PVOID Object);
VOID
PlatformEventInitialize(PRKEVENT Event, EVENT_TYPE Type, BOOLEAN State);
LONG
PlatformEventSet(PKEVENT Event, KPRIORITY Increment, BOOLEAN Wait);
NTSTATUS
PlatformEventWait(PVOID Object,
KWAIT_REASON WaitReason,
KPROCESSOR_MODE WaitMode,
BOOLEAN Alertable,
PLARGE_INTEGER Timeout);
NTSTATUS
PlatformObjectReferenceByHandle(HANDLE Handle,
ACCESS_MASK DesiredAccess,
POBJECT_TYPE ObjectType,
KPROCESSOR_MODE AccessMode,
PVOID * Object,
POBJECT_HANDLE_INFORMATION HandleInformation);