traps.c (fba961ab29e5ffb055592442808bb0f7962e05da) | traps.c (ed1bbc40a0d10e0c5c74fe7bdc6298295cf40255) |
---|---|
1/* 2 * Copyright (C) 1991, 1992 Linus Torvalds 3 * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs 4 * 5 * Pentium III FXSR, SSE support 6 * Gareth Hughes <gareth@valinux.com>, May 2000 7 */ 8 --- 28 unchanged lines hidden (view full) --- 37#include <linux/mm.h> 38#include <linux/smp.h> 39#include <linux/io.h> 40 41#if defined(CONFIG_EDAC) 42#include <linux/edac.h> 43#endif 44 | 1/* 2 * Copyright (C) 1991, 1992 Linus Torvalds 3 * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs 4 * 5 * Pentium III FXSR, SSE support 6 * Gareth Hughes <gareth@valinux.com>, May 2000 7 */ 8 --- 28 unchanged lines hidden (view full) --- 37#include <linux/mm.h> 38#include <linux/smp.h> 39#include <linux/io.h> 40 41#if defined(CONFIG_EDAC) 42#include <linux/edac.h> 43#endif 44 |
45#include <asm/kmemcheck.h> |
|
45#include <asm/stacktrace.h> 46#include <asm/processor.h> 47#include <asm/debugreg.h> 48#include <linux/atomic.h> 49#include <asm/text-patching.h> 50#include <asm/ftrace.h> 51#include <asm/traps.h> 52#include <asm/desc.h> 53#include <asm/fpu/internal.h> | 46#include <asm/stacktrace.h> 47#include <asm/processor.h> 48#include <asm/debugreg.h> 49#include <linux/atomic.h> 50#include <asm/text-patching.h> 51#include <asm/ftrace.h> 52#include <asm/traps.h> 53#include <asm/desc.h> 54#include <asm/fpu/internal.h> |
55#include <asm/cpu_entry_area.h> |
|
54#include <asm/mce.h> 55#include <asm/fixmap.h> 56#include <asm/mach_traps.h> 57#include <asm/alternative.h> 58#include <asm/fpu/xstate.h> 59#include <asm/trace/mpx.h> 60#include <asm/mpx.h> 61#include <asm/vm86.h> | 56#include <asm/mce.h> 57#include <asm/fixmap.h> 58#include <asm/mach_traps.h> 59#include <asm/alternative.h> 60#include <asm/fpu/xstate.h> 61#include <asm/trace/mpx.h> 62#include <asm/mpx.h> 63#include <asm/vm86.h> |
62#include <asm/umip.h> | |
63 64#ifdef CONFIG_X86_64 65#include <asm/x86_init.h> 66#include <asm/pgalloc.h> 67#include <asm/proto.h> 68#else 69#include <asm/processor-flags.h> 70#include <asm/setup.h> 71#include <asm/proto.h> 72#endif 73 | 64 65#ifdef CONFIG_X86_64 66#include <asm/x86_init.h> 67#include <asm/pgalloc.h> 68#include <asm/proto.h> 69#else 70#include <asm/processor-flags.h> 71#include <asm/setup.h> 72#include <asm/proto.h> 73#endif 74 |
74DECLARE_BITMAP(system_vectors, NR_VECTORS); | 75DECLARE_BITMAP(used_vectors, NR_VECTORS); |
75 76static inline void cond_local_irq_enable(struct pt_regs *regs) 77{ 78 if (regs->flags & X86_EFLAGS_IF) 79 local_irq_enable(); 80} 81 82static inline void cond_local_irq_disable(struct pt_regs *regs) --- 448 unchanged lines hidden (view full) --- 531dotraplinkage void 532do_general_protection(struct pt_regs *regs, long error_code) 533{ 534 struct task_struct *tsk; 535 536 RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU"); 537 cond_local_irq_enable(regs); 538 | 76 77static inline void cond_local_irq_enable(struct pt_regs *regs) 78{ 79 if (regs->flags & X86_EFLAGS_IF) 80 local_irq_enable(); 81} 82 83static inline void cond_local_irq_disable(struct pt_regs *regs) --- 448 unchanged lines hidden (view full) --- 532dotraplinkage void 533do_general_protection(struct pt_regs *regs, long error_code) 534{ 535 struct task_struct *tsk; 536 537 RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU"); 538 cond_local_irq_enable(regs); 539 |
539 if (static_cpu_has(X86_FEATURE_UMIP)) { 540 if (user_mode(regs) && fixup_umip_exception(regs)) 541 return; 542 } 543 | |
544 if (v8086_mode(regs)) { 545 local_irq_enable(); 546 handle_vm86_fault((struct kernel_vm86_regs *) regs, error_code); 547 return; 548 } 549 550 tsk = current; 551 if (!user_mode(regs)) { --- 211 unchanged lines hidden (view full) --- 763 /* 764 * If dr6 has no reason to give us about the origin of this trap, 765 * then it's very likely the result of an icebp/int01 trap. 766 * User wants a sigtrap for that. 767 */ 768 if (!dr6 && user_mode(regs)) 769 user_icebp = 1; 770 | 540 if (v8086_mode(regs)) { 541 local_irq_enable(); 542 handle_vm86_fault((struct kernel_vm86_regs *) regs, error_code); 543 return; 544 } 545 546 tsk = current; 547 if (!user_mode(regs)) { --- 211 unchanged lines hidden (view full) --- 759 /* 760 * If dr6 has no reason to give us about the origin of this trap, 761 * then it's very likely the result of an icebp/int01 trap. 762 * User wants a sigtrap for that. 763 */ 764 if (!dr6 && user_mode(regs)) 765 user_icebp = 1; 766 |
767 /* Catch kmemcheck conditions! */ 768 if ((dr6 & DR_STEP) && kmemcheck_trap(regs)) 769 goto exit; 770 |
|
771 /* Store the virtualized DR6 value */ 772 tsk->thread.debugreg6 = dr6; 773 774#ifdef CONFIG_KPROBES 775 if (kprobe_debug_handler(regs)) 776 goto exit; 777#endif 778 --- 189 unchanged lines hidden --- | 771 /* Store the virtualized DR6 value */ 772 tsk->thread.debugreg6 = dr6; 773 774#ifdef CONFIG_KPROBES 775 if (kprobe_debug_handler(regs)) 776 goto exit; 777#endif 778 --- 189 unchanged lines hidden --- |