[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 4/5] libxc/PM: Ensure pxstat buffers are correctly sized
On Tue, May 27, 2025 at 04:26:34PM +0100, Ross Lagerwall wrote: > diff --git a/tools/libs/ctrl/xc_pm.c b/tools/libs/ctrl/xc_pm.c > index ff7b5ada053f..0bd79031044f 100644 > --- a/tools/libs/ctrl/xc_pm.c > +++ b/tools/libs/ctrl/xc_pm.c > @@ -46,35 +46,34 @@ int xc_pm_get_pxstat(xc_interface *xch, int cpuid, struct > xc_px_stat *pxpt) > { > struct xen_sysctl sysctl = {}; > /* Sizes unknown until xc_pm_get_max_px */ This comment is wrong now and can be removed. > - DECLARE_NAMED_HYPERCALL_BOUNCE(trans, pxpt->trans_pt, 0, > XC_HYPERCALL_BUFFER_BOUNCE_BOTH); > - DECLARE_NAMED_HYPERCALL_BOUNCE(pt, pxpt->pt, 0, > XC_HYPERCALL_BUFFER_BOUNCE_BOTH); > + DECLARE_NAMED_HYPERCALL_BOUNCE(trans, pxpt->trans_pt, > + pxpt->total * pxpt->total * > sizeof(uint64_t), > + XC_HYPERCALL_BUFFER_BOUNCE_BOTH); > + DECLARE_NAMED_HYPERCALL_BOUNCE(pt, pxpt->pt, > + pxpt->total * sizeof(struct xc_px_val), > + XC_HYPERCALL_BUFFER_BOUNCE_BOTH); The rest of the patch looks fine: Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Thanks, -- Anthony PERARD
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |