- Bugcheck on a page fault, if the reason was code executing in a non executable area (only available on a AMD64).

svn path=/trunk/; revision=11204
This commit is contained in:
Hartmut Birr 2004-10-05 19:11:17 +00:00
parent fa64b48be5
commit fc5e4daca1
2 changed files with 14 additions and 0 deletions

View file

@ -65,6 +65,8 @@ extern VOID KiTrapUnknown(VOID);
extern ULONG init_stack;
extern ULONG init_stack_top;
extern BOOLEAN Ke386NoExecute;
static char *ExceptionTypeStrings[] =
{
"Divide Error",
@ -572,6 +574,10 @@ KiTrapHandler(PKTRAP_FRAME Tf, ULONG ExceptionNr)
*/
if (ExceptionNr == 14)
{
if (Ke386NoExecute && Tf->ErrorCode & 0x10 && cr2_ >= KERNEL_BASE)
{
KEBUGCHECKWITHTF(ATTEMPTED_EXECUTE_OF_NOEXECUTE_MEMORY, 0, 0, 0, 0, Tf);
}
if (Tf->Eflags & FLAG_IF)
{
Ke386EnableInterrupts();

View file

@ -1029,4 +1029,12 @@ Language=English
certain\n conditions. There is absolutely no warranty for ReactOS.\n
.
MessageId=0xFC
Severity=Success
Facility=System
SymbolicName=ATTEMPTED_EXECUTE_OF_NOEXECUTE_MEMORY
Language=English
ATTEMPTED_EXECUTE_OF_NOEXECUTE_MEMORY
.
; EOF