ReactOS  0.4.13-dev-249-gcba1a2f
CcMapData_drv.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS kernel-mode tests
3  * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory
4  * PURPOSE: Test driver for CcMapData function
5  * PROGRAMMER: Pierre Schweitzer <pierre@reactos.org>
6  */
7 
8 #include <kmt_test.h>
9 
10 #define NDEBUG
11 #include <debug.h>
12 
13 #define IOCTL_START_TEST 1
14 #define IOCTL_FINISH_TEST 2
15 
16 typedef struct _TEST_FCB
17 {
22 
23 typedef struct _TEST_CONTEXT
24 {
29 
30 static ULONG TestTestId = -1;
33 static KMT_IRP_HANDLER TestIrpHandler;
34 static KMT_MESSAGE_HANDLER TestMessageHandler;
35 
41  _Inout_ INT *Flags)
42 {
44 
45  PAGED_CODE();
46 
48 
49  *DeviceName = L"CcMapData";
50  *Flags = TESTENTRY_NO_EXCLUSIVE_DEVICE |
51  TESTENTRY_BUFFERED_IO_DEVICE |
52  TESTENTRY_NO_READONLY_DEVICE;
53 
56 
57 
58  return Status;
59 }
60 
61 VOID
64 {
65  PAGED_CODE();
66 }
67 
68 BOOLEAN
69 NTAPI
73 {
74  return TRUE;
75 }
76 
77 VOID
78 NTAPI
81 {
82  return;
83 }
84 
85 BOOLEAN
86 NTAPI
90 {
91  return TRUE;
92 }
93 
94 VOID
95 NTAPI
98 {
99  return;
100 }
101 
107 };
108 
110  RTL_CONSTANT_LARGE_INTEGER((LONGLONG)0x4000), // .AllocationSize
111  RTL_CONSTANT_LARGE_INTEGER((LONGLONG)0x4000), // .FileSize
112  RTL_CONSTANT_LARGE_INTEGER((LONGLONG)0x4000) // .ValidDataLength
113 };
114 
115 static
116 PVOID
118  _In_ _Out_ PIRP Irp,
120 {
121  PMDL Mdl;
122 
123  if (Irp->MdlAddress == NULL)
124  {
125  Mdl = IoAllocateMdl(Irp->UserBuffer, BufferLength, FALSE, FALSE, Irp);
126  if (Mdl == NULL)
127  {
128  return NULL;
129  }
130 
131  _SEH2_TRY
132  {
133  MmProbeAndLockPages(Mdl, Irp->RequestorMode, IoWriteAccess);
134  }
136  {
137  IoFreeMdl(Mdl);
138  Irp->MdlAddress = NULL;
139  _SEH2_YIELD(return NULL);
140  }
141  _SEH2_END;
142  }
143 
145 }
146 
147 static
148 VOID
149 NTAPI
151 {
152  BOOLEAN Ret;
153  PULONG Buffer;
154  PVOID Bcb;
156  PTEST_CONTEXT TestContext;
157 
158  ok(TestFileObject != NULL, "Called in invalid context!\n");
160 
161  TestContext = Context;
162  ok(TestContext != NULL, "Called in invalid context!\n");
163  ok(TestContext->Bcb != NULL, "Called in invalid context!\n");
164  ok(TestContext->Buffer != NULL, "Called in invalid context!\n");
165  ok(TestContext->Length != 0, "Called in invalid context!\n");
166 
167  Ret = FALSE;
168  Offset.QuadPart = 0x1000;
169  KmtStartSeh();
170  Ret = CcMapData(TestFileObject, &Offset, TestContext->Length, MAP_WAIT, &Bcb, (PVOID *)&Buffer);
172 
173  if (!skip(Ret == TRUE, "CcMapData failed\n"))
174  {
175  ok_eq_pointer(Bcb, TestContext->Bcb);
176  ok_eq_pointer(Buffer, TestContext->Buffer);
177 
178  CcUnpinData(Bcb);
179  }
180 
181  KmtStartSeh();
182  Ret = CcPinRead(TestFileObject, &Offset, TestContext->Length, 0, &Bcb, (PVOID *)&Buffer);
184 
185  if (!skip(Ret == TRUE, "CcPinRead failed\n"))
186  {
187  ok(Bcb != TestContext->Bcb, "Returned same BCB!\n");
188  ok_eq_pointer(Buffer, TestContext->Buffer);
189 
190  CcUnpinData(Bcb);
191  }
192 
193  KmtStartSeh();
194  Ret = CcPinRead(TestFileObject, &Offset, TestContext->Length, PIN_IF_BCB, &Bcb, (PVOID *)&Buffer);
196  ok(Ret == FALSE, "CcPinRead succeed\n");
197 
198  if (Ret)
199  {
200  CcUnpinData(Bcb);
201  }
202 
203  KmtStartSeh();
204  Ret = CcPinRead(TestFileObject, &Offset, TestContext->Length, PIN_EXCLUSIVE, &Bcb, (PVOID *)&Buffer);
206 
207  if (!skip(Ret == TRUE, "CcPinRead failed\n"))
208  {
209  ok(Bcb != TestContext->Bcb, "Returned same BCB!\n");
210  ok_eq_pointer(Buffer, TestContext->Buffer);
211 
212  CcUnpinData(Bcb);
213  }
214 
215  Offset.QuadPart = 0x1500;
216  TestContext->Length -= 0x500;
217 
218  KmtStartSeh();
219  Ret = CcMapData(TestFileObject, &Offset, TestContext->Length, MAP_WAIT, &Bcb, (PVOID *)&Buffer);
221 
222  if (!skip(Ret == TRUE, "CcMapData failed\n"))
223  {
224  ok_eq_pointer(Bcb, TestContext->Bcb);
225  ok_eq_pointer(Buffer, (PVOID)((ULONG_PTR)TestContext->Buffer + 0x500));
226 
227  CcUnpinData(Bcb);
228  }
229 
230  return;
231 }
232 
233 static
234 VOID
236  ULONG TestId,
238 {
239  PVOID Bcb;
240  BOOLEAN Ret;
241  PULONG Buffer;
242  PTEST_FCB Fcb;
244 
247  ok_eq_ulong(TestTestId, -1);
248 
250  TestTestId = TestId;
252  if (!skip(TestFileObject != NULL, "Failed to allocate FO\n"))
253  {
255  if (!skip(Fcb != NULL, "ExAllocatePool failed\n"))
256  {
257  RtlZeroMemory(Fcb, sizeof(TEST_FCB));
258  ExInitializeFastMutex(&Fcb->HeaderMutex);
259  FsRtlSetupAdvancedHeader(&Fcb->Header, &Fcb->HeaderMutex);
260 
261  TestFileObject->FsContext = Fcb;
262  TestFileObject->SectionObjectPointer = &Fcb->SectionObjectPointers;
263 
264  KmtStartSeh();
267 
268  if (!skip(CcIsFileCached(TestFileObject) == TRUE, "CcInitializeCacheMap failed\n"))
269  {
270  if (TestId < 3)
271  {
272  Ret = FALSE;
273  Offset.QuadPart = TestId * 0x1000;
274  KmtStartSeh();
277 
278  if (!skip(Ret == TRUE, "CcMapData failed\n"))
279  {
280  ok_eq_ulong(Buffer[(0x3000 - TestId * 0x1000) / sizeof(ULONG)], 0xDEADBABE);
281 
282  CcUnpinData(Bcb);
283  }
284  }
285  else if (TestId == 3)
286  {
287  PTEST_CONTEXT TestContext;
288 
289  TestContext = ExAllocatePool(NonPagedPool, sizeof(TEST_CONTEXT));
290  if (!skip(TestContext != NULL, "ExAllocatePool failed\n"))
291  {
292  Ret = FALSE;
293  Offset.QuadPart = 0x1000;
294  KmtStartSeh();
295  Ret = CcMapData(TestFileObject, &Offset, FileSizes.FileSize.QuadPart - Offset.QuadPart, MAP_WAIT, &TestContext->Bcb, &TestContext->Buffer);
297 
298  if (!skip(Ret == TRUE, "CcMapData failed\n"))
299  {
300  PKTHREAD ThreadHandle;
301 
302 #ifdef _X86_
303  /* FIXME: Should be fixed, will fail under certains conditions */
304  ok(TestContext->Buffer > (PVOID)0xC1000000 && TestContext->Buffer < (PVOID)0xDCFFFFFF,
305  "Buffer %p not mapped in system space\n", TestContext->Buffer);
306 #else
307 #ifdef _M_AMD64
308  ok(TestContext->Buffer > (PVOID)0xFFFFF98000000000 && TestContext->Buffer < (PVOID)0xFFFFFA8000000000,
309  "Buffer %p not mapped in system space\n", TestContext->Buffer);
310 #else
311  skip(FALSE, "System space mapping not defined\n");
312 #endif
313 #endif
314 
315  TestContext->Length = FileSizes.FileSize.QuadPart - Offset.QuadPart;
316  ThreadHandle = KmtStartThread(MapInAnotherThread, TestContext);
317  KmtFinishThread(ThreadHandle, NULL);
318 
319  TestContext->Length = FileSizes.FileSize.QuadPart - 2 * Offset.QuadPart;
320  ThreadHandle = KmtStartThread(MapInAnotherThread, TestContext);
321  KmtFinishThread(ThreadHandle, NULL);
322 
323  CcUnpinData(TestContext->Bcb);
324  }
325 
326  ExFreePool(TestContext);
327  }
328  }
329  else if (TestId == 4)
330  {
331  /* Map after EOF */
332  Ret = FALSE;
333  Offset.QuadPart = FileSizes.FileSize.QuadPart + 0x1000;
334 
335  KmtStartSeh();
336  Ret = CcMapData(TestFileObject, &Offset, 0x1000, 0, &Bcb, (PVOID *)&Buffer);
338  ok(Ret == FALSE, "CcMapData succeed\n");
339 
340  if (Ret)
341  {
342  CcUnpinData(Bcb);
343  }
344 
345  /* Map a VACB after EOF */
346  Ret = FALSE;
348 
349  KmtStartSeh();
350  Ret = CcMapData(TestFileObject, &Offset, 0x1000, 0, &Bcb, (PVOID *)&Buffer);
352  ok(Ret == FALSE, "CcMapData succeed\n");
353 
354  if (Ret)
355  {
356  CcUnpinData(Bcb);
357  }
358 
359  /* Map more than a VACB */
360  Ret = FALSE;
361  Offset.QuadPart = 0x0;
362 
363  KmtStartSeh();
366  ok(Ret == FALSE, "CcMapData succeed\n");
367 
368  if (Ret)
369  {
370  CcUnpinData(Bcb);
371  }
372  }
373  }
374  }
375  }
376 }
377 
378 
379 static
380 VOID
382  ULONG TestId,
384 {
386  CACHE_UNINITIALIZE_EVENT CacheUninitEvent;
387 
389  ok_eq_ulong(TestTestId, TestId);
390 
391  if (!skip(TestFileObject != NULL, "No test FO\n"))
392  {
394  {
395  KeInitializeEvent(&CacheUninitEvent.Event, NotificationEvent, FALSE);
396  CcUninitializeCacheMap(TestFileObject, &Zero, &CacheUninitEvent);
397  KeWaitForSingleObject(&CacheUninitEvent.Event, Executive, KernelMode, FALSE, NULL);
398  }
399 
400  if (TestFileObject->FsContext != NULL)
401  {
402  ExFreePool(TestFileObject->FsContext);
403  TestFileObject->FsContext = NULL;
404  TestFileObject->SectionObjectPointer = NULL;
405  }
406 
408  }
409 
412  TestTestId = -1;
413 }
414 
415 
416 static
417 NTSTATUS
422  _In_ SIZE_T InLength,
423  _Inout_ PSIZE_T OutLength)
424 {
426 
428 
429  switch (ControlCode)
430  {
431  case IOCTL_START_TEST:
432  ok_eq_ulong((ULONG)InLength, sizeof(ULONG));
434  break;
435 
436  case IOCTL_FINISH_TEST:
437  ok_eq_ulong((ULONG)InLength, sizeof(ULONG));
439  break;
440 
441  default:
443  break;
444  }
445 
447 
448  return Status;
449 }
450 
451 static
452 NTSTATUS
455  _In_ PIRP Irp,
456  _In_ PIO_STACK_LOCATION IoStack)
457 {
459 
460  PAGED_CODE();
461 
462  DPRINT("IRP %x/%x\n", IoStack->MajorFunction, IoStack->MinorFunction);
463  ASSERT(IoStack->MajorFunction == IRP_MJ_READ);
464 
466 
468  Irp->IoStatus.Information = 0;
469 
470  if (IoStack->MajorFunction == IRP_MJ_READ)
471  {
472  PMDL Mdl;
473  ULONG Length;
474  PVOID Buffer;
476 
477  Offset = IoStack->Parameters.Read.ByteOffset;
478  Length = IoStack->Parameters.Read.Length;
479 
481  ok_eq_pointer(IoStack->FileObject, TestFileObject);
482 
483  ok(FlagOn(Irp->Flags, IRP_NOCACHE), "Not coming from Cc\n");
484 
485  ok_irql(APC_LEVEL);
486  ok((Offset.QuadPart % PAGE_SIZE == 0 || Offset.QuadPart == 0), "Offset is not aligned: %I64i\n", Offset.QuadPart);
487  ok(Length % PAGE_SIZE == 0, "Length is not aligned: %I64i\n", Length);
488 
489  ok(Irp->AssociatedIrp.SystemBuffer == NULL, "A SystemBuffer was allocated!\n");
491  ok(Buffer != NULL, "Null pointer!\n");
492  RtlFillMemory(Buffer, Length, 0xBA);
493 
495  if (Offset.QuadPart <= 0x3000 && Offset.QuadPart + Length > 0x3000)
496  {
497  *(PULONG)((ULONG_PTR)Buffer + (ULONG_PTR)(0x3000 - Offset.QuadPart)) = 0xDEADBABE;
498  }
499 
500  Mdl = Irp->MdlAddress;
501  ok(Mdl != NULL, "Null pointer for MDL!\n");
502  ok((Mdl->MdlFlags & MDL_PAGES_LOCKED) != 0, "MDL not locked\n");
503  ok((Mdl->MdlFlags & MDL_SOURCE_IS_NONPAGED_POOL) == 0, "MDL from non paged\n");
504  ok((Mdl->MdlFlags & MDL_IO_PAGE_READ) != 0, "Non paging IO\n");
505  ok((Irp->Flags & IRP_PAGING_IO) != 0, "Non paging IO\n");
506 
507  Irp->IoStatus.Information = Length;
508  }
509 
510  if (Status == STATUS_PENDING)
511  {
515  }
516  else
517  {
518  Irp->IoStatus.Status = Status;
520  }
521 
523 
524  return Status;
525 }
#define MDL_IO_PAGE_READ
Definition: mmtypes.h:24
NTSTATUS TestEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PCUNICODE_STRING RegistryPath, _Out_ PCWSTR *DeviceName, _Inout_ INT *Flags)
Definition: CcMapData_drv.c:37
#define ok_eq_ulong(value, expected)
static ULONG TestTestId
Definition: CcMapData_drv.c:30
const uint16_t * PCWSTR
Definition: typedefs.h:55
#define IN
Definition: typedefs.h:38
#define TRUE
Definition: types.h:120
PKTHREAD KmtStartThread(IN PKSTART_ROUTINE StartRoutine, IN PVOID StartContext OPTIONAL)
#define LL
Definition: tui.h:72
static VOID CleanupTest(ULONG TestId, PDEVICE_OBJECT DeviceObject)
#define FsRtlEnterFileSystem
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
Definition: fatprocs.h:402
#define FsRtlExitFileSystem
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
FSRTL_ADVANCED_FCB_HEADER Header
Definition: cdstruc.h:931
VOID NTAPI ReleaseFromLazyWrite(_In_ PVOID Context)
Definition: CcMapData_drv.c:79
struct _TEST_FCB TEST_FCB
_In_ PIRP Irp
Definition: csq.h:116
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
struct _TEST_CONTEXT TEST_CONTEXT
#define ok_eq_pointer(value, expected)
LONG NTSTATUS
Definition: precomp.h:26
#define KmtEndSeh(ExpectedStatus)
Definition: kmt_test.h:283
VOID NTAPI CcUnpinData(IN PVOID Bcb)
Definition: pinsup.c:955
#define IRP_NOCACHE
#define MAP_WAIT
VOID NTAPI ObDereferenceObject(IN PVOID Object)
Definition: obref.c:375
static CC_FILE_SIZES FileSizes
WCHAR DeviceName[]
Definition: adapter.cpp:21
#define MmGetSystemAddressForMdlSafe(_Mdl, _Priority)
NTSTATUS NTAPI KeWaitForSingleObject(IN PVOID Object, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL)
Definition: wait.c:416
int32_t INT
Definition: typedefs.h:56
#define PAGED_CODE()
Definition: video.h:57
#define _In_opt_
Definition: no_sal2.h:213
LARGE_INTEGER FileSize
Definition: cctypes.h:16
_SEH2_TRY
Definition: create.c:4250
uint32_t ULONG_PTR
Definition: typedefs.h:63
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define RTL_CONSTANT_LARGE_INTEGER(quad_part)
Definition: rtltypes.h:414
ULONG_PTR * PSIZE_T
Definition: typedefs.h:78
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
#define IOCTL_START_TEST
Definition: CcMapData_drv.c:13
_In_ ULONG BufferLength
Definition: usbdlib.h:225
static CACHE_MANAGER_CALLBACKS Callbacks
#define CcIsFileCached(FO)
#define ok(value,...)
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
#define _Out_
Definition: no_sal2.h:323
#define MDL_SOURCE_IS_NONPAGED_POOL
Definition: mmtypes.h:20
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
#define IoCompleteRequest
Definition: irp.c:1240
void DPRINT(...)
Definition: polytest.cpp:61
_IRQL_requires_same_ typedef _In_ ULONG ControlCode
Definition: wmitypes.h:55
Definition: bufpool.h:45
VOID TestUnload(_In_ PDRIVER_OBJECT DriverObject)
Definition: CcMapData_drv.c:62
PFILE_OBJECT NTAPI IoCreateStreamFileObject(IN PFILE_OBJECT FileObject, IN PDEVICE_OBJECT DeviceObject)
Definition: file.c:3186
NTSTATUS KmtRegisterIrpHandler(IN UCHAR MajorFunction, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_IRP_HANDLER IrpHandler)
static PDEVICE_OBJECT TestDeviceObject
Definition: CcMapData_drv.c:32
FAST_MUTEX
Definition: extypes.h:17
int64_t LONGLONG
Definition: typedefs.h:66
BOOLEAN NTAPI CcMapData(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *BcbResult, OUT PVOID *Buffer)
Definition: pinsup.c:694
NTSTATUS KmtRegisterMessageHandler(IN ULONG ControlCode OPTIONAL, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_MESSAGE_HANDLER MessageHandler)
static PVOID MapAndLockUserBuffer(_In_ _Out_ PIRP Irp, _In_ ULONG BufferLength)
#define _SEH2_YIELD(STMT_)
Definition: pseh2_64.h:8
struct _TEST_CONTEXT * PTEST_CONTEXT
#define MDL_PAGES_LOCKED
Definition: mmtypes.h:19
#define STATUS_PENDING
Definition: ntstatus.h:82
VOID NTAPI CcInitializeCacheMap(IN PFILE_OBJECT FileObject, IN PCC_FILE_SIZES FileSizes, IN BOOLEAN PinAccess, IN PCACHE_MANAGER_CALLBACKS Callbacks, IN PVOID LazyWriteContext)
Definition: fssup.c:193
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
Definition: exfuncs.h:274
SECTION_OBJECT_POINTERS SectionObjectPointers
#define _Inout_
Definition: no_sal2.h:244
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
* PFILE_OBJECT
Definition: iotypes.h:1954
static KMT_MESSAGE_HANDLER TestMessageHandler
Definition: CcMapData_drv.c:34
BOOLEAN NTAPI CcPinRead(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *Bcb, OUT PVOID *Buffer)
Definition: pinsup.c:802
VOID NTAPI IoFreeMdl(PMDL Mdl)
Definition: iomdl.c:146
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
static const WCHAR L[]
Definition: oid.c:1250
FSRTL_ADVANCED_FCB_HEADER Header
#define IOCTL_FINISH_TEST
Definition: CcMapData_drv.c:14
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
#define PAGE_SIZE
Definition: env_spec_w32.h:49
#define FlagOn(_F, _SF)
Definition: ext2fs.h:179
#define KmtStartSeh()
Definition: kmt_test.h:277
VOID KmtFinishThread(IN PKTHREAD Thread OPTIONAL, IN PKEVENT Event OPTIONAL)
struct _TEST_FCB * PTEST_FCB
Status
Definition: gdiplustypes.h:24
PMDL NTAPI IoAllocateMdl(IN PVOID VirtualAddress, IN ULONG Length, IN BOOLEAN SecondaryBuffer, IN BOOLEAN ChargeQuota, IN PIRP Irp)
Definition: iomdl.c:22
#define _In_
Definition: no_sal2.h:204
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
ULONG_PTR SIZE_T
Definition: typedefs.h:78
_SEH2_END
Definition: create.c:4424
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
VOID NTAPI MmProbeAndLockPages(IN PMDL Mdl, IN KPROCESSOR_MODE AccessMode, IN LOCK_OPERATION Operation)
Definition: mdlsup.c:935
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:228
#define PIN_IF_BCB
BOOLEAN NTAPI CcUninitializeCacheMap(IN PFILE_OBJECT FileObject, IN OPTIONAL PLARGE_INTEGER TruncateSize, IN OPTIONAL PCACHE_UNINITIALIZE_EVENT UninitializeEvent)
Definition: fssup.c:284
unsigned int * PULONG
Definition: retypes.h:1
static PFILE_OBJECT TestFileObject
Definition: CcMapData_drv.c:31
#define PIN_EXCLUSIVE
#define IRP_PAGING_IO
IN PVCB IN VBO IN ULONG OUT PBCB OUT PVOID IN BOOLEAN IN BOOLEAN Zero
Definition: fatprocs.h:402
#define IRP_MJ_READ
Definition: rdpdr.c:46
#define skip(...)
BOOLEAN NTAPI AcquireForReadAhead(_In_ PVOID Context, _In_ BOOLEAN Wait)
Definition: CcMapData_drv.c:87
FAST_MUTEX HeaderMutex
#define VACB_MAPPING_GRANULARITY
BOOLEAN NTAPI AcquireForLazyWrite(_In_ PVOID Context, _In_ BOOLEAN Wait)
Definition: CcMapData_drv.c:70
struct tagContext Context
Definition: acpixf.h:1012
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:409
unsigned int ULONG
Definition: retypes.h:1
#define IO_NO_INCREMENT
Definition: iotypes.h:565
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
#define ULONG_PTR
Definition: config.h:101
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:27
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
static KMT_IRP_HANDLER TestIrpHandler
Definition: CcMapData_drv.c:33
_In_ PFCB Fcb
Definition: cdprocs.h:151
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
return STATUS_SUCCESS
Definition: btrfs.c:2745
IoMarkIrpPending(Irp)
#define RtlFillMemory(Dest, Length, Fill)
Definition: winternl.h:593
#define APC_LEVEL
Definition: env_spec_w32.h:695
SECTION_OBJECT_POINTERS SectionObjectPointers
Definition: ntfs.h:502
VOID NTAPI ReleaseFromReadAhead(_In_ PVOID Context)
Definition: CcMapData_drv.c:96
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
static VOID PerformTest(ULONG TestId, PDEVICE_OBJECT DeviceObject)
static VOID NTAPI MapInAnotherThread(IN PVOID Context)
LONGLONG QuadPart
Definition: typedefs.h:112
IN BOOLEAN Wait
Definition: fatprocs.h:1529