[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-4.19] x86/entry: don't clear DF when raising #UD for lack of syscall handler



On Mon, 2024-07-01 at 16:35 +0100, Andrew Cooper wrote:
> On 06/03/2024 1:44 pm, Jan Beulich wrote:
> > --- a/xen/arch/x86/x86_64/entry.S
> > +++ b/xen/arch/x86/x86_64/entry.S
> > @@ -47,12 +55,13 @@ UNLIKELY_START(z, syscall_no_callback) /
> >          testb $4, X86_EXC_UD * TRAPINFO_sizeof +
> > TRAPINFO_flags(%rdi)
> >          setnz %cl
> >          lea   TBF_EXCEPTION(, %rcx, TBF_INTERRUPT), %ecx
> > +        or    $~0, %esi                 # don't clear DF
> 
> Our predominant comment style is /* */
> 
> >  UNLIKELY_END(syscall_no_callback)
> >  
> >          movq  %rax,TRAPBOUNCE_eip(%rdx)
> >          movb  %cl,TRAPBOUNCE_flags(%rdx)
> >          call  create_bounce_frame
> > -        andl  $~X86_EFLAGS_DF,UREGS_eflags(%rsp)
> > +        and   %esi, UREGS_eflags(%rsp)
> 
> Could we gain a /* Conditionally clear DF */ comment here?
> 
> Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> 
> CC Oleksii for 4.19.  This fixes a subtle regression in the PV ABI
> caused by a post-XSA fix a few years ago.
> 
> It's a low-risk fix to take; while I still don't have an XTF test
> covering this, the corner case it's changing used to be completely
> fatal
> to guests, so it's a corner unused in practice.
> 
Release-Acked-By: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>

~ Oleksii




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.