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]
Date: Tue, 2 Jan 2024 19:33:18 +0800
From: Wen Gu <guwen@...ux.alibaba.com>
To: Markus Elfring <Markus.Elfring@....de>, linux-s390@...r.kernel.org,
 netdev@...r.kernel.org, kernel-janitors@...r.kernel.org,
 "David S. Miller" <davem@...emloft.net>, "D. Wythe"
 <alibuda@...ux.alibaba.com>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Jan Karcher <jaka@...ux.ibm.com>,
 Paolo Abeni <pabeni@...hat.com>, Tony Lu <tonylu@...ux.alibaba.com>,
 Wenjia Zhang <wenjia@...ux.ibm.com>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [0/2] net/smc: Adjustments for two function implementations



On 2024/1/2 16:51, Markus Elfring wrote:
> …
>>> A few update suggestions were taken into account
>>> from static source code analysis.
> …
>>>     Return directly after a failed kzalloc() in smc_fill_gid_list()
>>>     Improve exception handling in smc_llc_cli_add_link_invite()
>>>
>>>    net/smc/af_smc.c  |  2 +-
>>>    net/smc/smc_llc.c | 15 +++++++--------
>>>    2 files changed, 8 insertions(+), 9 deletions(-)
> …
>> I see you want to fix the kfree(NULL) issues in these two patches.
> 
> I propose to avoid redundant function calls at various source code places.
> 
> 
>> But I am wondering if this is necessary, since kfree() can handle NULL correctly.
> 
> Would you prefer only required data processing in affected function implementations?
> 

Thank you Markus. I understood that you want to avoid redundant function calls.

But it is not very attractive to me since the calls occur on low-frequency paths
or unlikely condition, resulting in limited performance loss and the current
kfree() usage is fine and common. So what is the benfit?

I noticed that some other discussions are on-going. It seems like you are trying
to change other similiar places. Let's collect more opinions.

https://lore.kernel.org/netdev/828bb442-29d0-4bb8-b90d-f200bdd4faf6@web.de/
https://lore.kernel.org/netdev/90679f69-951c-47b3-b86f-75fd9fde3da3@web.de/
https://lore.kernel.org/netdev/dc0a1c9d-ceca-473d-9ad5-89b59e6af2e7@web.de/
https://lore.kernel.org/netdev/cde82080-c715-473c-97ac-6ef66bba6d64@web.de/

Thanks.

> Regards,
> Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ