On 19/03/2025 9:05 am, Roger Pau Monné wrote:
> On Tue, Mar 18, 2025 at 08:10:33PM +0000, Andrew Cooper wrote:
>> The LRET is detached from the PUSHes which set it up, and this is about to 
>> get
>> worse with the changes to trampoline relocation.  For the sake of one 
>> variable
>> read, the complexity is not worth it.
>>
>> Reorder the logic to copy the trampoline into place, then switch stack and
>> enter the trampoline.
>>
>> No functional change.
>>
>> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
> Reviewed-by: Roger Pau Monné <roger....@citrix.com>
>
>> ---
>> CC: Jan Beulich <jbeul...@suse.com>
>> CC: Roger Pau Monné <roger....@citrix.com>
>>
>> Roger: I'd like this to be a prerequisite to your "[PATCH 4/7] x86/boot: 
>> apply
>> trampoline relocations at destination position" to avoid the movement of
>> reloc_trampoline32() making things worse.
> I think you could commit this now-ish, and I can rebase on top?

CI said no, and the bug is hiding in plain sight.  The setup for the rep
movs:

    lea     sym_esi(trampoline_start), %esi
    mov     sym_esi(trampoline_phys), %edi

is buggy.  I'll try and find a nicer way to do this.

~Andrew

Reply via email to