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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJwJo6Zix_bkE38RmDW6ywojvmzeOuPVtwH+Jqqz6AT=6jmh5A@mail.gmail.com>
Date: Wed, 21 Aug 2024 22:35:10 +0100
From: Dmitry Safonov <0x7f454c46@...il.com>
To: Simon Horman <horms@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Shuah Khan <shuah@...nel.org>, 
	Mohammad Nassiri <mnassiri@...na.com>, netdev@...r.kernel.org, 
	linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v3 2/8] selftests/net: Provide test_snprintf() helper

Hi Simon,

On Wed, 21 Aug 2024 at 20:10, Simon Horman <horms@...nel.org> wrote:
>
> On Thu, Aug 15, 2024 at 10:32:27PM +0100, Dmitry Safonov via B4 Relay wrote:
> > From: Dmitry Safonov <0x7f454c46@...il.com>
> >
> > Instead of pre-allocating a fixed-sized buffer of TEST_MSG_BUFFER_SIZE
> > and printing into it, call vsnprintf() with str = NULL, which will
> > return the needed size of the buffer. This hack is documented in
> > man 3 vsnprintf.
> >
> > Essentially, in C++ terms, it re-invents std::stringstream, which is
> > going to be used to print different tracing paths and formatted strings.
> > Use it straight away in __test_print() - which is thread-safe version of
> > printing in selftests.
> >
> > Signed-off-by: Dmitry Safonov <0x7f454c46@...il.com>
>
> Hi Dmitry,
>
> Some minor nits, as it looks like there will be a v4.

Thanks, both seem reasonable.
Did you get them with checkpatch.pl or with your trained eyes? :)

These days I run b4 prep --check and on latest version it just gave a
bunch of fmt-strings with columns > 100.

Thanks,
             Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ