[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] x86/elf: Remove ASM_CALL_CONSTRAINT from elf_core_save_regs()
On 25.03.2025 19:00, Andrew Cooper wrote: > I was mistaken about when ASM_CALL_CONSTRAINT is applicable. It is not > applicable for plain pushes/pops, so remove it from the flags logic. > > Clarify the description of ASM_CALL_CONSTRAINT to be explicit about unwinding > using framepointers. > > Fixes: 0754534b8a38 ("x86/elf: Improve code generation in > elf_core_save_regs()") > Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > --- > CC: Jan Beulich <JBeulich@xxxxxxxx> > CC: Roger Pau Monné <roger.pau@xxxxxxxxxx> > --- > xen/arch/x86/include/asm/asm_defns.h | 5 +++-- > xen/arch/x86/include/asm/x86_64/elf.h | 2 +- > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/xen/arch/x86/include/asm/asm_defns.h > b/xen/arch/x86/include/asm/asm_defns.h > index 92b4116a1564..689d1dcbf754 100644 > --- a/xen/arch/x86/include/asm/asm_defns.h > +++ b/xen/arch/x86/include/asm/asm_defns.h > @@ -28,8 +28,9 @@ asm ( "\t.equ CONFIG_INDIRECT_THUNK, " > > /* > * This output constraint should be used for any inline asm which has a > "call" > - * instruction. Otherwise the asm may be inserted before the frame pointer > - * gets set up by the containing function. > + * instruction, which forces the stack frame to be set up prior to the asm > + * block. This matters when unwinding using framepointers, where the asm's > + * function can get skipped over. Does "forces the stack frame to be set up" really mean the stack frame, or the frame pointer (if one is in use)? In the latter case I can see how the asm() being moved ahead of that point could cause problems. In the former case I apparently still don't understand (yet) what the issue is that ASM_CALL_CONSTRAINT ultimately is to help with. Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |