#include "psp.h"
Go to the source code of this file.
Functions | |
NTSTATUS | NtCreateThread (OUT PHANDLE ThreadHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN HANDLE ProcessHandle, OUT PCLIENT_ID ClientId, IN PCONTEXT ThreadContext, IN PINITIAL_TEB InitialTeb, IN BOOLEAN CreateSuspended) |
NTSTATUS | PsCreateSystemThread (OUT PHANDLE ThreadHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN HANDLE ProcessHandle OPTIONAL, OUT PCLIENT_ID ClientId OPTIONAL, IN PKSTART_ROUTINE StartRoutine, IN PVOID StartContext) |
BOOLEAN | PspMarkProcessIdValid (IN PHANDLE_TABLE_ENTRY HandleEntry, IN ULONG_PTR Parameter) |
NTSTATUS | PspCreateThread (OUT PHANDLE ThreadHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN HANDLE ProcessHandle, IN PEPROCESS ProcessPointer, OUT PCLIENT_ID ClientId OPTIONAL, IN PCONTEXT ThreadContext OPTIONAL, IN PINITIAL_TEB InitialTeb OPTIONAL, IN BOOLEAN CreateSuspended, IN PKSTART_ROUTINE StartRoutine OPTIONAL, IN PVOID StartContext) |
NTSTATUS | NtCreateProcess (OUT PHANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN HANDLE ParentProcess, IN BOOLEAN InheritObjectTable, IN HANDLE SectionHandle OPTIONAL, IN HANDLE DebugPort OPTIONAL, IN HANDLE ExceptionPort OPTIONAL) |
NTSTATUS | PsCreateSystemProcess (OUT PHANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL) |
NTSTATUS | PspCreateProcess (OUT PHANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN HANDLE ParentProcess OPTIONAL, IN BOOLEAN InheritObjectTable, IN HANDLE SectionHandle OPTIONAL, IN HANDLE DebugPort OPTIONAL, IN HANDLE ExceptionPort OPTIONAL) |
NTSTATUS | PsSetCreateProcessNotifyRoutine (IN PCREATE_PROCESS_NOTIFY_ROUTINE NotifyRoutine, IN BOOLEAN Remove) |
NTSTATUS | PsSetCreateThreadNotifyRoutine (IN PCREATE_THREAD_NOTIFY_ROUTINE NotifyRoutine) |
VOID | PspUserThreadStartup (IN PKSTART_ROUTINE StartRoutine, IN PVOID StartContext) |
ULONG | PspUnhandledExceptionInSystemThread (IN PEXCEPTION_POINTERS ExceptionPointers) |
VOID | PspSystemThreadStartup (IN PKSTART_ROUTINE StartRoutine, IN PVOID StartContext) |
NTSTATUS | PsLockProcess (IN PEPROCESS Process, IN KPROCESSOR_MODE WaitMode, IN PSLOCKPROCESSMODE LockMode) |
VOID | PsUnlockProcess (IN PEPROCESS Process) |
HANDLE | PsGetCurrentProcessId (VOID) |
HANDLE | PsGetCurrentThreadId (VOID) |
BOOLEAN | PsGetVersion (PULONG MajorVersion OPTIONAL, PULONG MinorVersion OPTIONAL, PULONG BuildNumber OPTIONAL, PUNICODE_STRING CSDVersion OPTIONAL) |
NTSTATUS | PsSetLoadImageNotifyRoutine (IN PLOAD_IMAGE_NOTIFY_ROUTINE NotifyRoutine) |
VOID | PsCallImageNotifyRoutines (IN PUNICODE_STRING FullImageName, IN HANDLE ProcessId, IN PIMAGE_INFO ImageInfo) |
Variables | |
PVOID | MmWorkingSetList |
UNICODE_STRING | CmCSDVersionString |
LCID | PsDefaultSystemLocaleId |
LCID | PsDefaultThreadLocaleId |
LANGID | PsDefaultUILanguageId |
LANGID | PsInstallUILanguageId |
ULONG | PsMinimumWorkingSet = 20 |
ULONG | PsMaximumWorkingSet = 45 |
BOOLEAN | PsImageNotifyEnabled |
FAST_MUTEX | PspProcessLockMutex |
|
Definition at line 843 of file ps/create.c. References DebugPort, EXCEPTION_EXECUTE_HANDLER, KernelMode, NTSTATUS(), ObjectAttributes, PAGED_CODE, ProbeForWriteHandle, and PspCreateProcess(). Referenced by TestTokenOpenPrimary(), UdbgTest1(), and UdbgTest2().
|
|
Definition at line 67 of file ps/create.c. References EXCEPTION_EXECUTE_HANDLER, InitialTeb, KernelMode, NTSTATUS(), NULL, ObjectAttributes, PAGED_CODE, ProbeForRead, ProbeForWrite(), ProbeForWriteHandle, ProbeForWriteUlong, PspCreateThread(), ThreadContext, and ThreadHandle. Referenced by TestTokenInitialize().
|
|
Definition at line 2396 of file ps/create.c. References NULL, PAGED_CODE, PIMAGE_INFO, PsImageNotifyEnabled, PSP_MAX_LOAD_IMAGE_NOTIFY, and PspLoadImageNotifyRoutine. Referenced by DbgkCreateThread(), MiLoadSystemImage(), and MiMapViewOfImageSection().
|
|
Definition at line 915 of file ps/create.c. References FALSE, NTSTATUS(), NULL, ObjectAttributes, PAGED_CODE, PspCreateProcess(), and PspInitialSystemProcessHandle.
|
|
Definition at line 175 of file ps/create.c. References FALSE, NTSTATUS(), NULL, ObjectAttributes, PAGED_CODE, PKSTART_ROUTINE, PsInitialSystemProcess, PspCreateThread(), and ThreadHandle. Referenced by CreateSystemThread(), DoResourceTest(), ExpCreateWorkerThread(), ExpWorkerInitialization(), FsRtlInitializeWorkerThread(), IopStartApcHardError(), MemPrintInitialize(), MiModifiedPageWriter(), MiSectionInitialization(), MmInitSystem(), PspInitPhase0(), SeRmInitPhase1(), and SmbTraceStart().
|
|
Definition at line 2306 of file ps/create.c. References PsGetCurrentThread. Referenced by SeAuditHandleCreation().
|
|
Definition at line 2312 of file ps/create.c. References PsGetCurrentThread.
|
|
Definition at line 2318 of file ps/create.c. References CmCSDVersionString, NtBuildNumber, NtMajorVersion, and NtMinorVersion.
|
|
Definition at line 1966 of file ps/create.c. References ExAcquireFastMutexUnsafe(), Executive, ExReleaseFastMutexUnsafe(), FALSE, _KTHREAD::FreezeCount, KeClearEvent, KeEnterCriticalRegion, KeGetCurrentThread, KeLeaveCriticalRegion, KeReadStateProcess(), _KTHREAD::KernelApcDisable, KernelMode, KeSetEvent(), KeWaitForSingleObject(), NTSTATUS(), NULL, PAGED_CODE, PsGetCurrentThread, PsLockIAmExiting, PSLOCKPROCESSMODE, PsLockReturnTimeout, PsLockWaitForever, PspProcessLockMutex, PsUnlockProcess(), Status, _ETHREAD::Tcb, TRUE, and UserMode. Referenced by DbgkCreateThread(), DbgkpResumeProcess(), DbgkpSuspendProcess(), NtAssignProcessToJobObject(), NtSetInformationProcess(), NtSetInformationThread(), NtTerminateProcess(), NtTerminateThread(), PspApplyJobLimitsToProcess(), PspCreateThread(), PspExitThread(), and PspTerminateProcess().
|
|
Definition at line 969 of file ps/create.c. References ASSERT, _SECURITY_SUBJECT_CONTEXT::ClientToken, DebugPort, _EPROCESS::DefaultHardErrorProcessing, EPROCESS, EXCEPTION_EXECUTE_HANDLER, ExInitializeFastMutex, FALSE, _OBJECT_TYPE_INITIALIZER::GenericMapping, _INITIAL_PEB::InheritedAddressSpace, INITIAL_PEB, _EPROCESS::Job, KeActiveProcessors, KeAttachProcess(), KeDetachProcess(), KeInitializeEvent, KeInitializeProcess(), KeInitializeSpinLock(), KeQuerySystemTime(), KPROCESSOR_MODE, L, _EJOB::LimitFlags, LpcPortObjectType, MmCreatePeb(), MmCreateProcessAddressSpace(), MmInitializeProcessAddressSpace(), MmSectionObjectType, MmWorkingSetList, _INITIAL_PEB::Mutant, NT_SUCCESS, NTSTATUS(), NULL, ObCreateObject(), ObDereferenceObject, ObGetObjectSecurity(), ObInheritDeviceMap(), ObInitProcess(), ObInitProcess2(), ObInsertObject(), ObjectAttributes, ObKillProcess(), ObReferenceObject, ObReferenceObjectByHandle(), ObReleaseObjectSecurity(), PAGED_CODE, _EPROCESS::Peb, _SECURITY_SUBJECT_CONTEXT::PrimaryToken, _EPROCESS::PriorityClass, _SECURITY_SUBJECT_CONTEXT::ProcessAuditId, PsActiveProcessHead, PsDereferencePrimaryToken, PsGetCurrentProcess, PsInitialSystemProcess, PsMaximumWorkingSet, PsMinimumWorkingSet, PspActiveProcessMutex, PspAddProcessToJob(), PspDeleteProcessSecurity(), PspForegroundQuantum, PspInheritQuota(), PspInitializeProcessSecurity(), PspInitialSystemProcessHandle, PspMapSystemDll(), PsProcessPriorityBackground, PsProcessType, PsReferencePrimaryToken(), PsSetProcessPriorityByClass(), SeAccessCheck(), SeAuditProcessCreation(), _EPROCESS::SectionBaseAddress, _EPROCESS::SectionHandle, SeDetailedAuditing, _EPROCESS::SessionId, TRUE, _OBJECT_TYPE::TypeInfo, and _EPROCESS::UniqueProcessId. Referenced by NtCreateProcess(), PsCreateSystemProcess(), and PspInitPhase0().
|
|
Definition at line 262 of file ps/create.c. References ASSERT, _SECURITY_SUBJECT_CONTEXT::ClientToken, _EJOB::CompletionKey, _EJOB::CompletionPort, DbgPrint, ETHREAD, EXCEPTION_EXECUTE_HANDLER, ExChangeHandle(), ExCreateHandle(), ExSetHandleTableOwner, FALSE, _OBJECT_TYPE_INITIALIZER::GenericMapping, _HANDLE_TABLE_ENTRY::GrantedAccess, InitialTeb, IoSetIoCompletion(), _EPROCESS::Job, _EPROCESS::JobStatus, KeEnableApcQueuingThread(), KeInitializeSemaphore(), KeInitializeSpinLock(), KeInitializeThread(), KeQuerySystemTime(), KeReadyThread(), KeResumeThread(), KernelMode, KeSuspendThread(), KPROCESSOR_MODE, L, _EJOB::MemoryLimitsLock, MmCreateKernelStack(), MmCreateTeb(), MmDeleteKernelStack(), MmDeleteTeb(), MmReadClusterSize, NT_SUCCESS, NTSTATUS(), NULL, ObCreateObject(), ObDereferenceObject, ObGetObjectSecurity(), ObInsertObject(), _HANDLE_TABLE_ENTRY::Object, ObjectAttributes, _EPROCESS::ObjectTable, ObReferenceObject, ObReferenceObjectByHandle(), ObReleaseObjectSecurity(), PAGED_CODE, _EPROCESS::Pcb, PERFINFO_PROCESS_CREATE, PERFINFO_THREAD_CREATE, PKSTART_ROUTINE, _SECURITY_SUBJECT_CONTEXT::PrimaryToken, _SECURITY_SUBJECT_CONTEXT::ProcessAuditId, PS_JOB_STATUS_NEW_PROCESS_REPORTED, PS_JOB_STATUS_NOT_REALLY_ACTIVE, PS_SET_BITS, PS_SET_THREAD_CREATE_TIME, PsDereferencePrimaryToken, PsGetCurrentThread, PsInitialSystemProcess, PsLockPollOnTimeout, PsLockProcess(), PSP_INVALID_ID, PSP_MAX_CREATE_PROCESS_NOTIFY, PSP_MAX_CREATE_THREAD_NOTIFY, PspCidTable, PspCreateProcessNotifyRoutine, PspCreateProcessNotifyRoutineCount, PspCreateThreadNotifyRoutine, PspCreateThreadNotifyRoutineCount, PspInitializeThreadSecurity(), PspMarkProcessIdValid(), PsProcessType, PspSystemThreadStartup(), PspUserThreadStartup(), PsReferencePrimaryToken(), PsThreadType, PsUnlockProcess(), SeAccessCheck(), ThreadContext, ThreadHandle, _EPROCESS::ThreadListHead, TRUE, _OBJECT_TYPE::TypeInfo, _EPROCESS::UniqueProcessId, and VOID(). Referenced by NtCreateThread(), and PsCreateSystemThread().
|
|
Definition at line 249 of file ps/create.c. References TRUE. Referenced by PspCreateThread().
|
|
Definition at line 1920 of file ps/create.c. References _ETHREAD::DeadThread, _ETHREAD::HasTerminated, KeBugCheck(), KeLowerIrql(), KMODE_EXCEPTION_NOT_HANDLED, MmAllowWorkingSetExpansion(), PsGetCurrentThread, PspExitThread(), and PspUnhandledExceptionInSystemThread(). Referenced by PspCreateThread().
|
|
Definition at line 1895 of file ps/create.c. References EXCEPTION_EXECUTE_HANDLER, KeBugCheckEx(), and KMODE_EXCEPTION_NOT_HANDLED. Referenced by PspSystemThreadStartup().
|
|
Definition at line 1800 of file ps/create.c. References _KTHREAD::ApcState, DbgkCreateThread(), _ETHREAD::DeadThread, _SYSTEM_DLL::DllBase, ExAllocatePool, ExFreePool(), _ETHREAD::HasTerminated, KeInitializeApc(), KeInsertQueueApc(), KeLowerIrql(), _SYSTEM_DLL::LoaderInitRoutine, MmAllowWorkingSetExpansion(), NonPagedPoolMustSucceed, NULL, OriginalApcEnvironment, PAGED_CODE, _EPROCESS::Pcb, PsDefaultThreadLocaleId, PsGetCurrentProcess, PsGetCurrentThread, PspExitThread(), PspNullSpecialApc(), PspSystemDll, _ETHREAD::Tcb, TRUE, _KAPC_STATE::UserApcPending, UserMode, and _KPROCESS::UserTime. Referenced by PspCreateThread().
|
|
Definition at line 1691 of file ps/create.c. References NULL, PSP_MAX_CREATE_PROCESS_NOTIFY, PspCreateProcessNotifyRoutine, and PspCreateProcessNotifyRoutineCount.
|
|
Definition at line 1755 of file ps/create.c. References NTSTATUS(), NULL, PSP_MAX_CREATE_THREAD_NOTIFY, PspCreateThreadNotifyRoutine, PspCreateThreadNotifyRoutineCount, and Status.
|
|
Definition at line 2344 of file ps/create.c. References NTSTATUS(), NULL, PAGED_CODE, PLOAD_IMAGE_NOTIFY_ROUTINE, PsImageNotifyEnabled, PSP_MAX_LOAD_IMAGE_NOTIFY, PspLoadImageNotifyRoutine, PspLoadImageNotifyRoutineCount, Status, and TRUE.
|
|
Definition at line 2250 of file ps/create.c. References ExAcquireFastMutexUnsafe(), ExReleaseFastMutexUnsafe(), FALSE, KeLeaveCriticalRegion, KeSetEvent(), NULL, PAGED_CODE, and PspProcessLockMutex. Referenced by DbgkCreateThread(), DbgkpResumeProcess(), DbgkpSuspendProcess(), NtAssignProcessToJobObject(), NtSetInformationProcess(), NtSetInformationThread(), NtTerminateProcess(), NtTerminateThread(), PsLockProcess(), PspApplyJobLimitsToProcess(), PspCreateThread(), PspExitThread(), and PspTerminateProcess().
|
|
Definition at line 43 of file ps/create.c. |
|
Definition at line 26 of file ps/create.c. |
|
Definition at line 45 of file ps/create.c. Referenced by CmGetSystemControlValues(), CmpCreatePerfKeys(), IopProcessNewDeviceNode(), LdrpSearchResourceSection_U(), NtQueryDefaultLocale(), and NtSetDefaultLocale(). |
|
Definition at line 46 of file ps/create.c. Referenced by CmGetSystemControlValues(), NtQueryDefaultLocale(), NtSetDefaultLocale(), and PspUserThreadStartup(). |
|
Definition at line 47 of file ps/create.c. Referenced by CmGetSystemControlValues(). |
|
Definition at line 58 of file ps/create.c. Referenced by DbgkCreateThread(), MiLoadSystemImage(), MiMapViewOfImageSection(), PsCallImageNotifyRoutines(), and PsSetLoadImageNotifyRoutine(). |
|
Definition at line 48 of file ps/create.c. Referenced by CmGetSystemControlValues(), LdrpSearchResourceSection_U(), NtQueryDefaultUILanguage(), and NtQueryInstallUILanguage(). |
|
Definition at line 56 of file ps/create.c. Referenced by PspCreateProcess(), and PspInitPhase0(). |
|
Definition at line 55 of file ps/create.c. |
|
Definition at line 64 of file ps/create.c. Referenced by PsLockProcess(), PspInitPhase0(), and PsUnlockProcess(). |