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

Re: [PATCH v2 2/3] x86: relax LDT check in arch_set_info_guest()


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 19 May 2020 11:18:10 +0200
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Tue, 19 May 2020 09:18:24 +0000
  • Ironport-sdr: XYMfoYkHSsyFUFz//mHjRBhbbNozQp3u4Beu/gYByizNcYler69FW1HgM44fTVpAnsWN/jCHJ0 akr1A4oQVAl8PCuuLtwm1iKnc1ATt3IwlYdo5yD3xILdSmcN6QT9St7VKHqKbq67T+2hoJV3sA DoDwvh+mADCX/h9ISHSjHqHYbogB/42nTQFSa1y3pSK+bJMnd+DMtM3PiGB2B/HeScwYSirhLc LyqxBRiXi3QsFvfQH76PQIomyGndYX/JeZELDuTN8GEHBBLwPy0urEDOKTV1Cnnm37gUOHWsE0 eX8=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, May 19, 2020 at 11:12:49AM +0200, Jan Beulich wrote:
> On 19.05.2020 11:02, Roger Pau Monné wrote:
> > On Fri, Dec 20, 2019 at 02:50:06PM +0100, Jan Beulich wrote:
> >> It is wrong for us to check the base address when there's no LDT in the
> >> first place. Once we don't do this check anymore we can also set the
> >> base address to a non-canonical value when the LDT is empty.
> >>
> >> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> > 
> > Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> 
> Thanks.
> 
> > I wonder if a ldt_ents check should also be added to
> > pv_map_ldt_shadow_page in order to avoid trying to get the mapping of
> > the LDT.
> 
> We already have
> 
>     if ( unlikely((offset >> 3) >= curr->arch.pv.ldt_ents) )
>     {
>         ASSERT_UNREACHABLE();
>         return false;
>     }
> 
> What else do you mean?

Oh, I've missed that. I was searching for a check before accessing
ldt_base, which is done at initialization time. That's indeed fine.

Roger.



 


Rackspace

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