On 4/24/19 20:10, Andrew Cooper wrote: > c/s f8303458 restricted speculative access for do_vcpu_op(), but neglected its > compat counterpart, which is reachable by guests using the 32bit ABI. > > Make an identical adjustment. > > Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> Reviewed-by: Norbert Manthey <nmant...@amazon.de> > --- > CC: Jan Beulich <jbeul...@suse.com> > CC: Wei Liu <wei.l...@citrix.com> > CC: Roger Pau Monné <roger....@citrix.com> > CC: Stefano Stabellini <sstabell...@kernel.org> > CC: Julien Grall <julien.gr...@arm.com> > CC: Norbert Manthey <nmant...@amazon.de> > --- > xen/common/compat/domain.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xen/common/compat/domain.c b/xen/common/compat/domain.c > index 88bfdc8..39877b3 100644 > --- a/xen/common/compat/domain.c > +++ b/xen/common/compat/domain.c > @@ -39,7 +39,7 @@ int compat_vcpu_op(int cmd, unsigned int vcpuid, > XEN_GUEST_HANDLE_PARAM(void) ar > struct vcpu *v; > int rc = 0; > > - if ( vcpuid >= d->max_vcpus || (v = d->vcpu[vcpuid]) == NULL ) > + if ( (v = domain_vcpu(d, vcpuid)) == NULL ) > return -ENOENT; > > switch ( cmd )
Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrer: Christian Schlaeger, Ralf Herbrich Ust-ID: DE 289 237 879 Eingetragen am Amtsgericht Charlottenburg HRB 149173 B _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel