From abd682fae0aeb45ccdbd802790d8123f7c0a2fac Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 21 Jun 2019 17:47:31 -0700 Subject: [PATCH] kernel - Move trap_is_smap() test outside of DDB condition * The trap_is_smap() test, and generally the code handling improper user mode accesses from kernel mode, must be placed outside the DDB conditional. --- sys/platform/pc64/x86_64/trap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/platform/pc64/x86_64/trap.c b/sys/platform/pc64/x86_64/trap.c index 9fd31c1053..24a3a95b37 100644 --- a/sys/platform/pc64/x86_64/trap.c +++ b/sys/platform/pc64/x86_64/trap.c @@ -922,6 +922,7 @@ trap_pfault(struct trapframe *frame, int usermode) } } } +#endif if (td->td_gd->gd_intr_nesting_level || trap_is_smap(frame) || td->td_pcb == NULL || @@ -932,7 +933,6 @@ trap_pfault(struct trapframe *frame, int usermode) trap_fatal(frame, frame->tf_addr); return (-1); } -#endif } map = &vm->vm_map; } -- 2.11.4.GIT