1 /*++ 2 3 Copyright (c) Microsoft Corporation 4 5 Module Name: 6 7 FxVerifierKm.cpp 8 9 Abstract: 10 11 Verifier code specific to KMDF 12 13 Environment: 14 15 kernel mode 16 17 Revision History: 18 19 20 21 --*/ 22 23 #ifndef _FXVERIFIERKM_H_ 24 #define _FXVERIFIERKM_H_ 25 26 FORCEINLINE 27 VOID 28 FxVerifierCheckNxPoolType( 29 _In_ PFX_DRIVER_GLOBALS FxDriverGlobals, 30 _In_ POOL_TYPE PoolType, 31 _In_ ULONG PoolTag 32 ) 33 34 /*++ 35 36 Routine Description: 37 38 This function performs the "no execute" pool type check for KMDF 39 client drivers. 40 41 N.B. It is important to keep this function inlined to make sure 42 _ReturnAddress() produces the correct calling function. 43 44 Arguments: 45 46 FxDriverGlobals - Supplies a pointer to the WDF driver object 47 globals. 48 49 PoolType - Supplies the pool type. 50 51 PoolTag - Supplies an optional pool tag. 52 53 Return Value: 54 55 None. 56 57 --*/ 58 59 { 60 if (FxDriverGlobals->FxVerifierOn && 61 FxLibraryGlobals.VfCheckNxPoolType != NULL) { 62 63 // 64 // Forward the call to Driver Verifier. This will provide a consistent 65 // behavior across all verified drivers. 66 // 67 68 FxLibraryGlobals.VfCheckNxPoolType(PoolType, _ReturnAddress(), PoolTag); 69 } 70 } 71 72 #endif // _FXVERIFIERKM_H_ 73