Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDB08C64ED8 for ; Mon, 27 Feb 2023 12:03:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229746AbjB0MD1 (ORCPT ); Mon, 27 Feb 2023 07:03:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbjB0MDZ (ORCPT ); Mon, 27 Feb 2023 07:03:25 -0500 Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [80.237.130.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 686CEEC62; Mon, 27 Feb 2023 04:03:06 -0800 (PST) Received: from [2a02:8108:8980:2478:8cde:aa2c:f324:937e]; authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1pWcDd-0001PM-Dn; Mon, 27 Feb 2023 13:03:01 +0100 Message-ID: <36373070-ead7-6a8e-2207-573d06150337@leemhuis.info> Date: Mon, 27 Feb 2023 13:03:00 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [Regression] cached max_state breaks ACPI processor cooling device Content-Language: en-US, de-DE To: "Zhang, Rui" , "viresh.kumar@linaro.org" , "Wysocki, Rafael J" , "daniel.lezcano@linaro.org" Cc: "srinivas.pandruvada@linux.intel.com" , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linux kernel regressions list References: <53ec1f06f61c984100868926f282647e57ecfb2d.camel@intel.com> From: "Linux regression tracking #adding (Thorsten Leemhuis)" Reply-To: Linux regressions mailing list In-Reply-To: <53ec1f06f61c984100868926f282647e57ecfb2d.camel@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;regressions@leemhuis.info;1677499386;63d4bfa2; X-HE-SMSGID: 1pWcDd-0001PM-Dn Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [CCing the regression list, as it should be in the loop for regressions: https://docs.kernel.org/admin-guide/reporting-regressions.html] [TLDR: I'm adding this report to the list of tracked Linux kernel regressions; the text you find below is based on a few templates paragraphs you might have encountered already in similar form. See link in footer if these mails annoy you.] On 25.02.23 06:29, Zhang, Rui wrote: > > Starting from commit c408b3d1d9bb("thermal: Validate new state in > cur_state_store()") and commit a365105c685c("thermal: sysfs: Reuse > cdev->max_state"), the cdev->get_max_state() is evaluated only once > during cooling device registration. > > This is done to fix the below Smatch static checker warning: > drivers/thermal/thermal_sysfs.c:656 thermal_cooling_device_stats_update() > warn: potential integer overflow from user 'stats->state * > stats->max_states + new_state' > reported here https://lore.kernel.org/all/Y0ltRJRjO7AkawvE@kili/. > > But this actually breaks cooling devices which could have dynamic max > cooling state, like ACPI processor cooling device. Thanks for the report. To be sure the issue doesn't fall through the cracks unnoticed, I'm adding it to regzbot, the Linux kernel regression tracking bot: #regzbot ^introduced c408b3d1d9bb #regzbot title thermal: cached max_state breaks ACPI processor cooling device #regzbot ignore-activity This isn't a regression? This issue or a fix for it are already discussed somewhere else? It was fixed already? You want to clarify when the regression started to happen? Or point out I got the title or something else totally wrong? Then just reply and tell me -- ideally while also telling regzbot about it, as explained by the page listed in the footer of this mail. Developers: When fixing the issue, remember to add 'Link:' tags pointing to the report (the parent of this mail). See page linked in footer for details. Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) -- Everything you wanna know about Linux kernel regression tracking: https://linux-regtracking.leemhuis.info/about/#tldr That page also explains what to do if mails like this annoy you.