Like in topic I would like to know how to "turn on" ETW or WPP for particular windows driver. Lets for an example take a vdrvroot.sys. When we disassemble this driver we see at the beginning of DriverEntry couple function calls:
McGenEventRegister();
WppLoadTracingSupport()
WppInitKm()
which turns on tracing functionality. For ETW in McGenEventRegister I see the following provider registration:
result = EtwRegister(
&VDRVROOT_PROVIDER_ID,
McGenControlCallbackV2,
&VDRVROOT_PROVIDER_ID_Context,
&Microsoft_Windows_VDRVROOTHandle);
where VDRVROOT_PROVIDER_ID equals 900448e4-b685-dd11-ad8b-0800200c9a66. I tried to log eventual logs doing:
tracelog.exe -start MyTrace -guid #900448e4-b685-dd11-ad8b-0800200c9a66
(...) //some actions here
tracelog.exe -start MyTrace
and view the log file via TraceView. Nothing caught but in this driver EtwWrite is called only in one place which I probably did not trigger with my actions. Question is whether I can turn on mentioned tracing mechanisms without reversing driver ;) ?