mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 19:11:55 +00:00
[NTOS:KE/MM] Some bug-fixes in the bugcheck code.
- Introduce the MmMakeKernelResourceSectionWritable() helper for
making the kernel resource memory section writable, and use it
in KeGetBugMessageText(). Indeed, this latter function patches
in place the bugcheck resource message to trim any trailing
newlines before displaying the message on screen.
See also 83bad53/dm/introspection-win7.c (L286)
that mentions it too.
This fixes bugcheck text display (e.g. the MANUALLY_INITIATED_CRASH one)
when using (at least) MSVC-built ReactOS, avoiding a Page-Fault
exception during the bugcheck.
- Cover KeGetBugMessageText() in SEH since we are accessing kernel
resources that could also be corrupted in bugcheck scenarii, and we
don't want to further bugcheck.
- Fix newline trimming loop.
- KiDoBugCheckCallbacks():
* Wrap the bugcheck CallbackRoutine call in SEH.
* Add a FIXME concerning the need of further memory validation of CurrentRecord.
- Add a FIXME concerning the need to run the bugcheck-reason callbacks
with the KbCallbackReserved1 reason, in KeBugCheckWithTf().
Mentioned in http://blog.ptsecurity.com/2012/06/customizing-blue-screen-of-death.html
This commit is contained in:
parent
35f800c6e2
commit
f694d12f0c
3 changed files with 108 additions and 26 deletions
|
@ -794,7 +794,7 @@ NTAPI
|
|||
MmDeleteKernelStack(PVOID Stack,
|
||||
BOOLEAN GuiStack);
|
||||
|
||||
/* balace.c ******************************************************************/
|
||||
/* balance.c *****************************************************************/
|
||||
|
||||
INIT_FUNCTION
|
||||
VOID
|
||||
|
@ -1370,6 +1370,10 @@ MiInitializeLoadedModuleList(
|
|||
IN PLOADER_PARAMETER_BLOCK LoaderBlock
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
MmMakeKernelResourceSectionWritable(VOID);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
MmLoadSystemImage(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue