kernel
Loading...
Searching...
No Matches
ps.h
Go to the documentation of this file.
1#ifndef X86_MATANEL_PROCESS_H
2#define X86_MATANEL_PROCESS_H
3
4/*++
5
6Module Name:
7
8 mp.h
9
10Purpose:
11
12 This module contains the header files required for process and thread management.
13
14Author:
15
16 slep (Matanel) 2025.
17
18Revision History:
19
20--*/
21
22// Base includes
23#include <stdint.h>
24#include <stddef.h>
25
26// Other file includes
27#include "me.h"
28#include "ht.h"
29#include "ob.h"
30#include "core.h"
31
32// Exception Includes
33#include "exception.h"
34
35// ------------------ ENUMERATORS ------------------
36
45
46typedef enum _PROCESS_STATE {
47 PROCESS_RUNNING = 0, // A thread in the process is currently running
48 PROCESS_READY, // The process is ready to run. (essentially its threads)
49 PROCESS_WAITING, // Waiting on a mutual exclusion or just sleeping.
50 PROCESS_TERMINATING, // The process is ongoing termination in the kernel.
51 PROCESS_TERMINATED, // Process is terminated, but core parts of its structure has been kept.
52 PROCESS_SUSPENDED // The process has been suspended by the kernel, either by choice or forcefully.
54
59
60// ------------------ STRUCTURES ------------------
61
62//
63// Thread Access Rights
64//
65#define MT_THREAD_TERMINATE 0x0001 // Terminate the thread
66#define MT_THREAD_SUSPEND_RESUME 0x0002 // Suspend or resume thread execution
67#define MT_THREAD_SET_CONTEXT 0x0004 // Modify thread CPU context (registers, RIP/RSP)
68#define MT_THREAD_GET_CONTEXT 0x0008 // Read thread CPU context
69#define MT_THREAD_QUERY_INFO 0x0010 // Query thread info (state, priority, etc.)
70#define MT_THREAD_SET_INFO 0x0020 // Modify thread info (priority, name, affinity)
71
72#define MT_THREAD_ALL_ACCESS 0x003F // Request all valid thread access rights
73
74
75//
76// Process Access Rights
77//
78#define MT_PROCESS_TERMINATE 0x0001 // Kill the process
79#define MT_PROCESS_CREATE_THREAD 0x0002 // Create a new thread inside process
80#define MT_PROCESS_VM_OPERATION 0x0004 // Allocate/Protect/Free process memory
81#define MT_PROCESS_VM_READ 0x0008 // Read from process memory
82#define MT_PROCESS_VM_WRITE 0x0010 // Write to process memory
83#define MT_PROCESS_DUP_HANDLE 0x0020 // Duplicate a handle into this process
84#define MT_PROCESS_SET_INFO 0x0040 // Modify process properties/metadata
85#define MT_PROCESS_QUERY_INFO 0x0080 // Query process details (PID, exit code, etc.)
86#define MT_PROCESS_SUSPEND_RESUME 0x0100 // Suspend / Resume process
87#define MT_PROCESS_CREATE_PROCESS 0x0200 // Create a new process.
88
89#define MT_PROCESS_ALL_ACCESS 0x03FF // Everything above
90
96
97typedef struct _LDR_DATA_TABLE_ENTRY {
98 void* EntryPoint; // Entry point of module.
99 void* Base; // Base address of module. (start address, not entrypoint, like offset 0 of a file)
100 uint64_t SizeOfImage; // Size of the loaded module in bytes.
101 char FullName[256]; // Path of loaded module (including file and extension).
102 uint64_t LoadTime; // Epoch timestamp of time module loaded.
103
104 // The list entry itself.
105 DOUBLY_LINKED_LIST LoadedModuleList; // Doubly linked list of LDR_DATA_TABLE_ENTRY
107
108typedef struct _PEB_LDR_DATA {
109 DOUBLY_LINKED_LIST LoadedModuleList; // Doubly linked list of LDR_DATA_TABLE_ENTRY
111
112typedef struct _PEB {
113 uint8_t BeingDebugged; // Flag set if process is being debugged
114 void* ImageBase; // Pointer of executable entry point in memory.
117
118typedef struct _MT_TIB {
119 void* ExceptionList; // SEH Chain.
120 void* StackBase; // The base of this thread's stack.
121 void* StackLimit; // The maximum address of the stack (any pushes beyond here are guard pages)
123
124typedef struct _TEB {
125 MT_TIB MtTib; // GS:[0] should point here.
126 uint64_t UniqueProcessId; // Current ID of this thread's process.
127 uint64_t UniqueThreadId; // Current ID of this thread.
128 PPEB ProcessEnvironmentBlock; // Pointer to this thread's process's PEB.
129 int32_t LastErrorValue; // The last error that the thread's has done in an operation (failed function, illegal instruction)
130 int32_t LastStatusValue; // Internal MTSTATUS Values.
132
133typedef struct _MT_MODULE_INFO {
134 char FullPath[256];
135 uint64_t Size;
136 void* Base;
138
144
145typedef struct _EPROCESS {
146 struct _IPROCESS InternalProcess; // Internal process structure. (KPROCESS Equivalent-ish)
147 char ImageName[24]; // Process image name - e.g "mtoskrnl.mtexe"
148 HANDLE PID; // Process Identifier, unique identifier to the process. (do not use HtClose on this, only PsDeleteCid)
149 HANDLE ParentProcess; // Parent Process Handle
150 uint32_t priority; // TODO
151 uint64_t CreationTime; // Timestamp of creation, seconds from 1970 January 1st. (may change)
152 // SID TODO. - User info as well, when users.
153
154 PPEB Peb; // Accessible only pageable IRQL (APC_LEVEL and below), and only when process is setupped.
155 HANDLE SectionHandle; // Handle for the process section view.
156 HANDLE MtdllHandle; // SECTION Handle for MTDLL, i need alternatives.
157
158 // Synchorinzation for internal functions.
159 struct _RUNDOWN_REF ProcessRundown; // A process rundown that is used to safely synchronize the teardown or deletion of a process, ensuring no pointer is still active & accessing it.
160 struct _PUSH_LOCK ProcessLock; // A process push lock that is used to mutually synchronize access to its locked objects, allowing 1 writer at a time, but multiple readers (if no writers)
161
162 // Thread infos
163 struct _ETHREAD* MainThread; // Pointer to the main thread created for the process.
164 PUSH_LOCK ThreadListLock; // Protects synchronization in AllThreads.
165 DOUBLY_LINKED_LIST AllThreads; // A linked list of pointers to the current threads of the process. (inserted with each new creation)
166 uint32_t NumThreads; // Unsigned 32 bit integer representing the amount of threads the process has.
167 PUSH_LOCK AddressSpaceLock; // A push lock designed to protect synchronization in creating the next stack for another thread in the PROCESS.
168 uintptr_t NextStackHint; // Top down search for the next stack.
169
170 // Handle Table
172
173 // Special Flags.
176
177 // VAD (todo process quota)
178 struct _MMVAD* VadRoot; // The Root of the VAD for the process. (used to find free virtual addresses spaces in the process, and information about them)
179 PUSH_LOCK VadLock; // The push lock to ensure VAD atomicity.
181
182typedef struct _ETHREAD {
183 struct _ITHREAD InternalThread; // Internal thread structure. (KTHREAD Equivalent-ish)
184
187 HANDLE TID; /* thread id */
188 HANDLE PID; // Thread's process PID.
189 struct _EVENT* CurrentEvent; /* ptr to current EVENT if any. */
190 struct _EPROCESS* ParentProcess; /* pointer to the parent process of the thread */
191 struct _DOUBLY_LINKED_LIST ThreadListEntry; // Forward and backward links to queue threads in.
192 struct _DOUBLY_LINKED_LIST SchedulerListEntry; // Forward and backward links that the scheduler enqueues and dequeues threads from.
193 struct _RUNDOWN_REF ThreadRundown; // A thread rundown that is used to safely synchronize the teardown or deletion of a thread, ensuring no other threads are still accessing it.
194 PUSH_LOCK ThreadLock; // Used for mutual synchronization.
195 MTSTATUS ExitStatus; // The status the thread exited in.
196
197 // Note that LastStatus and LastError should be stored in the TEB, by the way, the TEB is already established
198 // But until I dont finish MTDLL I wont include a ptr to the TEB here.
199 MTSTATUS LastStatus; // The last status set by violation.
200 bool SystemThread; // Is this thread a system thread?
201 bool WorkerThread; // is this thread a worker thread?
202 /* TODO: priority, affinity, wait list, etc. */
204
210
211// ------------------ MACROS ------------------
212#define PROCESS_STACK_SIZE (32*1024) // 32 KiB
213#define PROCESS_STACK_ALIGNMENT 16 // Alignment of 16 Bytes.
214
215// ------------------ TYPE DEFINES ------------------
216
217typedef void* THREAD_PARAMETER;
219
220// ------------------ FUNCTIONS ------------------
221
223
226 IN const char* ExecutablePath,
227 OUT PHANDLE ProcessHandle,
228 IN ACCESS_MASK DesiredAccess,
229 _In_Opt HANDLE ParentProcess
230);
231
234 HANDLE ProcessHandle,
235 PHANDLE ThreadHandle,
236 ThreadEntry EntryPoint,
237 THREAD_PARAMETER ThreadParameter,
238 TimeSliceTicks TimeSlice,
239 ThreadEntry MtdllEntrypoint
240);
241
242extern void MsYieldExecution(PTRAP_FRAME threadRegisters);
244
247 IN enum _PS_PHASE_ROUTINE Phase
248);
249
251
254 IN PEPROCESS Process,
255 IN MTSTATUS ExitCode
256);
257
260 IN PETHREAD Thread,
261 IN MTSTATUS ExitStatus
262);
263
265void
267 IN MTSTATUS ExitStatus
268);
269
270void
272 IN void* Object
273);
274
275void
277 IN void* ProcessObject
278);
279
282 IN PEPROCESS Process,
283 _In_Opt PETHREAD LastThread
284);
285
288 void
289);
290
292
293void
295 void
296);
297
301 void
302)
303
304// Will return the current process the thread is attached to (could be its parent thread, could be another in an APC)
305
306{
307 if (MeGetCurrentThread()) {
309 }
310 else return NULL;
311}
312
316 IN PITHREAD IThread
317)
318
319{
320 return CONTAINING_RECORD(IThread, ETHREAD, InternalThread);
321}
322
326 IN PIPROCESS IProcess
327)
328
329{
330 return CONTAINING_RECORD(IProcess, EPROCESS, InternalProcess);
331}
332
334bool
336 IN PETHREAD Thread
337)
338
339{
340 // safety guard, can't believe i had to put it.
341 return (Thread && Thread->SystemThread);
342}
343
347 void
348)
349
350{
351 PETHREAD CurrentThread = PsGetCurrentThread();
352 if (CurrentThread) return CurrentThread->LastStatus;
353 else return MT_GENERAL_FAILURE; // Fallback
354}
355
356HANDLE
358 IN PEPROCESS Process
359);
360
361HANDLE
363 IN PETHREAD Thread
364);
365
368 IN HANDLE ProcessId
369);
370
373 IN HANDLE ThreadId
374);
375
376void
378 IN HANDLE Cid
379);
380
381
382// Enqueues a thread into the queue with spinlock protection.
384void
386 Queue* queue, PETHREAD thread)
387{
388 IRQL flags;
389 MsAcquireSpinlock(&queue->lock, &flags);
390
391 // Initialize the new node's links using the SCHEDULER entry
392 thread->SchedulerListEntry.Flink = NULL;
393
394 if (queue->tail) {
395 // Link new node to current tail
397 // Link current tail to new node
399 }
400 else {
401 // List was empty
402 thread->SchedulerListEntry.Blink = NULL;
403 queue->head = thread;
404 }
405
406 // Update tail to be the new thread
407 queue->tail = thread;
408
409 MsReleaseSpinlock(&queue->lock, flags);
410}
411
412// Dequeues the head thread from the queue with spinlock protection.
416{
417 IRQL flags;
419
420 if (!q->head) {
422 return NULL;
423 }
424
425 PETHREAD t = q->head;
426
427 // Check if there is a next item using the SCHEDULER entry
428 if (t->SchedulerListEntry.Flink) {
429 // Get the ETHREAD from the generic list entry
430 // NOTE: We now use SchedulerListEntry for the CONTAINING_RECORD calculation
431 q->head = CONTAINING_RECORD(t->SchedulerListEntry.Flink, ETHREAD, SchedulerListEntry);
432
433 // The new head has no previous item
434 q->head->SchedulerListEntry.Blink = NULL;
435 }
436 else {
437 // Queue is now empty
438 q->head = NULL;
439 q->tail = NULL;
440 }
441
442 // Isolate the removed thread
443 t->SchedulerListEntry.Flink = NULL;
444 t->SchedulerListEntry.Blink = NULL;
445
447 return t;
448}
449
450// Enqueues the thread given to the queue (No Lock).
452void MeEnqueueThread(Queue* queue, PETHREAD thread)
453{
454 // Initialize the new node's links
455 thread->SchedulerListEntry.Flink = NULL;
456
457 if (queue->tail) {
458 // Link new node to current tail
460 // Link current tail to new node
462 }
463 else {
464 // List was empty
465 thread->SchedulerListEntry.Blink = NULL;
466 queue->head = thread;
467 }
468
469 // Update tail to be the new thread
470 queue->tail = thread;
471}
472
473// Dequeues the head thread from the queue (No Lock).
476{
477 if (!q->head) {
478 return NULL;
479 }
480
481 PETHREAD t = q->head;
482
483 // Check if there is a next item
484 if (t->SchedulerListEntry.Flink) {
485 // Get the ETHREAD from the generic list entry
486 q->head = CONTAINING_RECORD(t->SchedulerListEntry.Flink, ETHREAD, SchedulerListEntry);
487
488 // The new head has no previous item
489 q->head->SchedulerListEntry.Blink = NULL;
490 }
491 else {
492 // Queue is now empty
493 q->head = NULL;
494 q->tail = NULL;
495 }
496
497 // Isolate the removed thread
498 t->SchedulerListEntry.Flink = NULL;
499 t->SchedulerListEntry.Blink = NULL;
500
501 return t;
502}
503#endif
#define _In_Opt
Definition annotations.h:10
#define FORCEINLINE
Definition annotations.h:23
#define _Out_Opt
Definition annotations.h:11
#define NORETURN
Definition annotations.h:14
#define IN
Definition annotations.h:8
#define OUT
Definition annotations.h:9
struct _EPROCESS EPROCESS
Definition core.h:51
uint32_t ACCESS_MASK
Definition core.h:59
IPROCESS * PIPROCESS
Definition core.h:40
int32_t * PHANDLE
Definition core.h:58
enum _IRQL IRQL
int32_t HANDLE
Definition core.h:58
EPROCESS * PEPROCESS
Definition core.h:52
ITHREAD * PITHREAD
Definition core.h:36
TRAP_FRAME * PTRAP_FRAME
Definition core.h:56
struct _ETHREAD ETHREAD
Definition core.h:43
ETHREAD * PETHREAD
Definition core.h:44
struct _DOUBLY_LINKED_LIST DOUBLY_LINKED_LIST
struct _HANDLE_TABLE * PHANDLE_TABLE
#define CONTAINING_RECORD(ptr, type, member)
Definition macros.h:11
FORCEINLINE PITHREAD MeGetCurrentThread(void)
Definition me.h:444
enum _TimeSliceTicks TimeSliceTicks
uint32_t flags
Definition mh.h:2
struct _PUSH_LOCK PUSH_LOCK
struct _Queue Queue
#define MT_GENERAL_FAILURE
Definition mtstatus.h:31
int32_t MTSTATUS
Definition mtstatus.h:12
FORCEINLINE void MeEnqueueThreadWithLock(Queue *queue, PETHREAD thread)
Definition ps.h:385
enum _PS_PHASE_ROUTINE PS_PHASE_ROUTINE
NORETURN void PspExitThread(IN MTSTATUS ExitStatus)
Definition thread.c:335
_PS_PHASE_ROUTINE
Definition ps.h:55
@ PS_PHASE_INITIALIZE_SYSTEM
Definition ps.h:56
@ PS_PHASE_INITIALIZE_WORKER_THREADS
Definition ps.h:57
MTSTATUS PsTerminateThread(IN PETHREAD Thread, IN MTSTATUS ExitStatus)
Definition thread.c:284
enum _PROCESS_STATE * PPROCESS_STATE
FORCEINLINE PEPROCESS PsGetCurrentProcess(void)
Definition ps.h:300
FORCEINLINE PETHREAD PsGetEThreadFromIThread(IN PITHREAD IThread)
Definition ps.h:315
void PsInitializeCidTable(void)
Definition cid.c:27
enum _PROCESS_STATE PROCESS_STATE
FORCEINLINE MTSTATUS GetExceptionCode(void)
Definition ps.h:346
PETHREAD PsGetNextProcessThread(IN PEPROCESS Process, _In_Opt PETHREAD LastThread)
Definition process.c:563
PETHREAD PsLookupThreadByThreadId(IN HANDLE ThreadId)
Definition cid.c:139
FORCEINLINE void MeEnqueueThread(Queue *queue, PETHREAD thread)
Definition ps.h:452
FORCEINLINE PETHREAD MeDequeueThreadWithLock(Queue *q)
Definition ps.h:415
struct _MTDLL_BASIC_TYPES * PMTDLL_BASIC_TYPES
struct _TEB * PTEB
FORCEINLINE PEPROCESS PsGetEProcessFromIProcess(IN PIPROCESS IProcess)
Definition ps.h:325
HANDLE PsAllocateThreadId(IN PETHREAD Thread)
Definition cid.c:89
struct _LDR_DATA_TABLE_ENTRY * PLDR_DATA_TABLE_ENTRY
MTSTATUS PsCreateThread(HANDLE ProcessHandle, PHANDLE ThreadHandle, ThreadEntry EntryPoint, THREAD_PARAMETER ThreadParameter, TimeSliceTicks TimeSlice, ThreadEntry MtdllEntrypoint)
Definition thread.c:38
struct _LDR_DATA_TABLE_ENTRY LDR_DATA_TABLE_ENTRY
struct _PEB_LDR_DATA * PPEB_LDR_DATA
void MsYieldExecution(PTRAP_FRAME threadRegisters)
void(* ThreadEntry)(THREAD_PARAMETER)
Definition ps.h:218
enum _THREAD_STATE * PTHREAD_STATE
struct _PEB * PPEB
PETHREAD PsGetCurrentThread(void)
Definition thread.c:279
void PsDeferKernelStackDeletion(void *StackBase, bool IsLarge)
Definition pswork.c:65
enum _THREAD_STATE THREAD_STATE
PEPROCESS PsLookupProcessByProcessId(IN HANDLE ProcessId)
Definition cid.c:114
void PsInitializeWorkerThreads(void)
Definition pswork.c:93
enum _PROCESS_FLAGS PROCESS_FLAGS
MTSTATUS PsTerminateProcess(IN PEPROCESS Process, IN MTSTATUS ExitCode)
Definition process.c:435
MTSTATUS PsCreateSystemThread(ThreadEntry entry, THREAD_PARAMETER parameter, TimeSliceTicks TIMESLICE, _Out_Opt PETHREAD *OutThread)
Definition thread.c:196
_THREAD_STATE
Definition ps.h:37
@ THREAD_TERMINATED
Definition ps.h:42
@ THREAD_ZOMBIE
Definition ps.h:43
@ THREAD_BLOCKED
Definition ps.h:40
@ THREAD_TERMINATING
Definition ps.h:41
@ THREAD_RUNNING
Definition ps.h:38
@ THREAD_READY
Definition ps.h:39
struct _MT_TIB MT_TIB
FORCEINLINE bool PsIsKernelThread(IN PETHREAD Thread)
Definition ps.h:335
MTSTATUS PsInitializeSystem(IN enum _PS_PHASE_ROUTINE Phase)
Definition psmgr.c:93
struct _MT_MODULE_INFO MT_MODULE_INFO
_PROCESS_FLAGS
Definition ps.h:91
@ ProcessBeingDeleted
Definition ps.h:94
@ ProcessBreakOnTermination
Definition ps.h:92
@ ProcessBeingTerminated
Definition ps.h:93
void PsDeleteProcess(IN void *ProcessObject)
Definition process.c:522
HANDLE PsAllocateProcessId(IN PEPROCESS Process)
Definition cid.c:60
struct _TEB TEB
struct _MT_TIB * PMT_TIB
_PROCESS_STATE
Definition ps.h:46
@ PROCESS_WAITING
Definition ps.h:49
@ PROCESS_READY
Definition ps.h:48
@ PROCESS_TERMINATING
Definition ps.h:50
@ PROCESS_RUNNING
Definition ps.h:47
@ PROCESS_SUSPENDED
Definition ps.h:52
@ PROCESS_TERMINATED
Definition ps.h:51
void * THREAD_PARAMETER
Definition ps.h:217
struct _MTDLL_BASIC_TYPES MTDLL_BASIC_TYPES
FORCEINLINE PETHREAD MeDequeueThread(Queue *q)
Definition ps.h:475
void PsDeleteThread(IN void *Object)
Definition thread.c:305
struct _STACK_REAPER_ENTRY * PSTACK_REAPER_ENTRY
void PsFreeCid(IN HANDLE Cid)
Definition cid.c:164
struct _PEB PEB
struct _STACK_REAPER_ENTRY STACK_REAPER_ENTRY
struct _PEB_LDR_DATA PEB_LDR_DATA
MTSTATUS PsCreateProcess(IN const char *ExecutablePath, OUT PHANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, _In_Opt HANDLE ParentProcess)
Definition process.c:181
EPROCESS PsInitialSystemProcess
Definition kernel.c:165
void MsAcquireSpinlock(IN PSPINLOCK lock, IN PIRQL OldIrql)
Definition spinlock.c:13
void MsReleaseSpinlock(IN PSPINLOCK lock, IN IRQL OldIrql)
Definition spinlock.c:45
PEPROCESS SavedApcProcess
Definition me.h:254
struct _DOUBLY_LINKED_LIST * Blink
Definition core.h:30
struct _DOUBLY_LINKED_LIST * Flink
Definition core.h:31
uint32_t NumThreads
Definition ps.h:166
struct _RUNDOWN_REF ProcessRundown
Definition ps.h:159
HANDLE PID
Definition ps.h:148
HANDLE ParentProcess
Definition ps.h:149
HANDLE MtdllHandle
Definition ps.h:156
PHANDLE_TABLE ObjectTable
Definition ps.h:171
PPEB Peb
Definition ps.h:154
PUSH_LOCK ThreadListLock
Definition ps.h:164
HANDLE SectionHandle
Definition ps.h:155
enum _PROCESS_FLAGS Flags
Definition ps.h:174
char ImageName[24]
Definition ps.h:147
MTSTATUS ExitStatus
Definition ps.h:175
struct _MMVAD * VadRoot
Definition ps.h:178
uint32_t priority
Definition ps.h:150
struct _PUSH_LOCK ProcessLock
Definition ps.h:160
struct _ETHREAD * MainThread
Definition ps.h:163
PUSH_LOCK AddressSpaceLock
Definition ps.h:167
PUSH_LOCK VadLock
Definition ps.h:179
uint64_t CreationTime
Definition ps.h:151
struct _IPROCESS InternalProcess
Definition ps.h:146
uintptr_t NextStackHint
Definition ps.h:168
DOUBLY_LINKED_LIST AllThreads
Definition ps.h:165
Definition ps.h:182
PTEB Teb
Definition ps.h:185
struct _RUNDOWN_REF ThreadRundown
Definition ps.h:193
struct _EPROCESS * ParentProcess
Definition ps.h:190
struct _EXCEPTION_REGISTRATION_RECORD ExceptionRegistration
Definition ps.h:186
struct _ITHREAD InternalThread
Definition ps.h:183
HANDLE PID
Definition ps.h:188
struct _DOUBLY_LINKED_LIST SchedulerListEntry
Definition ps.h:192
HANDLE TID
Definition ps.h:187
bool SystemThread
Definition ps.h:200
bool WorkerThread
Definition ps.h:201
MTSTATUS ExitStatus
Definition ps.h:195
struct _EVENT * CurrentEvent
Definition ps.h:189
MTSTATUS LastStatus
Definition ps.h:199
PUSH_LOCK ThreadLock
Definition ps.h:194
struct _DOUBLY_LINKED_LIST ThreadListEntry
Definition ps.h:191
Definition ms.h:70
Definition me.h:266
struct _APC_STATE ApcState
Definition me.h:275
uint64_t LoadTime
Definition ps.h:102
DOUBLY_LINKED_LIST LoadedModuleList
Definition ps.h:105
char FullName[256]
Definition ps.h:101
void * EntryPoint
Definition ps.h:98
uint64_t SizeOfImage
Definition ps.h:100
Definition mm.h:514
char FullPath[256]
Definition ps.h:134
void * Base
Definition ps.h:136
uint64_t Size
Definition ps.h:135
Definition ps.h:118
void * StackBase
Definition ps.h:120
void * StackLimit
Definition ps.h:121
void * ExceptionList
Definition ps.h:119
MT_MODULE_INFO PrimaryExecutable
Definition ps.h:140
MT_MODULE_INFO Mtdll
Definition ps.h:141
uint64_t EpochCreation
Definition ps.h:142
DOUBLY_LINKED_LIST LoadedModuleList
Definition ps.h:109
Definition ps.h:112
void * ImageBase
Definition ps.h:114
PEB_LDR_DATA LoaderData
Definition ps.h:115
uint8_t BeingDebugged
Definition ps.h:113
PETHREAD tail
Definition ms.h:54
PETHREAD head
Definition ms.h:53
SPINLOCK lock
Definition ms.h:55
void * StackBase
Definition ps.h:207
struct _STACK_REAPER_ENTRY * Next
Definition ps.h:206
Definition ps.h:124
PPEB ProcessEnvironmentBlock
Definition ps.h:128
int32_t LastErrorValue
Definition ps.h:129
uint64_t UniqueProcessId
Definition ps.h:126
MT_TIB MtTib
Definition ps.h:125
int32_t LastStatusValue
Definition ps.h:130
uint64_t UniqueThreadId
Definition ps.h:127