Validating Private Data Sent from User Mode to Kernel Mode
A display miniport driver must validate all private data sent from the user-mode display driver to prevent the miniport driver from crashing, not responding (hanging), asserting, or corrupting memory if the private data is invalid. However, because the operating system resets hardware that "hangs," the display miniport driver can send instructions to the graphics processing unit (GPU) that cause the GPU to "hang." Private data can include any of the following items:
- Data sent to the following miniport driver functions:
- The DxgkDdiCreateAllocation function in the pPrivateDriverData buffer members of the DXGKARG_CREATEALLOCATION and DXGK_ALLOCATIONINFO structures.
- The DxgkDdiEscape function in the pPrivateDriverData buffer member of the DXGKARG_ESCAPE structure.
- The DxgkDdiAcquireSwizzlingRange function in the PrivateDriverData 32-bit member of the DXGKARG_ACQUIRESWIZZLINGRANGE structure.
- The DxgkDdiReleaseSwizzlingRange function in the PrivateDriverData 32-bit member of the DXGKARG_RELEASESWIZZLINGRANGE structure.
- The DxgkDdiQueryAdapterInfo function in the pInputData buffer member of the DXGKARG_QUERYADAPTERINFO structure when the DXGKQAITYPE_UMDRIVERPRIVATE value is specified in the Type member.