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

Re: [PATCH] xsm/dummy: harden against speculative abuse



On Mon, Dec 21, 2020 at 02:15:55PM +0100, Jan Beulich wrote:
> On 17.12.2020 12:57, Jan Beulich wrote:
> > --- a/xen/include/xsm/dummy.h
> > +++ b/xen/include/xsm/dummy.h
> > @@ -76,20 +76,20 @@ static always_inline int xsm_default_act
> >      case XSM_HOOK:
> >          return 0;
> >      case XSM_TARGET:
> > -        if ( src == target )
> > +        if ( evaluate_nospec(src == target) )
> >          {
> >              return 0;
> >      case XSM_XS_PRIV:
> > -            if ( is_xenstore_domain(src) )
> > +            if ( evaluate_nospec(is_xenstore_domain(src)) )
> >                  return 0;
> >          }
> >          /* fall through */
> >      case XSM_DM_PRIV:
> > -        if ( target && src->target == target )
> > +        if ( target && evaluate_nospec(src->target == target) )
> >              return 0;
> >          /* fall through */
> >      case XSM_PRIV:
> > -        if ( src->is_privileged )
> > +        if ( !is_control_domain(src) )
> >              return 0;
> >          return -EPERM;
> 
> And a stray ! slipped in here. Now fixed.

FWIW:

Reviewed-by: Wei Liu <wl@xxxxxxx>

> 
> Jan



 


Rackspace

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