]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - arch/x86/kernel/traps.c
Merge branch 'WIP.x86-pti.entry-for-linus' of git://git.kernel.org/pub/scm/linux...
[mirror_ubuntu-bionic-kernel.git] / arch / x86 / kernel / traps.c
index 74136fd16f491f0443ef3be4e65604182bef32d1..e98f8b66a460b98b31d262cff23fa063be33ac5a 100644 (file)
@@ -42,7 +42,6 @@
 #include <linux/edac.h>
 #endif
 
-#include <asm/kmemcheck.h>
 #include <asm/stacktrace.h>
 #include <asm/processor.h>
 #include <asm/debugreg.h>
@@ -60,6 +59,7 @@
 #include <asm/trace/mpx.h>
 #include <asm/mpx.h>
 #include <asm/vm86.h>
+#include <asm/umip.h>
 
 #ifdef CONFIG_X86_64
 #include <asm/x86_init.h>
@@ -71,7 +71,7 @@
 #include <asm/proto.h>
 #endif
 
-DECLARE_BITMAP(used_vectors, NR_VECTORS);
+DECLARE_BITMAP(system_vectors, NR_VECTORS);
 
 static inline void cond_local_irq_enable(struct pt_regs *regs)
 {
@@ -536,6 +536,11 @@ do_general_protection(struct pt_regs *regs, long error_code)
        RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
        cond_local_irq_enable(regs);
 
+       if (static_cpu_has(X86_FEATURE_UMIP)) {
+               if (user_mode(regs) && fixup_umip_exception(regs))
+                       return;
+       }
+
        if (v8086_mode(regs)) {
                local_irq_enable();
                handle_vm86_fault((struct kernel_vm86_regs *) regs, error_code);
@@ -763,10 +768,6 @@ dotraplinkage void do_debug(struct pt_regs *regs, long error_code)
        if (!dr6 && user_mode(regs))
                user_icebp = 1;
 
-       /* Catch kmemcheck conditions! */
-       if ((dr6 & DR_STEP) && kmemcheck_trap(regs))
-               goto exit;
-
        /* Store the virtualized DR6 value */
        tsk->thread.debugreg6 = dr6;