i386: annotate the rest of entry.s::nmi
In-Reply-To: <[email protected]>
Quoted 8 lines · Jan Beulich
Quoted 3 lines
Part of the NMI handler is missing annotations. Just moving the
RING0_INT_FRAMEmacro fixes it. And additional comments should warn anyone changing this to recheck the annotations.I have to admit that I can't see the value of this movement; the code sequence in question was left un-annotated intentionally. The point is that the push-es in
FIX_STACK()aren't annotated, so things won't be correct at those points anyway.
I have a patch here that adds that, but it won't compile because that part of the NMI handler is un-annotated:
i386: annotate the FIX_STACK macro.
---
arch/i386/kernel/entry.S | 8 +++++++- include/asm-i386/dwarf2.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-)
arch/i386/kernel/entry.S +7 -1
@@ -698,9 +698,15 @@ device_not_available_emulate: jne ok; \ label: \ movl TSS_sysenter_esp0+offset(%esp),%esp; \ + CFI_DEF_CFA esp, 0; \ + CFI_UNDEFINED eip; \ pushfl; \ + CFI_ADJUST_CFA_OFFSET 4; \ 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) RING0_INT_FRAME
include/asm-i386/dwarf2.h +2 -0
@@ -28,6 +28,7 @@#define CFI_RESTORE .cfi_restore#define CFI_REMEMBER_STATE .cfi_remember_state#define CFI_RESTORE_STATE .cfi_restore_state +#define CFI_UNDEFINED .cfi_undefined#else
@@ -48,6 +49,7 @@#define CFI_RESTORE ignore#define CFI_REMEMBER_STATE ignore#define CFI_RESTORE_STATE ignore +#define CFI_UNDEFINED ignore#endif
Signature · 1 line
Chuck
Quoted 8 lines · Chuck Ebbert
In-Reply-To: <[email protected]>
Quoted 4 lines · Jan Beulich
Quoted 3 lines
Part of the NMI handler is missing annotations. Just moving the
RING0_INT_FRAMEmacro fixes it. And additional comments should warn anyone changing this to recheck the annotations.
Quoted 7 lines
Quoted 4 lines
I have to admit that I can't see the value of this movement; the code sequence in question was left un-annotated intentionally. The point is that the push-es in
FIX_STACK()aren't annotated, so things won't be correct at those points anyway.I have a patch here that adds that, but it won't compile because that part of the NMI handler is un-annotated:
Ok i dropped the original patch for now and you guys can work out a correct fix.
-Andi
Quoted 11 lines
Quoted 8 lines
Quoted 3 lines
Part of the NMI handler is missing annotations. Just moving the
RING0_INT_FRAMEmacro fixes it. And additional comments should warn anyone changing this to recheck the annotations.I have to admit that I can't see the value of this movement; the code sequence in question was left un-annotated intentionally. The point is that the push-es in
FIX_STACK()aren't annotated, so things won't be correct at those points anyway.I have a patch here that adds that, but it won't compile because that part of the NMI handler is un-annotated:
But you didn't clarify why you need this piece of code annotated...
Jan