/*++

    Copyright (c) Microsoft Corporation.  All rights reserved.

Rule Name:

    IrqlPsPassive

Domain:

    Wdm

Rule ID:

    0x0002001C

Description:

    The IrqlPsPassive rule specifies that the driver calls the following 
    Process Structure routines only when it is executing at 
    IRQL = PASSIVE_LEVEL:
        PsCreateSystemThread
        PsGetVersion
        PsSetCreateProcessNotifyRoutine
        PsSetCreateThreadNotifyRoutine
        PsSetLoadImageNotifyRoutine
        PsTerminateSystemThread

Help Link:

    https://go.microsoft.com/fwlink/?LinkId=216045

--*/


#include "slic_base.h"


PsGetVersion.entry
{
    if ( sdv_irql_current != PASSIVE_LEVEL ) {
        abort "$fname should only be called at IRQL = PASSIVE_LEVEL.";
    }
}

PsSetCreateProcessNotifyRoutine.entry
{
    if ( sdv_irql_current != PASSIVE_LEVEL ) {
        abort "$fname should only be called at IRQL = PASSIVE_LEVEL.";
    }
}

PsSetCreateThreadNotifyRoutine.entry
{
    if ( sdv_irql_current != PASSIVE_LEVEL ) {
        abort "$fname should only be called at IRQL = PASSIVE_LEVEL.";
    }
}

PsSetLoadImageNotifyRoutine.entry
{
    if ( sdv_irql_current != PASSIVE_LEVEL ) {
        abort "$fname should only be called at IRQL = PASSIVE_LEVEL.";
    }
}

PsTerminateSystemThread.entry
{
    if ( sdv_irql_current != PASSIVE_LEVEL ) {
        abort "$fname should only be called at IRQL = PASSIVE_LEVEL.";
    }
}

PsCreateSystemThread.entry
{
    if ( sdv_irql_current != PASSIVE_LEVEL ) {
        abort "$fname should only be called at IRQL = PASSIVE_LEVEL.";
    }
}

