Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp565395rwi; Wed, 26 Oct 2022 04:41:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5bkmHnms0dmOYnsoGLC5laFT8MHcx/t+s2Yx4FY6dwa3jU2CNOJ/l+HAzkG4591py99k51 X-Received: by 2002:a65:6cc8:0:b0:3fe:2b89:cc00 with SMTP id g8-20020a656cc8000000b003fe2b89cc00mr37530163pgw.599.1666784472865; Wed, 26 Oct 2022 04:41:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666784472; cv=none; d=google.com; s=arc-20160816; b=Mxqw1c+svJo489cUBc7KWIqUox+tbeeoxWiH5Su9OmBtgNDKyuXReNmhVojSWdD/Wi LBiasKSoP/4socbc6gkCKQWjivTT32zgazhk7oX31pYcKIR98OE6o0j0xg12NV0PM3bA +BBZ5KkvjXcp0N/c1OBVkS+gn4YvHRCtOgobsj/O3SfoNy6qd+JkMvku6p0PH7a2sEpP NGUubmZsVnrQPeRIwxgUGGe3iescpAIEk2300u85jpSWOqMjt00dwSMj9nm9BFdLoeGI t8DqtTGUd0QIJ9o4+eTAUsdXSyOCWZTO/XSU8+abDTirQspDRQnJHG6TCGmN5nzjvyWk JYjQ== 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=F+WaWn71IPxXvQRzQ9q/7JP+VHepQxu0lSBRBYE9ndg=; b=b1VmCygulWhiIsH2rA3lGQT6vwL3sQgiN/K4VxQW183OwIZnjZaG6x5Jc1iC2f+Hgg +R2ScSGvU22B24cj4cavqEH9FENnoLGOtsQXzSE2rady/Kvo3ZeO+l1sMdJHLOrflizs 1XfEgzNeMbGukaXMs5sSCGlA6oL/zaxyuA6o5AGTyrfwXe2sGtbI9DidV+pPLhenSG3q 9m0AuxGIhLfY1pjcE9I56dE+LONoNxhqzgPsa2K3IwU85OGRTQKIJvOYqOwuvBdeA/rk S20bMsZKxx96RGNWlxwi57wZYaq7uKNdMSZ2Re5cBw/aM+0Ts53gZZS6zGECs0czo7xf GQFg== 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 g7-20020a056a0023c700b0056c26e4c980si5844693pfc.43.2022.10.26.04.41.01; Wed, 26 Oct 2022 04:41:12 -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 S233207AbiJZLfB convert rfc822-to-8bit (ORCPT + 99 others); Wed, 26 Oct 2022 07:35:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233067AbiJZLe6 (ORCPT ); Wed, 26 Oct 2022 07:34:58 -0400 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8906E4C02C; Wed, 26 Oct 2022 04:34:56 -0700 (PDT) Received: by mail-qt1-f170.google.com with SMTP id f22so9613880qto.3; Wed, 26 Oct 2022 04:34:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=YBNLraN5ZlPas7mvwACMcqvSkECOIdd8sfrQyWAPSsg=; b=vaNuE258lTBtrpW8aVyPyqCXzj7dOJ7ZJobFAYPhXHXOu5qDNiwmhdZEE1wNY8AkhW cmBsxX0S/gu7uQDowJRr+N0m3nEXt8b7G0l8A7paFjnkqMj5vs7L3KaKUnXQZQicaHJi w4I3dQym2S9wy9y3J0vOe1Z7/sRx1Xf6+BhByMZiDTAy7osNwCNVW2nSU9L+9p9uCetr GEYCE/a1VKbCQOzkiR6RtpA/z8suArySa5UyNQKPrNdhxUKYfPeNa4OBHLNUzf3iGhKV W3GDQjqWRJNcIGpUWbmp4wFT6cycpmAOLSuB51nkKXHikLWdI2XZxjNcySEd7cbgj//2 q2Bw== X-Gm-Message-State: ACrzQf1FcuU3gUiNXeeAZMt1tsMgoNaTl4eW+l6oVed65Fqdk1uube9Y 3cNpSN9AH8OGlCUlliJ/hSoXxuHqFQmmWzHDSwc= X-Received: by 2002:a05:622a:1a25:b0:39c:b862:7318 with SMTP id f37-20020a05622a1a2500b0039cb8627318mr36095197qtb.147.1666784095620; Wed, 26 Oct 2022 04:34:55 -0700 (PDT) MIME-Version: 1.0 References: <20221017182035.3g67uudttl6k5gag@bogus> <20221017184338.64152-1-pmanank200502@gmail.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 26 Oct 2022 13:34:43 +0200 Message-ID: Subject: Re: [PATCH v2] "ACPI: PCC: Fix unintentional integer overflow" To: "lihuisong (C)" , Manank Patel Cc: lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Sudeep Holla Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS 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 Tue, Oct 18, 2022 at 3:13 AM lihuisong (C) wrote: > > > 在 2022/10/18 2:43, Manank Patel 写道: > > Fixed unintentional u32 overflow by changing PCC_CMD_WAIT_RETRIES_NUM to 500ULL > > > > Fixes: 91cefefb6991 ("ACPI: PCC: replace wait_for_completion()") > > > > Signed-off-by: Manank Patel > > Acked-by: Sudeep Holla > > > > --- > > Thank you so much @sudeep for your clarifications! > > > > Changelog: > > v1->v2: > > Change the macro itself to ULL instead of typecasting in the > > code > > > > drivers/acpi/acpi_pcc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/acpi/acpi_pcc.c b/drivers/acpi/acpi_pcc.c > > index ee4ce5ba1fb2..3e252be047b8 100644 > > --- a/drivers/acpi/acpi_pcc.c > > +++ b/drivers/acpi/acpi_pcc.c > > @@ -27,7 +27,7 @@ > > * Arbitrary retries in case the remote processor is slow to respond > > * to PCC commands > > */ > > -#define PCC_CMD_WAIT_RETRIES_NUM 500 > > +#define PCC_CMD_WAIT_RETRIES_NUM 500ULL > > > > struct pcc_data { > > struct pcc_mbox_chan *pcc_chan; > > Acked-by: Huisong Li Applied as 6.1-rc material, thanks!