Hi, folks.
KeRegisterBugCheck() registers a callback routine, which
could use READ/WRITE_PORT functions to obtain
device status, and perform device clean-up operations
(by calling the READ/WRITE_REGISTER functions)
just before the system crashes with an unexpected Bug
Check.
However, the callback routine has limited functionality
(you cannot touch paged memory or do anything that
requires changing the IRQL; you cannot acquire Spin
Locks or synchronize with Adapter or Controller
Objects, etc.).
My question is fairly simple:
-Is it possible to use ZwWriteFile() to dump information
into a log file (kind of telling what went wrong with the
device)? I know it looks apelative and straightforward,
but it doesn’t seem very wise to me, as there are a lot of
nuisances to consider - namely:
a) The file system may be trashed and the o.s. does not
give you any guarantees of actually saving data to a
consistent file;
b) There’s no guarantee that the callback routine will be
ever called (it depends on what the device does to
the system; it could mess things so much, the system
becomes far to instable to do anything properly);
c) I’m not sure if it is *wise* to use ZwWriteFile() from
the callback routine…
Is there a better approach? What should I use to create
this log/dump file?..
Thank you all in advance,
Miguel Monteiro
xxxxx@criticalsoftware.com
www.criticalsoftware.com
«Humour and love are God’s answers
to Human weaknesses»
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com