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, 20 Feb 2024 08:57:55 +0200
From: Yevgeny Kliteynik <kliteyn@...dia.com>
To: Zhu Yanjun <yanjun.zhu@...ux.dev>, Arnd Bergmann <arnd@...nel.org>,
 Saeed Mahameed <saeedm@...dia.com>, Leon Romanovsky <leon@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, Alex Vesker <valex@...dia.com>,
 Erez Shitrit <erezsh@...dia.com>, Hamdan Igbaria <hamdani@...dia.com>,
 netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] net/mlx5: pre-initialize sprintf buffers

On 20-Feb-24 07:50, Zhu Yanjun wrote:
> External email: Use caution opening links or attachments
> 
> 
> 在 2024/2/19 18:04, Arnd Bergmann 写道:
>> From: Arnd Bergmann <arnd@...db.de>
>>
>> The debugfs files always in this driver all use an extra round-trip
>> through an snprintf() before getting put into a mlx5dr_dbg_dump_buff()
>> rather than the normal seq_printf().
>>
>> Zhu Yanjun noticed that the buffers are not initialized before being
>> filled or reused and requested them to always be zeroed as a
>> preparation for having more reused between the buffers.
> 
> I think that you are the first to find this.

The buffers are not initialized intentionally.
The content is overwritten from the buffer's beginning.
Initializing is not needed as it will only cause perf degradation.

-- YK



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ