122 DPRINT(
"PspAssignProcessToJob() is unimplemented!\n");
132 DPRINT(
"PspTerminateJobObject() is unimplemented!\n");
317 DPRINT1(
"Failed to initialize job lock!!!\n");
387 if(ProcessJob !=
NULL)
389 if(JobHandle ==
NULL)
488 PVOID JobInformation,
489 ULONG JobInformationLength,
532 SizeToCopy = JobInformationLength;
539 ASSERT(((RequiredAlign) == 1) || ((RequiredAlign) == 2) || ((RequiredAlign) == 4) || ((RequiredAlign) == 8) || ((RequiredAlign) == 16));
544 if (JobInformation !=
NULL)
546 ProbeForWrite(JobInformation, JobInformationLength, RequiredAlign);
563 if (JobHandle !=
NULL)
582 Job = CurrentProcess->
Job;
594 switch (JobInformationClass)
627 NextEntry = NextEntry->
Flink)
653 GenericCopy = &BasicAndIo;
705 GenericCopy = &ExtendedLimit;
711 DPRINT1(
"Class %d not implemented\n", JobInformationClass);
755 PVOID JobInformation,
756 ULONG JobInformationLength)
783 ASSERT(((RequiredAlign) == 1) || ((RequiredAlign) == 2) || ((RequiredAlign) == 4) || ((RequiredAlign) == 8) || ((RequiredAlign) == 16));
788 if (JobInformationLength != 0)
790 ProbeForRead(JobInformation, JobInformationLength, RequiredAlign);
825 switch (JobInformationClass)
828 DPRINT1(
"Class JobObjectExtendedLimitInformation not implemented\n");
833 DPRINT1(
"Class %d not implemented\n", JobInformationClass);
924 ULONG UIRestrictionsClass)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define STATUS_NOT_IMPLEMENTED
#define NT_SUCCESS(StatCode)
IN CINT OUT PVOID IN ULONG OUT PULONG ReturnLength
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define KeInitializeEvent(pEvt, foo, foo2)
#define InitializeListHead(ListHead)
#define ExAcquireResourceSharedLite(res, wait)
#define ExReleaseRundownProtection
#define ExGetPreviousMode
#define InterlockedExchangeUL(Target, Value)
#define ExAcquireRundownProtection
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
#define BooleanFlagOn(F, SF)
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
VOID FASTCALL KeReleaseGuardedMutexUnsafe(IN OUT PKGUARDED_MUTEX GuardedMutex)
VOID FASTCALL KeInitializeGuardedMutex(OUT PKGUARDED_MUTEX GuardedMutex)
VOID FASTCALL KeAcquireGuardedMutexUnsafe(IN OUT PKGUARDED_MUTEX GuardedMutex)
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
#define KeGetCurrentThread
#define PROCESS_TERMINATE
#define JOB_OBJECT_SET_SECURITY_ATTRIBUTES
#define PROCESS_QUERY_INFORMATION
struct _JOBOBJECT_BASIC_PROCESS_ID_LIST JOBOBJECT_BASIC_PROCESS_ID_LIST
enum _JOBOBJECTINFOCLASS JOBOBJECTINFOCLASS
struct _JOBOBJECT_SECURITY_LIMIT_INFORMATION JOBOBJECT_SECURITY_LIMIT_INFORMATION
#define JOB_OBJECT_TERMINATE
@ JobObjectBasicLimitInformation
@ JobObjectBasicAndIoAccountingInformation
@ JobObjectBasicAccountingInformation
@ JobObjectSecurityLimitInformation
@ JobObjectExtendedLimitInformation
@ JobObjectBasicProcessIdList
@ JobObjectJobSetInformation
struct _JOBOBJECT_EXTENDED_LIMIT_INFORMATION JOBOBJECT_EXTENDED_LIMIT_INFORMATION
struct _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION JOBOBJECT_BASIC_ACCOUNTING_INFORMATION
#define JOB_OBJECT_ASSIGN_PROCESS
#define JOB_OBJECT_SET_ATTRIBUTES
struct _JOBOBJECT_ASSOCIATE_COMPLETION_PORT JOBOBJECT_ASSOCIATE_COMPLETION_PORT
#define EXCEPTION_EXECUTE_HANDLER
#define KeEnterGuardedRegionThread(_Thread)
#define KeLeaveGuardedRegionThread(_Thread)
_In_ HANDLE ProcessHandle
#define THREAD_ALL_ACCESS
#define STANDARD_RIGHTS_READ
struct _EPROCESS * PEPROCESS
#define STANDARD_RIGHTS_ALL
#define STANDARD_RIGHTS_WRITE
#define STANDARD_RIGHTS_EXECUTE
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
VOID NTAPI KeQueryValuesProcess(IN PKPROCESS Process, PPROCESS_VALUES Values)
NTSTATUS NTAPI NtIsProcessInJob(IN HANDLE ProcessHandle, IN HANDLE JobHandle OPTIONAL)
VOID NTAPI PspRemoveProcessFromJob(IN PEPROCESS Process, IN PEJOB Job)
NTSTATUS NTAPI NtQueryInformationJobObject(HANDLE JobHandle, JOBOBJECTINFOCLASS JobInformationClass, PVOID JobInformation, ULONG JobInformationLength, PULONG ReturnLength)
ULONG NTAPI PsGetJobUIRestrictionsClass(PEJOB Job)
VOID NTAPI PspExitProcessFromJob(IN PEJOB Job, IN PEPROCESS Process)
VOID NTAPI PspInitializeJobStructures(VOID)
NTSTATUS NTAPI NtTerminateJobObject(HANDLE JobHandle, NTSTATUS ExitStatus)
NTSTATUS NTAPI PspAssignProcessToJob(PEPROCESS Process, PEJOB Job)
PVOID NTAPI PsGetJobLock(PEJOB Job)
NTSTATUS NTAPI PspTerminateJobObject(PEJOB Job, KPROCESSOR_MODE AccessMode, NTSTATUS ExitStatus)
NTSTATUS NTAPI NtOpenJobObject(PHANDLE JobHandle, ACCESS_MASK DesiredAccess, POBJECT_ATTRIBUTES ObjectAttributes)
BOOLEAN PspUseJobSchedulingClasses
ULONG NTAPI PsGetJobSessionId(PEJOB Job)
static FAST_MUTEX PsJobListLock
CHAR PspJobSchedulingClasses[PSP_JOB_SCHEDULING_CLASSES]
VOID NTAPI PspDeleteJob(PVOID ObjectBody)
NTSTATUS NTAPI NtSetInformationJobObject(HANDLE JobHandle, JOBOBJECTINFOCLASS JobInformationClass, PVOID JobInformation, ULONG JobInformationLength)
NTSTATUS NTAPI NtAssignProcessToJobObject(HANDLE JobHandle, HANDLE ProcessHandle)
GENERIC_MAPPING PspJobMapping
NTSTATUS NTAPI NtCreateJobObject(PHANDLE JobHandle, ACCESS_MASK DesiredAccess, POBJECT_ATTRIBUTES ObjectAttributes)
NTSTATUS NTAPI NtCreateJobSet(IN ULONG NumJob, IN PJOB_SET_ARRAY UserJobSet, IN ULONG Flags)
VOID NTAPI PsSetJobUIRestrictionsClass(PEJOB Job, ULONG UIRestrictionsClass)
ULONG PspJobInfoLengths[]
POBJECT_TYPE PsProcessType
ULONG NTAPI PsGetProcessSessionId(IN PEPROCESS Process)
#define STATUS_PROCESS_IN_JOB
#define STATUS_PROCESS_NOT_IN_JOB
#define STATUS_INVALID_INFO_CLASS
NTSTATUS NTAPI ObInsertObject(IN PVOID Object, IN PACCESS_STATE AccessState OPTIONAL, IN ACCESS_MASK DesiredAccess, IN ULONG ObjectPointerBias, OUT PVOID *NewObject OPTIONAL, OUT PHANDLE Handle)
NTSTATUS NTAPI ObOpenObjectByName(IN POBJECT_ATTRIBUTES ObjectAttributes, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, IN PACCESS_STATE PassedAccessState, IN ACCESS_MASK DesiredAccess, IN OUT PVOID ParseContext, OUT PHANDLE Handle)
NTSTATUS NTAPI ObCreateObject(IN KPROCESSOR_MODE ProbeMode OPTIONAL, IN POBJECT_TYPE Type, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN KPROCESSOR_MODE AccessMode, IN OUT PVOID ParseContext OPTIONAL, IN ULONG ObjectSize, IN ULONG PagedPoolCharge OPTIONAL, IN ULONG NonPagedPoolCharge OPTIONAL, OUT PVOID *Object)
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)
#define PSP_JOB_SCHEDULING_CLASSES
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_YIELD(__stmt)
#define ProbeForWriteHandle(Ptr)
#define ProbeForWriteUlong(Ptr)
PULONG MinorVersion OPTIONAL
LARGE_INTEGER ThisPeriodTotalUserTime
ULONGLONG OtherTransferCount
LARGE_INTEGER TotalKernelTime
LIST_ENTRY ProcessListHead
ULONG UIRestrictionsClass
ULONGLONG OtherOperationCount
LARGE_INTEGER PerJobUserTimeLimit
ULONG PeakProcessMemoryUsed
ULONGLONG ReadTransferCount
ULONG TotalPageFaultCount
ULONG MinimumWorkingSetSize
ULONG TotalTerminatedProcesses
ULONG MaximumWorkingSetSize
LARGE_INTEGER TotalUserTime
ULONGLONG ReadOperationCount
LARGE_INTEGER ThisPeriodTotalKernelTime
ULONGLONG WriteOperationCount
EX_PUSH_LOCK MemoryLimitsLock
ULONGLONG WriteTransferCount
LARGE_INTEGER PerProcessUserTimeLimit
ULONGLONG ReadOperationCount
ULONGLONG WriteTransferCount
ULONGLONG WriteOperationCount
ULONGLONG ReadTransferCount
ULONGLONG OtherOperationCount
ULONGLONG OtherTransferCount
struct _LIST_ENTRY * Flink
LARGE_INTEGER TotalUserTime
LARGE_INTEGER TotalKernelTime
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_ACCESS_DENIED
#define STATUS_INFO_LENGTH_MISMATCH
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
_In_ ULONG _Out_opt_ PULONG RequiredLength
_Must_inspect_result_ _In_ ULONG Flags
#define ExInitializeResource
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
_In_ PEPROCESS _In_ KPROCESSOR_MODE AccessMode
#define ObDereferenceObject
#define ObReferenceObject
#define PsGetCurrentProcess
_In_ KPROCESSOR_MODE PreviousMode