Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6019592rwd; Wed, 24 May 2023 09:42:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4hQI3rUVnjMZyw0kpWF4ZnSfN8zii5zeG4xOmPWZeGFHnE+qv1H2D++BylVMAMELbP8twr X-Received: by 2002:a05:6a00:b47:b0:643:59ed:5dc9 with SMTP id p7-20020a056a000b4700b0064359ed5dc9mr4086981pfo.12.1684946533153; Wed, 24 May 2023 09:42:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684946533; cv=none; d=google.com; s=arc-20160816; b=O7uSKrv4h5vORw1tmCVnwWmCY6gEWvFcgJPg/79RRMWwZjijsHB9n3AAW2Ub9g5lS4 uuyeoQf662hsJSviJNbTd4RjgkdeiLURbDk5hfSd9ZZMYNY7HKrKi8qxRWUC1ZNbgM+U UjB8KWkELRlW7kgcatVCXZm4yAM5toSVfxwhk9LW/rxO5NnRR8Xgdr5E4uTpON/eJgrZ SlyJ/p4zhWmPrFQej3RxXy7WCjk4voNU6GnbzuqDp62xgHCZ1Eud0WSqIf7QiFuufkbt 1IF7kgdERTh5ZuhtmsasAGD1zFA89AT8geNe0tjKsVxiFCtPPPWCJWll7zDkd8EcjlV2 3qLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=V0OcmoqN89abQ8GX5mR62J7gk9WykX4+OTxLTDz7NsY=; b=iS10JbOo1F0xiGp1DPGv1kVMhAjDd+3ZPCpeH+Wx4V8sz2PICZ7lg2u40At4ZU7nEm N9Xki/ChjL+q0xhMqkJiPF5sF86jmjfQC0/H+SQiPPpGTE9aCR5V4tr95/s9xAPdfsA2 Vbm3uC9D1e4VRDT1rP2ePxun56EjSL5JGgL5NSvhMg7R8RTOUuGfRkCrY2YiU6kKOp7j CjISBgi+GhUiVPFlQ+WCR/eExvJX6SPx+w+Gijucj63fOYgWXLqJQdQ/3qPvOWNeZGvN cXMZP94xonP0NSAWVOXQVPXelJWNFBZVxqTGbtOeGniP9gx0msdIxKlZ3h0YpCQWIV95 f0QQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x10-20020aa79aca000000b0063d24857c5bsi3380549pfp.43.2023.05.24.09.42.00; Wed, 24 May 2023 09:42:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230214AbjEXQi4 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 24 May 2023 12:38:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229912AbjEXQiz (ORCPT ); Wed, 24 May 2023 12:38:55 -0400 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A31FE9; Wed, 24 May 2023 09:38:53 -0700 (PDT) Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-9739440b60bso7890966b.0; Wed, 24 May 2023 09:38:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684946332; x=1687538332; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C02MeIwQdNrwFQOvJ+pcAUppiGgc5dW7CdevAd4vdUk=; b=BsjwOJLIryTIyvXhJuOuw90G8QRzlNlPJsMsoG5Gyv5LTz1WeCac43aEtfmVWkd/vc EIu379W3uqPHZYalAvWWasnv8IqkJAlxohGf7EppHJ2z+Al4jKfGL1OOyAd3XemijNdf hMgmPdQ9CpTpyfW+xR/5I9bNPYYHMC1LXG2cHyo+lGJdvAPPRQ6GK2mvFEY4DVX2a+f0 7Sjqvaao1saTpsWwE5jRb6MX7MwcWvz8A8T61UXUqfulDP9EQDwa6PwXwtx5XrOsq2J0 X2pFNt2bXjQL5XskS6Yn61NSWKGrUGjtHkAC9Mm88ktxvvBJnstIBFjJYKgvrvt/VA+j 6+xQ== X-Gm-Message-State: AC+VfDwiY6o/wQakwM4RH6y0RJq4yipBVDswQ5/733e7Eqhhk6yABTfm BCHG7rAUXCkoeZuiykfTNjYDAy9ZW9VmJARt+pU= X-Received: by 2002:a17:906:5199:b0:965:9602:3ee1 with SMTP id y25-20020a170906519900b0096596023ee1mr15583280ejk.2.1684946331935; Wed, 24 May 2023 09:38:51 -0700 (PDT) MIME-Version: 1.0 References: <20230418130743.67024-1-n.zhandarovich@fintech.ru> In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 24 May 2023 18:38:40 +0200 Message-ID: Subject: Re: [PATCH] PM: domains: fix integer overflow issues in genpd_parse_state() To: Ulf Hansson Cc: Nikita Zhandarovich , "Rafael J. Wysocki" , Kevin Hilman , Len Brown , Pavel Machek , Greg Kroah-Hartman , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 8, 2023 at 12:37 PM Ulf Hansson wrote: > > On Tue, 18 Apr 2023 at 15:07, Nikita Zhandarovich > 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 > > Acked-by: Ulf Hansson Applied as 6.5 material, thanks! And sorry for the delay.