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] [day] [month] [year] [list]
Message-ID: <1deb2bc4-0cd1-41a0-9434-65c02eef77ed@huawei.com>
Date: Sat, 24 Aug 2024 10:07:32 +0800
From: Hongbo Li <lihongbo22@...wei.com>
To: Greg KH <gregkh@...uxfoundation.org>, Andy Shevchenko
	<andy.shevchenko@...il.com>
CC: <kees@...nel.org>, <andy@...nel.org>, <linux-hardening@...r.kernel.org>
Subject: Re: [PATCH -next 0/2] Add str_true_false()/str_false_true() helper



On 2024/8/23 21:38, Greg KH wrote:
> On Fri, Aug 23, 2024 at 04:22:32PM +0300, Andy Shevchenko wrote:
>> On Fri, Aug 23, 2024 at 9:13 AM Hongbo Li <lihongbo22@...wei.com> wrote:
>>>
>>> Add str_true_false()/str_false_true() helper to "true" or "false"
>>> string literal. And we found more than 10 cases currently exist
>>> in the tree. So these helpers can be used for these cases.
>>
>> Squash them into a single patch. There is no need to split these.
> 
> And let's see some patches that change existing code to use them, we
> can't add new functions that are never used in the tree.
> 

After this helper being added, I will add the coccinelle rules and do 
some replacements on the existing code to use them. Now there are many 
existing codes have use like this way (just use grep -rn "\"true\" : 
\"false\"" . to lookup):

fs/ceph/debugfs.c:360  seq_printf(s, "blocklisted: %s\n", 
fsc->blocklisted ? "true" : "false");

./net/sunrpc/backchannel_rqst.c:233 list_empty(&xprt->bc_pa_list) ? 
"true" : "false");

./crypto/drbg.c:1415  drbg->pr ? "true" : "false"

./sound/soc/intel/skylake/skl-debug.c:133 mconfig->pipe->passthru ? 
"true" : "false");

./mm/memory-tiers.c:925 numa_demotion_enabled ? "true" : "false");

etc.


> thanks,
> 
> greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ