Re: [PATCH] PM: domains: fix integer overflow issues in genpd_parse_state()

From: Rafael J. Wysocki
Date: Wed May 24 2023 - 12:38:58 EST


On Mon, May 8, 2023 at 12:37 PM Ulf Hansson <ulf.hansson@xxxxxxxxxx> wrote:
>
> On Tue, 18 Apr 2023 at 15:07, Nikita Zhandarovich
> <n.zhandarovich@xxxxxxxxxx> wrote:
> >
> > Currently, while calculating residency and latency values, right
> > operands may overflow if resulting values are big enough.
> >
> > To prevent this, albeit unlikely case, play it safe and convert
> > right operands to left ones' type s64.
> >
> > Found by Linux Verification Center (linuxtesting.org) with static
> > analysis tool SVACE.
> >
> > Fixes: 30f604283e05 ("PM / Domains: Allow domain power states to be read from DT")
> > Signed-off-by: Nikita Zhandarovich <n.zhandarovich@xxxxxxxxxx>
>
> Acked-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>

Applied as 6.5 material, thanks!

And sorry for the delay.