diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/segment.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/head_64.S | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/include/asm/segment.h b/arch/x86/include/asm/segment.h index 165466233ab0..58c1e6cd91b6 100644 --- a/arch/x86/include/asm/segment.h +++ b/arch/x86/include/asm/segment.h @@ -205,6 +205,8 @@ #define IDT_ENTRIES 256 #define NUM_EXCEPTION_VECTORS 32 +/* Bitmask of exception vectors which push an error code on the stack */ +#define EXCEPTION_ERRCODE_MASK 0x00027d00 #define GDT_SIZE (GDT_ENTRIES * 8) #define GDT_ENTRY_TLS_ENTRIES 3 #define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8) diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index 40f4eb3766d1..adf52e85d551 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S @@ -295,7 +295,7 @@ ENTRY(early_idt_handler) ja 0f movl $1,%eax salq %cl,%rax - testl $0x27d00,%eax + testl $EXCEPTION_ERRCODE_MASK,%eax je 0f popq %r8 # get error code 0: movq 0(%rsp),%rcx # get ip |