ReactOS 0.4.15-dev-8138-g1e75ea8
psmgr.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: ntoskrnl/ps/psmgr.c
5 * PURPOSE: Process Manager: Initialization Code
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7 */
8
9/* INCLUDES ******************************************************************/
10
11#include <ntoskrnl.h>
12#define NDEBUG
13#include <debug.h>
14
16
20
22{
30};
31
33{
39};
40
44
46 RTL_CONSTANT_STRING(L"\\SystemRoot\\System32\\ntdll.dll");
47
49
53
55struct
56{
62
63/* PRIVATE FUNCTIONS *********************************************************/
64
65static CODE_SEG("INIT")
67PspLookupSystemDllEntryPoint(
69 _Out_ PVOID* EntryPoint)
70{
71 /* Call the internal API */
73 Name,
74 EntryPoint,
75 NULL,
77}
78
79static CODE_SEG("INIT")
81PspLookupKernelUserEntryPoints(VOID)
82{
84
85 /* Get user-mode APC trampoline */
86 Status = PspLookupSystemDllEntryPoint("KiUserApcDispatcher",
88 if (!NT_SUCCESS(Status)) return Status;
89
90 /* Get user-mode exception dispatcher */
91 Status = PspLookupSystemDllEntryPoint("KiUserExceptionDispatcher",
93 if (!NT_SUCCESS(Status)) return Status;
94
95 /* Get user-mode callback dispatcher */
96 Status = PspLookupSystemDllEntryPoint("KiUserCallbackDispatcher",
98 if (!NT_SUCCESS(Status)) return Status;
99
100 /* Get user-mode exception raise trampoline */
101 Status = PspLookupSystemDllEntryPoint("KiRaiseUserExceptionDispatcher",
103 if (!NT_SUCCESS(Status)) return Status;
104
105 /* Get user-mode SLIST exception functions for page fault rollback race hack */
106 Status = PspLookupSystemDllEntryPoint("ExpInterlockedPopEntrySListEnd",
108 if (!NT_SUCCESS(Status)) { DPRINT1("this not found\n"); return Status; }
109 Status = PspLookupSystemDllEntryPoint("ExpInterlockedPopEntrySListFault",
111 if (!NT_SUCCESS(Status)) { DPRINT1("this not found\n"); return Status; }
112 Status = PspLookupSystemDllEntryPoint("ExpInterlockedPopEntrySListResume",
114 if (!NT_SUCCESS(Status)) { DPRINT1("this not found\n"); return Status; }
115
116 /* On x86, there are multiple ways to do a system call, find the right stubs */
117#if defined(_X86_)
118 /* Check if this is a machine that supports SYSENTER */
120 {
121 /* Get user-mode sysenter stub */
122 SharedUserData->SystemCall = (PsNtosImageBase >> (PAGE_SHIFT + 1));
123 Status = PspLookupSystemDllEntryPoint("KiFastSystemCall",
125 SystemCall);
126 if (!NT_SUCCESS(Status)) return Status;
127
128 /* Get user-mode sysenter return stub */
129 Status = PspLookupSystemDllEntryPoint("KiFastSystemCallRet",
131 SystemCallReturn);
132 if (!NT_SUCCESS(Status)) return Status;
133 }
134 else
135 {
136 /* Get the user-mode interrupt stub */
137 Status = PspLookupSystemDllEntryPoint("KiIntSystemCall",
139 SystemCall);
140 if (!NT_SUCCESS(Status)) return Status;
141 }
142
143 /* Set the test instruction */
144 SharedUserData->TestRetInstruction = 0xC3;
145#endif
146
147 /* Return the status */
148 return Status;
149}
150
152NTAPI
154 IN PVOID *DllBase,
155 IN BOOLEAN UseLargePages)
156{
158 LARGE_INTEGER Offset = {{0, 0}};
159 SIZE_T ViewSize = 0;
160 PVOID ImageBase = 0;
161
162 /* Map the System DLL */
164 Process,
165 (PVOID*)&ImageBase,
166 0,
167 0,
168 &Offset,
169 &ViewSize,
170 ViewShare,
171 0,
173 if (Status != STATUS_SUCCESS)
174 {
175 /* Normalize status code */
177 }
178
179 /* Write the image base and return status */
180 if (DllBase) *DllBase = ImageBase;
181 return Status;
182}
183
184CODE_SEG("INIT")
186NTAPI
188{
191 HANDLE FileHandle, SectionHandle;
193 ULONG_PTR HardErrorParameters;
194 ULONG HardErrorResponse;
195
196 /* Locate and open NTDLL to determine ImageBase and LdrStartup */
199 0,
200 NULL,
201 NULL);
207 0);
208 if (!NT_SUCCESS(Status))
209 {
210 /* Failed, bugcheck */
211 KeBugCheckEx(PROCESS1_INITIALIZATION_FAILED, Status, 2, 0, 0);
212 }
213
214 /* Check if the image is valid */
217 {
218 /* Raise a hard error */
219 HardErrorParameters = (ULONG_PTR)&PsNtDllPathName;
221 1,
222 1,
223 &HardErrorParameters,
224 OptionOk,
225 &HardErrorResponse);
226 return Status;
227 }
228
229 /* Create a section for NTDLL */
230 Status = ZwCreateSection(&SectionHandle,
232 NULL,
233 NULL,
235 SEC_IMAGE,
236 FileHandle);
238 if (!NT_SUCCESS(Status))
239 {
240 /* Failed, bugcheck */
241 KeBugCheckEx(PROCESS1_INITIALIZATION_FAILED, Status, 3, 0, 0);
242 }
243
244 /* Reference the Section */
245 Status = ObReferenceObjectByHandle(SectionHandle,
250 NULL);
251 ZwClose(SectionHandle);
252 if (!NT_SUCCESS(Status))
253 {
254 /* Failed, bugcheck */
255 KeBugCheckEx(PROCESS1_INITIALIZATION_FAILED, Status, 4, 0, 0);
256 }
257
258 /* Map it */
260 if (!NT_SUCCESS(Status))
261 {
262 /* Failed, bugcheck */
263 KeBugCheckEx(PROCESS1_INITIALIZATION_FAILED, Status, 5, 0, 0);
264 }
265
266 /* Return status */
267 return Status;
268}
269
270CODE_SEG("INIT")
272NTAPI
274{
276
277 /* Get user-mode startup thunk */
278 Status = PspLookupSystemDllEntryPoint("LdrInitializeThunk",
280 if (!NT_SUCCESS(Status))
281 {
282 /* Failed, bugcheck */
283 KeBugCheckEx(PROCESS1_INITIALIZATION_FAILED, Status, 7, 0, 0);
284 }
285
286 /* Get all the other entrypoints */
287 Status = PspLookupKernelUserEntryPoints();
288 if (!NT_SUCCESS(Status))
289 {
290 /* Failed, bugcheck */
291 KeBugCheckEx(PROCESS1_INITIALIZATION_FAILED, Status, 8, 0, 0);
292 }
293
294 /* Let KD know we are done */
296
297 /* Return status */
298 return Status;
299}
300
301CODE_SEG("INIT")
303NTAPI
305{
306 /* Initialize the System DLL and return status of operation */
308 return TRUE;
309}
310
311CODE_SEG("INIT")
313NTAPI
315{
318 HANDLE SysThreadHandle;
319 PETHREAD SysThread;
320 MM_SYSTEMSIZE SystemSize;
322 OBJECT_TYPE_INITIALIZER ObjectTypeInitializer;
323 ULONG i;
324
325 /* Get the system size */
326 SystemSize = MmQuerySystemSize();
327
328 /* Setup some memory options */
330 switch (SystemSize)
331 {
332 /* Medimum systems */
333 case MmMediumSystem:
334
335 /* Increase the WS sizes a bit */
337 PsMaximumWorkingSet += 100;
338
339 /* Large systems */
340 case MmLargeSystem:
341
342 /* Increase the WS sizes a bit more */
344 PsMaximumWorkingSet += 300;
345
346 /* Small and other systems */
347 default:
348 break;
349 }
350
351 /* Setup callbacks */
352 for (i = 0; i < PSP_MAX_CREATE_THREAD_NOTIFY; i++)
353 {
355 }
356 for (i = 0; i < PSP_MAX_CREATE_PROCESS_NOTIFY; i++)
357 {
359 }
360 for (i = 0; i < PSP_MAX_LOAD_IMAGE_NOTIFY; i++)
361 {
363 }
364
365 /* Setup the quantum table */
367
368 /* Set quota settings */
372 {
373 /* Enable give-backs */
375 }
376 else
377 {
378 /* Disable them */
380 }
381
382 /* Now multiply limits by 1MB */
386
387 /* Initialize the Active Process List */
390
391 /* Get the idle process */
393
394 /* Setup the locks */
397
398 /* Initialize the thread list */
400
401 /* Clear kernel time */
403
404 /* Initialize Object Initializer */
405 RtlZeroMemory(&ObjectTypeInitializer, sizeof(ObjectTypeInitializer));
406 ObjectTypeInitializer.Length = sizeof(ObjectTypeInitializer);
407 ObjectTypeInitializer.InvalidAttributes = OBJ_PERMANENT |
410 ObjectTypeInitializer.PoolType = NonPagedPool;
411 ObjectTypeInitializer.SecurityRequired = TRUE;
412
413 /* Initialize the Process type */
414 RtlInitUnicodeString(&Name, L"Process");
415 ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(EPROCESS);
416 ObjectTypeInitializer.GenericMapping = PspProcessMapping;
417 ObjectTypeInitializer.ValidAccessMask = PROCESS_ALL_ACCESS;
418 ObjectTypeInitializer.DeleteProcedure = PspDeleteProcess;
419 ObCreateObjectType(&Name, &ObjectTypeInitializer, NULL, &PsProcessType);
420
421 /* Initialize the Thread type */
422 RtlInitUnicodeString(&Name, L"Thread");
423 ObjectTypeInitializer.Length = sizeof(ObjectTypeInitializer);
424 ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(ETHREAD);
425 ObjectTypeInitializer.GenericMapping = PspThreadMapping;
426 ObjectTypeInitializer.ValidAccessMask = THREAD_ALL_ACCESS;
427 ObjectTypeInitializer.DeleteProcedure = PspDeleteThread;
428 ObCreateObjectType(&Name, &ObjectTypeInitializer, NULL, &PsThreadType);
429
430 /* Initialize the Job type */
432 ObjectTypeInitializer.Length = sizeof(ObjectTypeInitializer);
433 ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(EJOB);
434 ObjectTypeInitializer.GenericMapping = PspJobMapping;
435 ObjectTypeInitializer.InvalidAttributes = 0;
436 ObjectTypeInitializer.ValidAccessMask = JOB_OBJECT_ALL_ACCESS;
437 ObjectTypeInitializer.DeleteProcedure = PspDeleteJob;
438 ObCreateObjectType(&Name, &ObjectTypeInitializer, NULL, &PsJobType);
439
440 /* Initialize job structures external to this file */
442
443 /* Initialize the Working Set data */
446
447 /* Create the CID Handle table */
449 if (!PspCidTable) return FALSE;
450
451 /* FIXME: Initialize LDT/VDM support */
452
453 /* Setup the reaper */
455
456 /* Set the boot access token */
458
459 /* Setup default object attributes */
461 NULL,
462 0,
463 NULL,
464 NULL);
465
466 /* Create the Initial System Process */
470 0,
471 FALSE,
472 0,
473 0,
474 0,
475 FALSE);
476 if (!NT_SUCCESS(Status)) return FALSE;
477
478 /* Get a reference to it */
480 0,
484 NULL);
485
486 /* Copy the process names */
489
490 /* Allocate a structure for the audit name */
494 TAG_SEPA);
496 {
497 /* Allocation failed */
498 return FALSE;
499 }
500
501 /* Zero it */
503 SeAuditProcessCreationInfo.ImageFileName,
505
506 /* Setup the system initialization thread */
507 Status = PsCreateSystemThread(&SysThreadHandle,
510 0,
511 NULL,
513 LoaderBlock);
514 if (!NT_SUCCESS(Status)) return FALSE;
515
516 /* Create a handle to it */
517 ObReferenceObjectByHandle(SysThreadHandle,
518 0,
521 (PVOID*)&SysThread,
522 NULL);
523 ObCloseHandle(SysThreadHandle, KernelMode);
524
525 /* Return success */
526 return TRUE;
527}
528
529CODE_SEG("INIT")
531NTAPI
533{
534 /* Check the initialization phase */
536 {
537 case 0:
538
539 /* Do Phase 0 */
540 return PspInitPhase0(LoaderBlock);
541
542 case 1:
543
544 /* Do Phase 1 */
545 return PspInitPhase1();
546
547 default:
548
549 /* Don't know any other phase! Bugcheck! */
550 KeBugCheckEx(UNEXPECTED_INITIALIZATION_CALL,
551 1,
553 0,
554 0);
555 return FALSE;
556 }
557}
558
559/* PUBLIC FUNCTIONS **********************************************************/
560
561/*
562 * @implemented
563 */
565NTAPI
569 OUT PUNICODE_STRING CSDVersion OPTIONAL)
570{
573 if (BuildNumber ) *BuildNumber = NtBuildNumber & 0x3FFF;
574
575 if (CSDVersion)
576 {
577 CSDVersion->Length = CmCSDVersionString.Length;
578 CSDVersion->MaximumLength = CmCSDVersionString.MaximumLength;
579 CSDVersion->Buffer = CmCSDVersionString.Buffer;
580 }
581
582 /* Return TRUE if this is a Checked Build */
583 return (NtBuildNumber >> 28) == 0xC;
584}
585
586/* EOF */
#define CODE_SEG(...)
unsigned char BOOLEAN
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
struct NameRec_ * Name
Definition: cdprocs.h:460
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define FILE_SHARE_READ
Definition: compat.h:136
#define ULONG_PTR
Definition: config.h:101
#define PsGetVersion(a, b, c, d)
Definition: env_spec_w32.h:83
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define PAGE_SHIFT
Definition: env_spec_w32.h:45
#define NonPagedPool
Definition: env_spec_w32.h:307
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
#define PagedPool
Definition: env_spec_w32.h:308
#define MAX_FAST_REFS
Definition: ex.h:133
#define ExInitializeRundownProtection
Definition: ex.h:137
ULONG BuildNumber
Definition: ros_glue.cpp:6
ULONG MajorVersion
Definition: ros_glue.cpp:4
ULONG MinorVersion
Definition: ros_glue.cpp:5
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
Definition: fltkernel.h:1231
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
Status
Definition: gdiplustypes.h:25
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
VOID FASTCALL KeInitializeGuardedMutex(OUT PKGUARDED_MUTEX GuardedMutex)
Definition: gmutex.c:31
NTSTATUS NTAPI NtRaiseHardError(IN NTSTATUS ErrorStatus, IN ULONG NumberOfParameters, IN ULONG UnicodeStringParameterMask, IN PULONG_PTR Parameters, IN ULONG ValidResponseOptions, OUT PULONG Response)
Definition: harderr.c:551
#define PROCESS_SUSPEND_RESUME
Definition: pstypes.h:167
#define PROCESS_TERMINATE
Definition: pstypes.h:157
#define PROCESS_VM_READ
Definition: pstypes.h:161
struct _EPROCESS EPROCESS
#define PROCESS_QUERY_INFORMATION
Definition: pstypes.h:166
#define PROCESS_VM_WRITE
Definition: pstypes.h:162
#define PROCESS_CREATE_THREAD
Definition: pstypes.h:158
#define JOB_OBJECT_ALL_ACCESS
Definition: pstypes.h:205
#define THREAD_QUERY_INFORMATION
Definition: pstypes.h:149
struct _EJOB EJOB
#define PROCESS_VM_OPERATION
Definition: pstypes.h:160
struct _ETHREAD ETHREAD
#define PROCESS_SET_INFORMATION
Definition: pstypes.h:165
#define PROCESS_CREATE_PROCESS
Definition: pstypes.h:163
#define PROCESS_SET_QUOTA
Definition: pstypes.h:164
#define OBJ_OPENIF
Definition: winternl.h:229
#define OBJ_EXCLUSIVE
Definition: winternl.h:227
#define OBJ_PERMANENT
Definition: winternl.h:226
#define THREAD_SET_CONTEXT
#define PROCESS_DUP_HANDLE
#define THREAD_ALERT
#define THREAD_SUSPEND_RESUME
#define THREAD_GET_CONTEXT
VOID NTAPI KdUpdateDataBlock(VOID)
Definition: kdinit.c:89
MM_SYSTEMSIZE NTAPI MmQuerySystemSize(VOID)
Definition: mmsup.c:257
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
#define KernelMode
Definition: asm.h:34
#define KF_FAST_SYSCALL
Definition: ketypes.h:43
@ OptionOk
Definition: extypes.h:187
NTSYSAPI NTSTATUS NTAPI ZwOpenFile(_Out_ PHANDLE FileHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _Out_ PIO_STATUS_BLOCK IoStatusBlock, _In_ ULONG ShareAccess, _In_ ULONG OpenOptions)
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T ViewSize
Definition: mmfuncs.h:408
#define SEC_IMAGE
Definition: mmtypes.h:97
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
struct _TOKEN * PTOKEN
#define THREAD_ALL_ACCESS
Definition: nt_native.h:1339
#define SYNCHRONIZE
Definition: nt_native.h:61
#define THREAD_TERMINATE
Definition: nt_native.h:1336
#define PAGE_READWRITE
Definition: nt_native.h:1304
#define SECTION_ALL_ACCESS
Definition: nt_native.h:1293
#define PROCESS_ALL_ACCESS
Definition: nt_native.h:1324
#define PAGE_EXECUTE
Definition: nt_native.h:1306
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define STANDARD_RIGHTS_READ
Definition: nt_native.h:65
@ ViewShare
Definition: nt_native.h:1278
#define STANDARD_RIGHTS_WRITE
Definition: nt_native.h:66
#define STANDARD_RIGHTS_EXECUTE
Definition: nt_native.h:67
#define FILE_READ_ACCESS
Definition: nt_native.h:610
#define THREAD_SET_INFORMATION
Definition: nt_native.h:1337
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
VOID NTAPI ExInitializeCallBack(IN OUT PEX_CALLBACK Callback)
Definition: callback.c:46
PHANDLE_TABLE NTAPI ExCreateHandleTable(IN PEPROCESS Process OPTIONAL)
Definition: handle.c:801
ULONG NtMajorVersion
Definition: init.c:45
ULONG NtMinorVersion
Definition: init.c:46
VOID NTAPI Phase1Initialization(IN PVOID Context)
Definition: init.c:2023
UNICODE_STRING CmCSDVersionString
Definition: init.c:62
PVOID KeRaiseUserExceptionDispatcher
Definition: ke.h:144
ULONG KeFeatureBits
Definition: krnlinit.c:22
PVOID KeUserExceptionDispatcher
Definition: ke.h:143
PVOID KeUserCallbackDispatcher
Definition: ke.h:142
PVOID KeUserApcDispatcher
Definition: ke.h:141
NTSTATUS NTAPI RtlpFindExportedRoutineByName(_In_ PVOID ImageBase, _In_ PCSTR ExportName, _Out_ PVOID *Function, _Out_opt_ PBOOLEAN IsForwarder, _In_ NTSTATUS NotFoundStatus)
ReactOS-only helper routine for RtlFindExportedRoutineByName(), that provides a finer granularity reg...
Definition: sysldr.c:309
NTSTATUS NTAPI MmCheckSystemImage(IN HANDLE ImageHandle, IN BOOLEAN PurgeSection)
Definition: sysldr.c:2745
POBJECT_TYPE PsProcessType
Definition: process.c:20
POBJECT_TYPE PsThreadType
Definition: thread.c:20
NTSTATUS NTAPI PsCreateSystemThread(OUT PHANDLE ThreadHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN HANDLE ProcessHandle, IN PCLIENT_ID ClientId, IN PKSTART_ROUTINE StartRoutine, IN PVOID StartContext)
Definition: thread.c:602
#define STATUS_IMAGE_CHECKSUM_MISMATCH
Definition: ntstatus.h:677
#define STATUS_PROCEDURE_NOT_FOUND
Definition: ntstatus.h:358
#define STATUS_CONFLICTING_ADDRESSES
Definition: ntstatus.h:261
#define L(x)
Definition: ntvdm.h:50
NTSTATUS NTAPI ObCloseHandle(IN HANDLE Handle, IN KPROCESSOR_MODE AccessMode)
Definition: obhandle.c:3379
NTSTATUS NTAPI ObCreateObjectType(IN PUNICODE_STRING TypeName, IN POBJECT_TYPE_INITIALIZER ObjectTypeInitializer, IN PVOID Reserved, OUT POBJECT_TYPE *ObjectType)
Definition: oblife.c:1136
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
Definition: obref.c:494
EX_CALLBACK PspLoadImageNotifyRoutine[PSP_MAX_LOAD_IMAGE_NOTIFY]
Definition: psnotify.c:23
VOID NTAPI PspDeleteProcess(IN PVOID ObjectBody)
Definition: kill.c:253
VOID NTAPI PspInitializeJobStructures(VOID)
Definition: job.c:111
#define PSP_MAX_CREATE_PROCESS_NOTIFY
Definition: ps.h:66
EX_CALLBACK PspThreadNotifyRoutine[PSP_MAX_CREATE_THREAD_NOTIFY]
Definition: psnotify.c:21
NTSTATUS NTAPI PspCreateProcess(OUT PHANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN HANDLE ParentProcess OPTIONAL, IN ULONG Flags, IN HANDLE SectionHandle OPTIONAL, IN HANDLE DebugPort OPTIONAL, IN HANDLE ExceptionPort OPTIONAL, IN BOOLEAN InJob)
Definition: process.c:347
LIST_ENTRY PsActiveProcessHead
Definition: process.c:22
VOID NTAPI PsChangeQuantumTable(IN BOOLEAN Immediate, IN ULONG PrioritySeparation)
Definition: process.c:235
VOID NTAPI PspDeleteThread(IN PVOID ObjectBody)
Definition: kill.c:391
VOID NTAPI PspDeleteJob(IN PVOID ObjectBody)
ULONG PsRawPrioritySeparation
Definition: process.c:27
#define PSP_MAX_LOAD_IMAGE_NOTIFY
Definition: ps.h:65
#define PSP_MAX_CREATE_THREAD_NOTIFY
Definition: ps.h:64
PTOKEN PspBootAccessToken
Definition: security.c:17
GENERIC_MAPPING PspJobMapping
Definition: job.c:41
WORK_QUEUE_ITEM PspReaperWorkItem
Definition: kill.c:20
VOID NTAPI PspReapRoutine(IN PVOID Context)
Definition: kill.c:167
KGUARDED_MUTEX PspActiveProcessMutex
Definition: process.c:23
ULONG_PTR PsNtosImageBase
Definition: sysldr.c:25
EX_CALLBACK PspProcessNotifyRoutine[PSP_MAX_CREATE_PROCESS_NOTIFY]
Definition: psnotify.c:22
POBJECT_TYPE PsJobType
Definition: job.c:20
ULONG ExpInitializationPhase
Definition: init.c:68
PVOID KeUserPopEntrySListResume
Definition: psmgr.c:19
ULONG PspDefaultNonPagedLimit
Definition: psmgr.c:60
HANDLE PspInitialSystemProcessHandle
Definition: psmgr.c:52
ULONG PspDefaultPagefileLimit
Definition: psmgr.c:60
BOOLEAN NTAPI PspInitPhase1(VOID)
Definition: psmgr.c:304
PVOID PspSystemDllEntryPoint
Definition: psmgr.c:43
PVOID KeUserPopEntrySListEnd
Definition: psmgr.c:17
NTSTATUS NTAPI PspMapSystemDll(IN PEPROCESS Process, IN PVOID *DllBase, IN BOOLEAN UseLargePages)
Definition: psmgr.c:153
BOOLEAN NTAPI PspInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: psmgr.c:314
NTSTATUS NTAPI PspInitializeSystemDll(VOID)
Definition: psmgr.c:273
UNICODE_STRING PsNtDllPathName
Definition: psmgr.c:45
GENERIC_MAPPING PspProcessMapping
Definition: psmgr.c:21
PVOID KeUserPopEntrySListFault
Definition: psmgr.c:18
PEPROCESS PsInitialSystemProcess
Definition: psmgr.c:50
PHANDLE_TABLE PspCidTable
Definition: psmgr.c:48
ULONG PsMaximumWorkingSet
Definition: psmgr.c:54
BOOLEAN NTAPI PsInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: psmgr.c:532
struct @1838 PspWorkingSetChangeHead
ULONG PsMinimumWorkingSet
Definition: psmgr.c:54
KGUARDED_MUTEX Lock
Definition: psmgr.c:58
PVOID PspSystemDllSection
Definition: psmgr.c:42
ULONG PspDefaultPagedLimit
Definition: psmgr.c:60
BOOLEAN PspDoingGiveBacks
Definition: psmgr.c:61
PVOID PspSystemDllBase
Definition: psmgr.c:41
LIST_ENTRY List
Definition: psmgr.c:57
GENERIC_MAPPING PspThreadMapping
Definition: psmgr.c:32
PEPROCESS PsIdleProcess
Definition: psmgr.c:51
NTSTATUS NTAPI PsLocateSystemDll(VOID)
Definition: psmgr.c:187
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
Definition: rtlcompat.c:108
#define SharedUserData
NTSTATUS NTAPI MmMapViewOfSection(IN PVOID SectionObject, IN PEPROCESS Process, IN OUT PVOID *BaseAddress, IN ULONG_PTR ZeroBits, IN SIZE_T CommitSize, IN OUT PLARGE_INTEGER SectionOffset OPTIONAL, IN OUT PSIZE_T ViewSize, IN SECTION_INHERIT InheritDisposition, IN ULONG AllocationType, IN ULONG Protect)
Definition: section.c:3996
POBJECT_TYPE MmSectionObjectType
Definition: section.c:194
#define STATUS_SUCCESS
Definition: shellext.h:65
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
ULONG NtBuildNumber
Definition: init.c:50
LIST_ENTRY ThreadListHead
Definition: pstypes.h:1329
KPROCESS Pcb
Definition: pstypes.h:1262
EX_FAST_REF Token
Definition: pstypes.h:1287
EX_PUSH_LOCK ProcessLock
Definition: pstypes.h:1263
SE_AUDIT_PROCESS_CREATION_INFO SeAuditProcessCreationInfo
Definition: pstypes.h:1355
CHAR ImageFileName[16]
Definition: pstypes.h:1326
EX_RUNDOWN_REF RundownProtect
Definition: pstypes.h:1266
ULONG_PTR Value
Definition: extypes.h:424
ULONG_PTR Value
Definition: extypes.h:465
ULONG KernelTime
Definition: ketypes.h:2102
Definition: typedefs.h:120
GENERIC_MAPPING GenericMapping
Definition: obtypes.h:358
OB_DELETE_METHOD DeleteProcedure
Definition: obtypes.h:369
ULONG DefaultNonPagedPoolCharge
Definition: obtypes.h:365
POBJECT_NAME_INFORMATION ImageFileName
Definition: setypes.h:179
USHORT MaximumLength
Definition: env_spec_w32.h:370
#define TAG_SEPA
Definition: tag.h:156
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14
#define MAXULONG
Definition: typedefs.h:251
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
const char * PCSTR
Definition: typedefs.h:52
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
#define ExInitializeWorkItem(Item, Routine, Context)
Definition: exfuncs.h:265
enum _MM_SYSTEM_SIZE MM_SYSTEMSIZE
@ MmLargeSystem
Definition: mmtypes.h:147
@ MmMediumSystem
Definition: mmtypes.h:146
#define PsGetCurrentProcess
Definition: psfuncs.h:17