Permalink
Browse files

Added patch to fix privileged instruction exception code on x86_64.

  • Loading branch information...
slackner committed Sep 7, 2017
1 parent 467fed6 commit f1b1baf057bd8bf7f22bfdf3f6d982effaeab42a
@@ -0,0 +1,25 @@
From 5c62e8187c7af1dbf7ad25e521f1a53e84f1c6d3 Mon Sep 17 00:00:00 2001
From: Andrew Wesie <awesie@gmail.com>
Date: Sun, 13 Nov 2016 12:35:04 -0600
Subject: ntdll: Fix privileged instruction exception code.
Signed-off-by: Andrew Wesie <awesie@gmail.com>
---
dlls/ntdll/signal_x86_64.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index 1c5ab158a3a..f434775df00 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -2790,7 +2790,6 @@ static void segv_handler( int signal, siginfo_t *siginfo, void *sigcontext )
WORD err = ERROR_sig(ucontext);
if ((err & 7) == 2 && handle_interrupt( err >> 3, rec, win_context )) break;
rec->ExceptionCode = err ? EXCEPTION_ACCESS_VIOLATION : EXCEPTION_PRIV_INSTRUCTION;
- rec->ExceptionCode = EXCEPTION_ACCESS_VIOLATION;
}
break;
case TRAP_x86_PAGEFLT: /* Page fault */
--
2.14.1
@@ -299,6 +299,7 @@ patch_enable_all ()
enable_ntdll_Zero_mod_name="$1"
enable_ntdll__aulldvrm="$1"
enable_ntdll_call_thread_func_wrapper="$1"
enable_ntdll_segv_handler="$1"
enable_ntdll_set_full_cpu_context="$1"
enable_ntdll_x86_64_ExceptionInformation="$1"
enable_ntoskrnl_DriverTest="$1"
@@ -1176,6 +1177,9 @@ patch_enable ()
ntdll-call_thread_func_wrapper)
enable_ntdll_call_thread_func_wrapper="$2"
;;
ntdll-segv_handler)
enable_ntdll_segv_handler="$2"
;;
ntdll-set_full_cpu_context)
enable_ntdll_set_full_cpu_context="$2"
;;
@@ -7065,6 +7069,18 @@ if test "$enable_ntdll_call_thread_func_wrapper" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-segv_handler
# |
# | Modified files:
# | * dlls/ntdll/signal_x86_64.c
# |
if test "$enable_ntdll_segv_handler" -eq 1; then
patch_apply ntdll-segv_handler/0001-ntdll-Fix-privileged-instruction-exception-code.patch
(
printf '%s\n' '+ { "Andrew Wesie", "ntdll: Fix privileged instruction exception code.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-set_full_cpu_context
# |
# | Modified files:

0 comments on commit f1b1baf

Please sign in to comment.