lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <04ca5584-b10e-465d-bbda-627b7f743ce9@kernel.org>
Date: Wed, 3 Sep 2025 08:11:12 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Zihuan Zhang <zhangzihuan@...inos.cn>
Cc: airlied@...il.com, alim.akhtar@...sung.com, beata.michalska@....com,
 ben.horgan@....com, bp@...en8.de, catalin.marinas@....com,
 cw00.choi@...sung.com, daniel.lezcano@...nel.org,
 dave.hansen@...ux.intel.com, dri-devel@...ts.freedesktop.org,
 edubezval@...il.com, festevam@...il.com, imx@...ts.linux.dev,
 intel-gfx@...ts.freedesktop.org, j-keerthy@...com,
 jani.nikula@...ux.intel.com, kernel@...gutronix.de,
 kyungmin.park@...sung.com, lenb@...nel.org, linux-acpi@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
 linux-omap@...r.kernel.org, linux-pm@...r.kernel.org,
 linuxppc-dev@...ts.ozlabs.org, lukasz.luba@....com, mpe@...erman.id.au,
 myungjoo.ham@...sung.com, pavel@...nel.org, ptsm@...ux.microsoft.com,
 rafael@...nel.org, rodrigo.vivi@...el.com, rui.zhang@...el.com,
 s.hauer@...gutronix.de, shawnguo@...nel.org, simona@...ll.ch,
 srinivas.pandruvada@...ux.intel.com, sudeep.holla@....com,
 sumitg@...dia.com, thierry.reding@...il.com, tursulin@...ulin.net,
 viresh.kumar@...aro.org, will@...nel.org, yangyicong@...ilicon.com,
 zhenglifeng1@...wei.com
Subject: Re: [PATCH v3 12/12] PM: EM: Use scope-based cleanup helper

On 03/09/2025 04:12, Zihuan Zhang wrote:
>> You are not improving the source code here. This is not how to use
>>  __free() and you clearly do not understand the source code.
> 
> Sorry for the problem, policy should be assigned after cpumask_test_cpu().
> 
> I actually realized earlier that __free() only frees at the end of the variable’s lifetime. 
> I had suggested using a braced macro in cpufreq.h to allow immediate release after use, 
> but I understand the maintainer’s advice to “keep it simple” and will follow that.
> 
>> What's more, you did not use standard tools which would tell you this is
>> buggy and wrong.
> 
> Could you please let me know which standard tools you recommend for detecting such issues? 
> 
> I’d like to use them to avoid similar mistakes in the future.
All standard tools used for kernel development, sparse, smatch, clang,
coccinelle, see my talk from OSSE25.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ