ZwWriteFile and buffer alloc

Hi there,

I’m writing WFP callout driver (kmdf) and i’m wondering what is the proper way of buffer allocation for ZwWriteFile function? I need this function for logging stuff.

tnx in advance

Any kind of allocation should work fine (like ExAllocatePoolWithTag from PagedPool), just make sure to only call ZwWriteFile at PASSIVE_LEVEL as per the documentation.