ReactOS  0.4.15-dev-2700-g4b4ffa9
fxrequestkm.cpp
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7  FxRequestKm.cpp
8 
9 Abstract:
10 
11  This module implements KM specific FxRequest object routines
12 
13 Author:
14 
15 
16 
17 Environment:
18 
19  Kernel mode only
20 
21 Revision History:
22 
23 
24 --*/
25 
26 #include "coreprivshared.hpp"
27 
28 // Tracing support
29 extern "C" {
30 // #include "FxRequestKm.tmh"
31 }
32 
33 VOID
35  VOID
36  )
37 /*++
38 
39 Routine Description:
40  This routine is never actually called by running code, it just has
41  WDFCASSERTs who upon failure, would not allow this file to be compiled.
42 
43  DO NOT REMOVE THIS FUNCTION just because it is not called by any running
44  code.
45 
46 Arguments:
47  None
48 
49 Return Value:
50  None
51 
52  --*/
53 {
54  PWDF_REQUEST_PARAMETERS pWdfRequestParameters = NULL;
55  PIO_STACK_LOCATION pIoStackLocation = NULL;
56 
57  UNREFERENCED_PARAMETER(pWdfRequestParameters);
58  UNREFERENCED_PARAMETER(pIoStackLocation);
59 
60  //
61  // FxRequest::GetParameters relies on these being exactly the same size
62  //
63  WDFCASSERT(sizeof(pWdfRequestParameters->Parameters) ==
64  sizeof(pIoStackLocation->Parameters));
65 
66  //
67  // The address of the offset in the structure needs to be 8 bit aligned
68  // so that we can store flags in the bottom 3 bits
69  //
72 
75 }
76 
77 
81  __out PMDL *pMdl
82  )
83 {
84  WDF_DEVICE_IO_TYPE ioType;
85  ULONG length;
86  PVOID pBuffer;
89  KIRQL irql;
90  PMDL pNewMdl;
92 
93  pBuffer = NULL;
94  length = 0;
96 
97  Lock(&irql);
98 
99  // Verifier
101 
102  status = VerifyRequestIsNotCompleted(pFxDriverGlobals);
103  if(!NT_SUCCESS(status)) {
104  Unlock(irql);
105  return status;
106  }
107  }
108 
109  //
110  // See if we have an IRP_MJ_DEVICE_CONTROL or IRP_MJ_INTERNAL_DEVICE_CONTROL
111  //
113 
116 
118  case METHOD_BUFFERED:
121 
122  // Fall through to common buffer handler
123  break;
124 
125  case METHOD_IN_DIRECT:
126  //
127  // InputBuffer is in SystemBuffer
128  // OutputBuffer is in MdlAddress with read access
129  //
132 
133  // Fall through to common buffer handler
134  break;
135 
136  case METHOD_OUT_DIRECT:
137  //
138  // InputBuffer is in SystemBuffer
139  // OutputBuffer is in MdlAddress with write access
140  //
143 
144  // Fall through to common buffer handler
145 
146  break;
147 
148  case METHOD_NEITHER:
149  default:
153  "Attempt to get UserMode MDL for METHOD_NEITHER DeviceControl 0x%x, "
154  "WDFDEVICE 0x%p, WDFREQUEST 0x%p, %!STATUS!",
157 
160  "Driver must use METHOD_BUFFERED or METHOD_xx_DIRECT "
161  "I/O for this call, or use "
162  "WdfDeviceInitSetIoInCallerContextCallback to probe "
163  "and lock user mode memory");
164 
165  *pMdl = NULL;
166  Unlock(irql);
167 
168  return status;
169  }
170  }
171  else {
172  //
173  // It's a non-Device Control request, we must know the devices I/O type in
174  // order to safely return the correct buffer
175  //
176  ioType = GetDevice()->GetIoType();
177 
178  if (ioType == WdfDeviceIoBuffered) {
179 
181 
182  //
183  // Must get the length depending on the request type code
184  //
185  if (majorFunction == IRP_MJ_READ) {
187  }
188  else if (majorFunction == IRP_MJ_WRITE) {
190  }
191  else {
192  //
193  // Report the error, we can support other IRP_MJ_xxx codes are required
194  // later
195  //
197 
200  "WDFREQUEST %p no Automatic MDL mapping for buffered request"
201  "major function 0x%x available for WDFDEVICE 0x%p, %!STATUS!",
203  status);
204 
205  *pMdl = NULL;
206 
207  Unlock(irql);
208 
209  return status;
210  }
211 
212  // Fall through to common buffer handler
213  }
214  else if (ioType == WdfDeviceIoDirect) {
215 
216  //
217  // If driver has used the default DO_DIRECT_IO I/O Mgr has done all the work
218  //
219  *pMdl = m_Irp.GetMdl();
220 
221  if (*pMdl == NULL) {
223 
226  "WDFREQUEST 0x%p for a direct io device, PMDL is NULL, "
227  "%!STATUS!", GetHandle(), status);
228  }
229  else {
231  }
232 
233  Unlock(irql);
234 
235  return status;
236  }
237  else if (ioType == WdfDeviceIoNeither) {
239 
242  "Attempt to get UserMode Buffer Pointer for "
243  "WDFDEVICE 0x%p, WDFREQUEST 0x%p, %!STATUS!",
245 
248  "Driver must use buffered or direct I/O for this "
249  "call, or use WdfDeviceInitSetIoInCallerContextCallback "
250  "to probe and lock user mode memory");
252 
253  *pMdl = NULL;
254  Unlock(irql);
255 
256  return status;
257  }
258  else {
260 
263  "Unrecognized I/O Type %d on WDFDEVICE 0x%p, WDFREQUEST 0x%p, "
264  "%!STATUS!",
265  ioType, GetDevice()->GetHandle(), GetHandle(), status);
267 
268  *pMdl = NULL;
269  Unlock(irql);
270 
271  return status;
272  }
273  }
274 
275  //
276  // if pBuffer != NULL, attempt to generate an MDL for it
277  //
278  if( (pBuffer == NULL) || (length == 0) ) {
279  *pMdl = NULL;
280  Unlock(irql);
281 
283 
284  if (pBuffer == NULL) {
287  "WDFREQUEST 0x%p, SystemBuffer is NULL, %!STATUS!",
288  GetHandle(), status);
289  }
290  else if (length == 0) {
293  "WDFREQUEST 0x%p, SystemBuffer length is 0, %!STATUS!",
294  GetHandle(), status);
295  }
296 
297  return status;
298  }
299 
300  //
301  // See if we have already allocated an MDL for this
302  //
303  if( m_AllocatedMdl != NULL ) {
304  *pMdl = m_AllocatedMdl;
305  Unlock(irql);
306  return STATUS_SUCCESS;
307  }
308 
310  this,
311  pBuffer,
312  length,
313  FALSE,
314  FALSE);
315 
316  if (pNewMdl == NULL) {
318 
321  "Could not allocate MDL for buffer 0x%p Length %d, %!STATUS!",
322  pBuffer, length, status);
323  *pMdl = NULL;
324  Unlock(irql);
325 
326  return status;
327  }
328 
330 
331  //
332  // We associated the Mdl with the request object
333  // so it can be freed when completed.
334  //
335  m_AllocatedMdl = pNewMdl;
336 
337  *pMdl = pNewMdl;
338 
339  Unlock(irql);
340 
341  return STATUS_SUCCESS;
342 }
343 
344 
346 NTSTATUS
348  __out PMDL *pMdl
349  )
350 /*++
351 
352 Routine Description:
353 
354  Return the IRP_MJ_DEVICE_CONTROL OutputBuffer as an MDL
355 
356  The MDL is automatically released when the request is completed.
357 
358  The MDL is not valid for a METHOD_NEITHER IRP_MJ_DEVICE_CONTROL,
359  or for any request other than IRP_MJ_DEVICE_CONTROL.
360 
361  The MDL is as follows for each buffering mode:
362 
363  METHOD_BUFFERED:
364 
365  MmBuildMdlForNonPagedPool(IoAllocateMdl(Irp->UserBuffer, ... ))
366 
367  METHOD_IN_DIRECT:
368 
369  Irp->MdlAddress
370 
371  METHOD_OUT_DIRECT:
372 
373  Irp->MdlAddress
374 
375  METHOD_NEITHER:
376 
377  NULL. Must use WdfDeviceInitSetIoInCallerContextCallback in order
378  to access the request in the calling threads address space before
379  it is placed into any I/O Queues.
380 
381  The MDL is only valid until the request is completed.
382 
383 Arguments:
384 
385  pMdl- Pointer location to return MDL ptr
386 
387 Returns:
388 
389  NTSTATUS
390 
391 --*/
392 {
393  ULONG length;
394  PVOID pBuffer;
395  KIRQL irql;
398  PMDL pNewMdl;
400 
401  length = 0;
402  pBuffer = NULL;
404 
405  Lock(&irql);
406 
407  // Verifier
409 
410  status = VerifyRequestIsNotCompleted(pFxDriverGlobals);
411  if (!NT_SUCCESS(status)) {
412  Unlock(irql);
413  return status;
414  }
415  }
416 
417  //
418  // See if we have an IRP_MJ_DEVICE_CONTROL or IRP_MJ_INTERNAL_DEVICE_CONTROL
419  //
421 
425 
426  //
427  // It's a non-Device Control request, which is an error for this call
428  //
431  "WDFREQUEST %p (MajorFunction is 0x%x) this call is only valid for "
432  "IOCTLs, %!STATUS!", GetHandle(), majorFunction, status);
433  *pMdl = NULL;
434 
435  Unlock(irql);
436 
437  return status;
438  }
439 
441  case METHOD_BUFFERED:
442 
445 
446  // Fall through to common buffer handler
447  break;
448 
449  case METHOD_IN_DIRECT:
450  //
451  // InputBuffer is in SystemBuffer
452  // OutputBuffer is in MdlAddress with read access
453  //
454  *pMdl = m_Irp.GetMdl();
455 
456  if (*pMdl == NULL) {
458 
461  "WDFREQUEST 0x%p, METHOD_IN_DIRECT IOCTL, PMDL is NULL, "
462  "%!STATUS!", GetHandle(), status);
463  }
464  else {
466  }
467  Unlock(irql);
468 
469  return status;
470 
471  case METHOD_OUT_DIRECT:
472  //
473  // InputBuffer is in SystemBuffer
474  // OutputBuffer is in MdlAddress with write access
475  //
476  *pMdl = m_Irp.GetMdl();
477 
478  if (*pMdl == NULL) {
480 
483  "WDFREQUEST 0x%p, METHOD_OUT_DIRECT IOCTL, PMDL is NULL, "
484  "%!STATUS!", GetHandle(), status);
485  }
486  else {
488  }
489  Unlock(irql);
490 
491  return status;
492 
493  case METHOD_NEITHER:
495 
498  "Attempt to get UserMode Buffer Pointer for METHOD_NEITHER "
499  "DeviceControl 0x%x, WDFDEVICE 0x%p, WDFREQUEST 0x%p, %!STATUS!",
502 
505  "Driver must use METHOD_BUFFERED or METHOD_xx_DIRECT I/O for this "
506  "call, or use WdfDeviceInitSetIoInCallerContextCallback to probe "
507  "and lock user mode memory");
508 
509  *pMdl = NULL;
510  Unlock(irql);
511 
512  return status;
513  }
514 
515  //
516  // if pBuffer != NULL, attempt to generate an MDL for it
517  //
518  if( (pBuffer == NULL) || (length == 0) ) {
519  *pMdl = NULL;
520 
521  Unlock(irql);
522 
524 
525  if (pBuffer == NULL) {
528  "WDFREQUEST 0x%p, SystemBuffer is NULL, %!STATUS!",
529  GetHandle(), status);
530  }
531  else if (length == 0) {
534  "WDFREQUEST 0x%p, SystemBuffer length is 0, %!STATUS!",
535  GetHandle(), status);
536  }
537 
538  return status;
539  }
540 
541  //
542  // See if we have already allocated an MDL for this
543  //
544  if( m_AllocatedMdl != NULL ) {
545  *pMdl = m_AllocatedMdl;
546  Unlock(irql);
547 
548  return STATUS_SUCCESS;
549  }
550 
552  this,
553  pBuffer,
554  length,
555  FALSE,
556  FALSE);
557 
558  if (pNewMdl == NULL) {
560 
563  "WDFREQUEST %p could not allocate MDL for buffer 0x%p Length %d, "
564  "%!STATUS!", GetHandle(), pBuffer, length, status);
565  *pMdl = NULL;
566  Unlock(irql);
567 
568  return status;
569  }
570 
572 
573  //
574  // We associated the Mdl with the request object
575  // so it can be freed when completed.
576  //
577  m_AllocatedMdl = pNewMdl;
578 
579  *pMdl = pNewMdl;
580 
581  Unlock(irql);
582 
583  return STATUS_SUCCESS;
584 }
585 
587 NTSTATUS
589  __in PVOID Buffer,
590  __in ULONG Length,
592  )
593 
594 /*++
595 
596 Routine Description:
597 
598  Probe and lock a memory buffer for reading.
599 
600  This is to be called in the proper process context, and
601  will generate an FxRequestMemory object if successful.
602 
603  The FxRequestMemory object will be associated with the FxRequest
604  object, and is automatically released when the FxRequest is completed.
605 
606  This function performs validation to ensure that the current
607  thread is in the same process as the thread that originated
608  the I/O request.
609 
610 Arguments:
611 
612 
613  Buffer - Buffer to lock down
614 
615  Length - Length of buffer
616 
617  MemoryObject - FxRequestMemory object to return
618 
619 Returns:
620 
621  NTSTATUS
622 
623 --*/
624 
625 {
627  PMDL pMdl;
628  PIRP irp;
629  PVOID pVA;
632 
633  pMdl = NULL;
634  pMemory = NULL;
636 
637  if (Length == 0) {
639 
642  "Length of zero not allowed, %!STATUS!", status);
643 
644  return status;
645  }
646 
647  irp = m_Irp.GetIrp();
648 
649  if (irp == NULL) {
651 
652  // Error, completed request
655  "WDFREQUEST %p has already been completed or has no PIRP assignment,"
656  " %!STATUS!", GetObjectHandle(), status);
657 
659 
660  return status;
661  }
662 
663  //
664  // Look at the Irp, and if there is a thread field, validate we are
665  // actually in the correct process!
666  //
667  status = VerifyProbeAndLock(pFxDriverGlobals);
668  if(!NT_SUCCESS(status) ) {
669  return status;
670  }
671 
673 
674  if (pMdl == NULL) {
677  "Failed to allocate MDL %!STATUS!", status);
678  return status;
679  }
680 
681  // Use a C utility function for the probe due to C++ exception handling issues
683 
684  if (!NT_SUCCESS(status)) {
686  "Exception is raised for Address 0x%p, Length %d %!STATUS!",
687  Buffer, Length, status);
689  return status;
690  }
691 
692  //
693  // Get a system address for the MDL
694  //
696  if (pVA == NULL) {
698  goto Done;
699  }
700 
701  // Build an FxRequestMemory object now
703  if (!NT_SUCCESS(status)) {
704  goto Done;
705  }
706 
707  // Associate the FxRequestMemory object with the FxRequest
708  status = pMemory->Commit(NULL, NULL, this);
709  if (!NT_SUCCESS(status)) {
710  goto Done;
711  }
712 
713 Done:
714  if (NT_SUCCESS(status)) {
715  //
716  // If we re-define the WDFMEMORY interfaces to allow
717  // failure for get buffer, we could delay the assignment
718  // of SystemAddressForMdl and its PTE's until the driver
719  // actually requests a double buffer mapping.
720  //
721  // Some DMA drivers may just retrieve the MDL from the WDFMEMORY
722  // and not even attempt to access the underlying bytes, other
723  // than through hardware DMA.
724  //
725  pMemory->SetMdl(
726  this,
727  pMdl,
728  pVA,
729  Length,
730  TRUE // Readonly
731  );
732 
734  }
735  else {
736  if (pMemory != NULL) {
738  }
739 
740  Mx::MxUnlockPages(pMdl);
742  }
743 
744  return status;
745 }
746 
748 NTSTATUS
750  __in PVOID Buffer,
751  __in ULONG Length,
753  )
754 
755 /*++
756 
757 Routine Description:
758 
759  Probe and lock a memory buffer for writing.
760 
761  This is to be called in the proper process context, and
762  will generate an FxRequestMemory object if successful.
763 
764  The FxRequestMemory object will be associated with the FxRequest
765  object, and is automatically released when the FxRequest is completed.
766 
767  This function performs validation to ensure that the current
768  thread is in the same process as the thread that originated
769  the I/O request.
770 
771 Arguments:
772 
773 
774  Buffer - Buffer to lock down
775 
776  Length - Length of buffer
777 
778  MemoryObject - FxRequestMemory object to return
779 
780 Returns:
781 
782  NTSTATUS
783 
784 --*/
785 
786 {
788  PMDL pMdl;
789  PIRP irp;
790  PVOID pVA;
793 
794  pMdl = NULL;
795  pMemory = NULL;
797 
798  if (Length == 0) {
800 
803  "Length of zero not allowed, %!STATUS!", status);
804 
805  return status;
806  }
807 
808  irp = m_Irp.GetIrp();
809 
810  if (irp == NULL) {
812 
813  // Error, completed request
816  "WDFREQUEST %p has already been completed or has no PIRP assignment,"
817  " %!STATUS!", GetObjectHandle(), status);
818 
820 
821  return status;
822  }
823 
824  //
825  // Look at the Irp, and if there is a thread field, validate we are
826  // actually in the correct process!
827  //
828  status = VerifyProbeAndLock(pFxDriverGlobals);
829  if(!NT_SUCCESS(status) ) {
830  return status;
831  }
832 
834  if (pMdl == NULL) {
837  "Failed to allocate MDL %!STATUS!", status);
838  return status;
839  }
840 
841  // Use a C utility function for the probe due to C++ exception handling issues
843 
844  if (!NT_SUCCESS(status)) {
846  "Exception is raised for Address 0x%p, Length %d %!STATUS!",
847  Buffer, Length, status);
849  return status;
850  }
851 
852  //
853  // Get a system address for the MDL
854  //
856  if (pVA == NULL) {
858  goto Done;
859  }
860 
861  // Build an FxRequestMemory object now
863  if (!NT_SUCCESS(status)) {
864  goto Done;
865  }
866 
867  // Associate the FxRequestMemory object with the FxRequest
868  status = pMemory->Commit(NULL, NULL, this);
869  if (!NT_SUCCESS(status)) {
870  goto Done;
871  }
872 
873 Done:
874  if (NT_SUCCESS(status)) {
875  //
876  // If we re-define the WDFMEMORY interfaces to allow
877  // failure for get buffer, we could delay the assignment
878  // of SystemAddressForMdl and its PTE's until the driver
879  // actually requests a double buffer mapping.
880  //
881  // Some DMA drivers may just retrieve the MDL from the WDFMEMORY
882  // and not even attempt to access the underlying bytes, other
883  // than through hardware DMA.
884  //
885  pMemory->SetMdl(
886  this,
887  pMdl,
888  pVA,
889  Length,
890  FALSE // FALSE indicates not a readonly buffer
891  );
892 
894  }
895  else {
896  if (pMemory != NULL) {
898  }
899 
900  Mx::MxUnlockPages(pMdl);
902  }
903 
904  return status;
905 }
906 
__drv_restoresIRQL KIRQL __in BOOLEAN Unlock
Definition: fxobject.hpp:1474
ULONG GetParameterReadLength(VOID)
Definition: fxirpum.cpp:1589
#define _Must_inspect_result_
Definition: no_sal2.h:62
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:863
_Must_inspect_result_ NTSTATUS Commit(__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out_opt WDFOBJECT *ObjectHandle, __in_opt FxObject *Parent=NULL, __in BOOLEAN AssignDriverAsDefaultParent=TRUE)
Definition: fxobject.cpp:904
static __inline VOID MxBuildMdlForNonPagedPool(__inout PMDL Mdl)
Definition: mxgeneralkm.h:376
static NTSTATUS Create(__in PFX_DRIVER_GLOBALS DriverGlobals, __in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out FxRequestMemory **Object)
__inline WDF_DEVICE_IO_TYPE GetIoType(VOID)
Definition: fxdevice.hpp:1084
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
WDFDEVICE __inline GetHandle(VOID)
Definition: fxdevice.hpp:237
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
WDFCASSERT(sizeof(WDF_DRIVER_CONFIG_V1_0)==sizeof(WDF_DRIVER_CONFIG_V1_1))
LONG NTSTATUS
Definition: precomp.h:26
enum _WDF_DEVICE_IO_TYPE WDF_DEVICE_IO_TYPE
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
FxMemoryObject * pMemory
KIRQL irql
Definition: wave.h:1
_Must_inspect_result_ NTSTATUS GetDeviceControlOutputMdl(__out PMDL *pMdl)
_Must_inspect_result_ NTSTATUS GetMdl(__out PMDL *pMdl)
Definition: fxrequestkm.cpp:80
NTSTATUS FxProbeAndLockForWrite(__in PMDL Mdl, __in KPROCESSOR_MODE AccessMode)
Definition: probeandlock.c:55
#define TRACINGREQUEST
Definition: dbgtrace.h:65
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
_Must_inspect_result_ NTSTATUS ProbeAndLockForWrite(__in PVOID Buffer, __in ULONG Length, __deref_out FxRequestMemory **pMemoryObject)
#define METHOD_IN_DIRECT
Definition: nt_native.h:595
#define STATUS_INTERNAL_ERROR
Definition: ntstatus.h:465
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define METHOD_NEITHER
Definition: nt_native.h:597
#define FALSE
Definition: types.h:117
ULONG GetParameterIoctlInputBufferLength(VOID)
Definition: fxirpum.cpp:1518
WDFOBJECT_OFFSET_ALIGNED m_OutputBufferOffset
union _WDF_REQUEST_PARAMETERS::@3670 Parameters
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
#define STATUS_INVALID_USER_BUFFER
Definition: udferr_usr.h:166
PVOID __inline GetObjectHandle(VOID)
Definition: fxobject.hpp:603
#define __out
Definition: dbghelp.h:62
_Must_inspect_result_ NTSTATUS ProbeAndLockForRead(__in PVOID Buffer, __in ULONG Length, __deref_out FxRequestMemory **pMemoryObject)
PVOID pBuffer
Definition: bufpool.h:45
PMDL GetMdl()
Definition: fxirpum.cpp:625
#define METHOD_OUT_DIRECT
Definition: nt_native.h:596
PFX_DRIVER_GLOBALS pFxDriverGlobals
static __inline PVOID MxGetSystemAddressForMdlSafe(__inout PMDL Mdl, __in ULONG Priority)
Definition: mxgeneralkm.h:366
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define IRP_MJ_INTERNAL_DEVICE_CONTROL
unsigned char UCHAR
Definition: xmlstorage.h:181
_Must_inspect_result_ _In_ WDFREQUEST _In_ size_t _Out_ WDFMEMORY * MemoryObject
Definition: wdfrequest.h:1470
struct _IO_STACK_LOCATION::@3765::@3770 Write
VOID __inline FxMdlFree(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PMDL Mdl)
Definition: fxmdl.h:60
WDFOBJECT_OFFSET_ALIGNED m_SystemBufferOffset
NTSTATUS FxProbeAndLockForRead(__in PMDL Mdl, __in KPROCESSOR_MODE AccessMode)
Definition: probeandlock.c:36
ULONG GetParameterWriteLength(VOID)
Definition: fxirpum.cpp:1601
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
BOOLEAN FxVerifierIO
Definition: fxglobals.h:446
PVOID GetSystemBuffer()
Definition: fxirpum.cpp:543
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
static __inline VOID MxUnlockPages(__in PMDL Mdl)
Definition: mxgeneralkm.h:357
MdIrp GetIrp(VOID)
Definition: fxirpum.cpp:15
struct _IO_STACK_LOCATION::@3765::@3769 Read
ULONG GetParameterIoctlOutputBufferLength(VOID)
Definition: fxirpum.cpp:1504
#define METHOD_BUFFERED
Definition: nt_native.h:594
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
ULONG GetParameterIoctlCodeBufferMethod(VOID)
Definition: fxirpum.cpp:1490
#define NULL
Definition: types.h:112
UCHAR majorFunction
#define IRP_MJ_READ
Definition: rdpdr.c:46
VOID DeleteFromFailedCreate(VOID)
Definition: fxobject.cpp:391
#define __deref_out
Definition: dbghelp.h:26
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:124
unsigned int ULONG
Definition: retypes.h:1
__inline CfxDevice * GetDevice(VOID)
Definition: fxrequest.hpp:600
PMDL FORCEINLINE FxMdlAllocate(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObject *Owner, __in PVOID VirtualAddress, __in ULONG Length, __in BOOLEAN SecondaryBuffer, __in BOOLEAN ChargeQuota)
Definition: fxmdl.h:31
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
static VOID CheckAssumptions(VOID)
Definition: fxrequestkm.cpp:34
#define STATUS_SUCCESS
Definition: shellext.h:65
ULONG GetParameterIoctlCode(VOID)
Definition: fxirpum.cpp:1474
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:3128
UCHAR GetMajorFunction(VOID)
Definition: fxirpum.cpp:217
#define __in
Definition: dbghelp.h:35
static SERVICE_STATUS status
Definition: service.c:31
FxIrp * irp
__inline WDFREQUEST GetHandle(VOID)
FxVerifierDbgBreakPoint(pFxDriverGlobals)
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52
Definition: ps.c:97