Commit ee4eb87b authored by Jan Beulich's avatar Jan Beulich Committed by H. Peter Anvin

x86-64: Fix ordering of CFI directives and recent ASM_CLAC additions

While these got added in the right place everywhere else, entry_64.S
is the odd one where they ended up before the initial CFI directive(s).
In order to cover the full code ranges, the CFI directive must be
first, though.
Signed-off-by: default avatarJan Beulich <jbeulich@suse.com>
Link: http://lkml.kernel.org/r/5093BA1F02000078000A600E@nat28.tlf.novell.comSigned-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent 36c46ca4
...@@ -995,8 +995,8 @@ END(interrupt) ...@@ -995,8 +995,8 @@ END(interrupt)
*/ */
.p2align CONFIG_X86_L1_CACHE_SHIFT .p2align CONFIG_X86_L1_CACHE_SHIFT
common_interrupt: common_interrupt:
ASM_CLAC
XCPT_FRAME XCPT_FRAME
ASM_CLAC
addq $-0x80,(%rsp) /* Adjust vector to [-256,-1] range */ addq $-0x80,(%rsp) /* Adjust vector to [-256,-1] range */
interrupt do_IRQ interrupt do_IRQ
/* 0(%rsp): old_rsp-ARGOFFSET */ /* 0(%rsp): old_rsp-ARGOFFSET */
...@@ -1135,8 +1135,8 @@ END(common_interrupt) ...@@ -1135,8 +1135,8 @@ END(common_interrupt)
*/ */
.macro apicinterrupt num sym do_sym .macro apicinterrupt num sym do_sym
ENTRY(\sym) ENTRY(\sym)
ASM_CLAC
INTR_FRAME INTR_FRAME
ASM_CLAC
pushq_cfi $~(\num) pushq_cfi $~(\num)
.Lcommon_\sym: .Lcommon_\sym:
interrupt \do_sym interrupt \do_sym
...@@ -1190,8 +1190,8 @@ apicinterrupt IRQ_WORK_VECTOR \ ...@@ -1190,8 +1190,8 @@ apicinterrupt IRQ_WORK_VECTOR \
*/ */
.macro zeroentry sym do_sym .macro zeroentry sym do_sym
ENTRY(\sym) ENTRY(\sym)
ASM_CLAC
INTR_FRAME INTR_FRAME
ASM_CLAC
PARAVIRT_ADJUST_EXCEPTION_FRAME PARAVIRT_ADJUST_EXCEPTION_FRAME
pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */ pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */
subq $ORIG_RAX-R15, %rsp subq $ORIG_RAX-R15, %rsp
...@@ -1208,8 +1208,8 @@ END(\sym) ...@@ -1208,8 +1208,8 @@ END(\sym)
.macro paranoidzeroentry sym do_sym .macro paranoidzeroentry sym do_sym
ENTRY(\sym) ENTRY(\sym)
ASM_CLAC
INTR_FRAME INTR_FRAME
ASM_CLAC
PARAVIRT_ADJUST_EXCEPTION_FRAME PARAVIRT_ADJUST_EXCEPTION_FRAME
pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */ pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */
subq $ORIG_RAX-R15, %rsp subq $ORIG_RAX-R15, %rsp
...@@ -1227,8 +1227,8 @@ END(\sym) ...@@ -1227,8 +1227,8 @@ END(\sym)
#define INIT_TSS_IST(x) PER_CPU_VAR(init_tss) + (TSS_ist + ((x) - 1) * 8) #define INIT_TSS_IST(x) PER_CPU_VAR(init_tss) + (TSS_ist + ((x) - 1) * 8)
.macro paranoidzeroentry_ist sym do_sym ist .macro paranoidzeroentry_ist sym do_sym ist
ENTRY(\sym) ENTRY(\sym)
ASM_CLAC
INTR_FRAME INTR_FRAME
ASM_CLAC
PARAVIRT_ADJUST_EXCEPTION_FRAME PARAVIRT_ADJUST_EXCEPTION_FRAME
pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */ pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */
subq $ORIG_RAX-R15, %rsp subq $ORIG_RAX-R15, %rsp
...@@ -1247,8 +1247,8 @@ END(\sym) ...@@ -1247,8 +1247,8 @@ END(\sym)
.macro errorentry sym do_sym .macro errorentry sym do_sym
ENTRY(\sym) ENTRY(\sym)
ASM_CLAC
XCPT_FRAME XCPT_FRAME
ASM_CLAC
PARAVIRT_ADJUST_EXCEPTION_FRAME PARAVIRT_ADJUST_EXCEPTION_FRAME
subq $ORIG_RAX-R15, %rsp subq $ORIG_RAX-R15, %rsp
CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
...@@ -1266,8 +1266,8 @@ END(\sym) ...@@ -1266,8 +1266,8 @@ END(\sym)
/* error code is on the stack already */ /* error code is on the stack already */
.macro paranoiderrorentry sym do_sym .macro paranoiderrorentry sym do_sym
ENTRY(\sym) ENTRY(\sym)
ASM_CLAC
XCPT_FRAME XCPT_FRAME
ASM_CLAC
PARAVIRT_ADJUST_EXCEPTION_FRAME PARAVIRT_ADJUST_EXCEPTION_FRAME
subq $ORIG_RAX-R15, %rsp subq $ORIG_RAX-R15, %rsp
CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment