On 07.05.2025 16:37, Ross Lagerwall wrote:
> On Thu, Apr 17, 2025 at 2:23 PM Jan Beulich wrote:
>>
>> On 17.04.2025 12:30, Ross Lagerwall wrote:
>>> --- a/xen/drivers/acpi/pmstat.c
>>> +++ b/xen/drivers/acpi/pmstat.c
>>> @@ -104,6 +104,14 @@ int do_get_pm_info(struct xen_sysctl_get_pmstat *op)
>>>
On Thu, Apr 17, 2025 at 2:23 PM Jan Beulich wrote:
>
> On 17.04.2025 12:30, Ross Lagerwall wrote:
> > --- a/xen/drivers/acpi/pmstat.c
> > +++ b/xen/drivers/acpi/pmstat.c
> > @@ -104,6 +104,14 @@ int do_get_pm_info(struct xen_sysctl_get_pmstat *op)
> > cpufreq_residency_update(op->cpuid, p
On 17.04.2025 12:30, Ross Lagerwall wrote:
> --- a/xen/drivers/acpi/pmstat.c
> +++ b/xen/drivers/acpi/pmstat.c
> @@ -104,6 +104,14 @@ int do_get_pm_info(struct xen_sysctl_get_pmstat *op)
> cpufreq_residency_update(op->cpuid, pxpt->u.cur);
>
> ct = pmpt->perf.state_count;
> +
> +
Check that the total number of states passed in and hence the size of
buffers is sufficient to avoid writing more than the caller has
allocated.
The interface is not explicit about whether getpx.total is expected to
be set by the caller in this case but since it is always set in
libxenctrl it seem