[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 3/3] x86/Viridian: fold duplicate vpset retrieval code
On 18/11/2021 13:14, Jan Beulich wrote: > --- a/xen/arch/x86/hvm/viridian/viridian.c > +++ b/xen/arch/x86/hvm/viridian/viridian.c > @@ -643,6 +647,18 @@ static int hv_vpset_to_vpmask(const stru > { > uint64_t bank_mask; > unsigned int vp, bank = 0; > + size_t size = sizeof(*set->bank_contents) * hv_vpset_nr_banks(set); > + > + if ( offsetof(typeof(*vpset), set.bank_contents[0]) + size > > + sizeof(*vpset) ) > + { > + ASSERT_UNREACHABLE(); > + return -EINVAL; > + } > + > + if ( hvm_copy_from_guest_phys(&set->bank_contents, bank_gpa, > + size) != HVMTRANS_okay) Minor style issue - closing bracket. I see it was a preexisting issue from the old code. ~Andrew
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |