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: <aTRVusbSqh5ZBY-o@smile.fi.intel.com>
Date: Sat, 6 Dec 2025 18:11:38 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Tamir Duberstein <tamird@...nel.org>
Cc: Petr Mladek <pmladek@...e.com>, Steven Rostedt <rostedt@...dmis.org>,
	Rasmus Villemoes <linux@...musvillemoes.dk>,
	Sergey Senozhatsky <senozhatsky@...omium.org>,
	Kees Cook <kees@...nel.org>, linux-kernel@...r.kernel.org,
	oe-kbuild-all@...ts.linux.dev, Tamir Duberstein <tamird@...il.com>,
	kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] printf: add __printf attribute

On Sat, Dec 06, 2025 at 08:19:09AM -0500, Tamir Duberstein wrote:

> This produces better diagnostics when incorrect inputs are passed.

...

> -static void
> +static void __printf(2, 3)

3?!

I think it should be (2, 0). Yes, the both users call it with "%p..." in format
string, but the second parameter tells compiler to check the variadic
arguments, which are absent here. Changing 'const void *p' to '...' will align
it with the given __printf() attribute, but I don't know if this what we want.

>  test_hashed(struct kunit *kunittest, const char *fmt, const void *p)
>  {
>  	char buf[PLAIN_BUF_SIZE];

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ