reactos/ntoskrnl
diff -u -r1.3 -r1.4
--- ntoskrnl.mc 1 Aug 2004 21:57:35 -0000 1.3
+++ ntoskrnl.mc 5 Oct 2004 19:11:16 -0000 1.4
@@ -1029,4 +1029,12 @@
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
\ No newline at end of file
reactos/ntoskrnl/ke/i386
diff -u -r1.91 -r1.92
--- exp.c 26 Aug 2004 16:04:50 -0000 1.91
+++ exp.c 5 Oct 2004 19:11:17 -0000 1.92
@@ -65,6 +65,8 @@
extern ULONG init_stack;
extern ULONG init_stack_top;
+extern BOOLEAN Ke386NoExecute;
+
static char *ExceptionTypeStrings[] =
{
"Divide Error",
@@ -572,6 +574,10 @@
*/
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();