i386: annotate the rest of entry.s::nmi
In-Reply-To: <[email protected]>
Quoted 8 lines · Jan Beulich
I understand now, but am still uncertain
about the need to annotateFIX_STACK()- especially since you use .cfi_undefined, meaning the return point cannot be established anyway. If at all I'd annotate the initial pushes with either just the normalCFI_ADJUST_CFA_OFFSET, and the final one with one setting back the CFA base to the now adjusted frame. That way, until the pushes are complete the old frame will be used for determining the call origin, and once complete the (full) new state will be used.
But that's the whole point of the new annotations -- we have just overwritten %esp with a new value and the old assumptions are completely broken:
movl TSS_sysenter_esp0+offset(%esp),%esp; \
After this the old frame cannot be located by using %esp as a base and the new frame is incomplete. So the only choice is to make eip undefined until the new value is available -- if not then the unwinder will try to use whatever random values are on the new frame. Either that or I'm still unclear on how unwind works...
Signature · 1 line
Chuck
Quoted 3 lines
Quoted 3 lines
I understand now, but am still uncertain
about the need to annotateFIX_STACK()- especially since you use .cfi_undefined, meaning the return point cannot be established
anyway.
Quoted 1 line
Quoted 1 line
If at all I'd annotate the initial pushes with either just the
normal
Quoted 3 lines
Quoted 3 lines
CFI_ADJUST_CFA_OFFSET, and the final one with one setting back the CFA base to the now adjusted frame. That way, until the pushes are complete the old frame will be used for determining the call
origin,
Quoted 6 lines
Quoted 1 line
and once complete the (full) new state will be used.
But that's the whole point of the new annotations -- we have just overwritten %esp with a new value and the old assumptions are completely broken:
Quoted 7 lines
movl TSS_sysenter_esp0+offset(%esp),%esp; \After this the old frame cannot be located by using %esp as a base and the new frame is incomplete. So the only choice is to make eip undefined until the new value is available -- if not then the unwinder will try to use whatever random values are on the new frame. Either that or I'm still unclear on how unwind works...
Hmm, yes, on a second look I agree.
Jan