提交 a549b86d 编写于 作者: C Chuck Ebbert 提交者: Andi Kleen

[PATCH] i386: annotate FIX_STACK() and the rest of nmi()

In i386's entry.S, FIX_STACK() needs annotation because it
replaces the stack pointer.  And the rest of nmi() needs
annotation in order to compile with these new annotations.
Signed-off-by: NChuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: NAndi Kleen <ak@suse.de>
上级 1164c999
...@@ -701,9 +701,15 @@ device_not_available_emulate: ...@@ -701,9 +701,15 @@ device_not_available_emulate:
jne ok; \ jne ok; \
label: \ label: \
movl TSS_sysenter_esp0+offset(%esp),%esp; \ movl TSS_sysenter_esp0+offset(%esp),%esp; \
CFI_DEF_CFA esp, 0; \
CFI_UNDEFINED eip; \
pushfl; \ pushfl; \
CFI_ADJUST_CFA_OFFSET 4; \
pushl $__KERNEL_CS; \ pushl $__KERNEL_CS; \
pushl $sysenter_past_esp CFI_ADJUST_CFA_OFFSET 4; \
pushl $sysenter_past_esp; \
CFI_ADJUST_CFA_OFFSET 4; \
CFI_REL_OFFSET eip, 0
KPROBE_ENTRY(debug) KPROBE_ENTRY(debug)
RING0_INT_FRAME RING0_INT_FRAME
...@@ -754,6 +760,7 @@ KPROBE_ENTRY(nmi) ...@@ -754,6 +760,7 @@ KPROBE_ENTRY(nmi)
cmpl $sysenter_entry,12(%esp) cmpl $sysenter_entry,12(%esp)
je nmi_debug_stack_check je nmi_debug_stack_check
nmi_stack_correct: nmi_stack_correct:
/* We have a RING0_INT_FRAME here */
pushl %eax pushl %eax
CFI_ADJUST_CFA_OFFSET 4 CFI_ADJUST_CFA_OFFSET 4
SAVE_ALL SAVE_ALL
...@@ -764,9 +771,12 @@ nmi_stack_correct: ...@@ -764,9 +771,12 @@ nmi_stack_correct:
CFI_ENDPROC CFI_ENDPROC
nmi_stack_fixup: nmi_stack_fixup:
RING0_INT_FRAME
FIX_STACK(12,nmi_stack_correct, 1) FIX_STACK(12,nmi_stack_correct, 1)
jmp nmi_stack_correct jmp nmi_stack_correct
nmi_debug_stack_check: nmi_debug_stack_check:
/* We have a RING0_INT_FRAME here */
cmpw $__KERNEL_CS,16(%esp) cmpw $__KERNEL_CS,16(%esp)
jne nmi_stack_correct jne nmi_stack_correct
cmpl $debug,(%esp) cmpl $debug,(%esp)
...@@ -777,8 +787,10 @@ nmi_debug_stack_check: ...@@ -777,8 +787,10 @@ nmi_debug_stack_check:
jmp nmi_stack_correct jmp nmi_stack_correct
nmi_16bit_stack: nmi_16bit_stack:
RING0_INT_FRAME /* We have a RING0_INT_FRAME here.
/* create the pointer to lss back */ *
* create the pointer to lss back
*/
pushl %ss pushl %ss
CFI_ADJUST_CFA_OFFSET 4 CFI_ADJUST_CFA_OFFSET 4
pushl %esp pushl %esp
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#define CFI_RESTORE .cfi_restore #define CFI_RESTORE .cfi_restore
#define CFI_REMEMBER_STATE .cfi_remember_state #define CFI_REMEMBER_STATE .cfi_remember_state
#define CFI_RESTORE_STATE .cfi_restore_state #define CFI_RESTORE_STATE .cfi_restore_state
#define CFI_UNDEFINED .cfi_undefined
#else #else
...@@ -46,6 +47,7 @@ ...@@ -46,6 +47,7 @@
#define CFI_RESTORE ignore #define CFI_RESTORE ignore
#define CFI_REMEMBER_STATE ignore #define CFI_REMEMBER_STATE ignore
#define CFI_RESTORE_STATE ignore #define CFI_RESTORE_STATE ignore
#define CFI_UNDEFINED ignore
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册