Author: tfaber Date: Sat Oct 11 23:07:04 2014 New Revision: 64685
URL: http://svn.reactos.org/svn/reactos?rev=64685&view=rev Log: [NTOS:KE] - Make fastfail exception noncontinuable CORE-8419
Modified: trunk/reactos/ntoskrnl/include/internal/i386/ke.h trunk/reactos/ntoskrnl/ke/i386/exp.c trunk/reactos/ntoskrnl/ke/i386/traphdlr.c
Modified: trunk/reactos/ntoskrnl/include/internal/i386/ke.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/i... ============================================================================== --- trunk/reactos/ntoskrnl/include/internal/i386/ke.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/i386/ke.h [iso-8859-1] Sat Oct 11 23:07:04 2014 @@ -504,6 +504,7 @@ NTAPI KiDispatchExceptionFromTrapFrame( IN NTSTATUS Code, + IN ULONG Flags, IN ULONG_PTR Address, IN ULONG ParameterCount, IN ULONG_PTR Parameter1, @@ -623,7 +624,7 @@ IN PKTRAP_FRAME TrapFrame) { /* Helper for exceptions with no arguments */ - KiDispatchExceptionFromTrapFrame(Code, Address, 0, 0, 0, 0, TrapFrame); + KiDispatchExceptionFromTrapFrame(Code, 0, Address, 0, 0, 0, 0, TrapFrame); }
// @@ -638,7 +639,7 @@ IN PKTRAP_FRAME TrapFrame) { /* Helper for exceptions with no arguments */ - KiDispatchExceptionFromTrapFrame(Code, Address, 1, P1, 0, 0, TrapFrame); + KiDispatchExceptionFromTrapFrame(Code, 0, Address, 1, P1, 0, 0, TrapFrame); }
// @@ -654,7 +655,7 @@ IN PKTRAP_FRAME TrapFrame) { /* Helper for exceptions with no arguments */ - KiDispatchExceptionFromTrapFrame(Code, Address, 2, P1, P2, 0, TrapFrame); + KiDispatchExceptionFromTrapFrame(Code, 0, Address, 2, P1, P2, 0, TrapFrame); }
//
Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/exp.c?rev=... ============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/exp.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/exp.c [iso-8859-1] Sat Oct 11 23:07:04 2014 @@ -1097,6 +1097,7 @@ VOID NTAPI KiDispatchExceptionFromTrapFrame(IN NTSTATUS Code, + IN ULONG Flags, IN ULONG_PTR Address, IN ULONG ParameterCount, IN ULONG_PTR Parameter1, @@ -1108,7 +1109,7 @@
/* Build the exception record */ ExceptionRecord.ExceptionCode = Code; - ExceptionRecord.ExceptionFlags = 0; + ExceptionRecord.ExceptionFlags = Flags; ExceptionRecord.ExceptionRecord = NULL; ExceptionRecord.ExceptionAddress = (PVOID)Address; ExceptionRecord.NumberParameters = ParameterCount;
Modified: trunk/reactos/ntoskrnl/ke/i386/traphdlr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/traphdlr.c... ============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] Sat Oct 11 23:07:04 2014 @@ -223,6 +223,7 @@
/* Dispatch the exception */ KiDispatchExceptionFromTrapFrame(STATUS_BREAKPOINT, + 0, TrapFrame->Eip - 1, 3, Parameter1, @@ -1311,6 +1312,7 @@
/* Only other choice is an in-page error, with 3 parameters */ KiDispatchExceptionFromTrapFrame(STATUS_IN_PAGE_ERROR, + 0, TrapFrame->Eip, 3, TrapFrame->ErrCode & 2 ? TRUE : FALSE, @@ -1474,10 +1476,14 @@ if (KiUserTrap(TrapFrame)) { /* Dispatch exception to user mode */ - KiDispatchException1Args(STATUS_STACK_BUFFER_OVERRUN, - TrapFrame->Eip, - TrapFrame->Ecx, - TrapFrame); + KiDispatchExceptionFromTrapFrame(STATUS_STACK_BUFFER_OVERRUN, + EXCEPTION_NONCONTINUABLE, + TrapFrame->Eip, + 1, + TrapFrame->Ecx, + 0, + 0, + TrapFrame); } else {