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: <4637e47c-61b0-43bf-996e-6291f2b49f31@app.fastmail.com>
Date: Thu, 05 Feb 2026 11:12:47 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Petr Mladek" <pmladek@...e.com>, "Arnd Bergmann" <arnd@...nel.org>
Cc: "Kees Cook" <kees@...nel.org>,
 "Andy Shevchenko" <andriy.shevchenko@...ux.intel.com>,
 "kernel test robot" <lkp@...el.com>,
 "Alexei Starovoitov" <alexei.starovoitov@...il.com>,
 "Andy Shevchenko" <andy@...nel.org>, "Alexei Starovoitov" <ast@...nel.org>,
 "Bartosz Golaszewski" <brgl@...nel.org>, linux-kernel@...r.kernel.org,
 linux-hardening@...r.kernel.org, bpf@...r.kernel.org
Subject: Re: [PATCH] vsnprintf: drop __printf() attributes on binary printing functions

On Thu, Feb 5, 2026, at 09:53, Petr Mladek wrote:
> On Wed 2026-02-04 14:26:23, Arnd Bergmann wrote:
>> Fixes: 6b2c1e30ad68 ("seq_file: Mark binary printing functions with __printf() attribute")
>> Fixes: 7bf819aa992f ("vsnprintf: Mark binary printing functions with __printf() attribute")
>
> From the commit message, it is not obvious why reverting these commits
> won't bring back the warnings in the modified functions.
>
> My understanding is that the warnings won't get back thanks to
> the commit bd67c1c3c353b6560 ("vsnprintf: Silence false positive
> GCC warning for va_format()") as explained by the original cover
> letter, see
> https://lore.kernel.org/all/20250321144822.324050-1-andriy.shevchenko@linux.intel.com/#t
>
> It would be worth to mentionin this in the commit message.

Unfortunately, I have not been able to reproduce the original
warnings at all. The va_format() warning and the patch to
silence that look entirely unrelated here, that was just the
compiler incorrectly identifying a function that does not even
take a format argument.

I'm sure some other intermediate change managed to shut up
the warnings, but I don't know which one. My best guess would
be that 938df695e98d ("vsprintf: associate the format state with
the format pointer") made gcc no longer warn about bstr_printf(),
but that predates Andy's patch and I can't easily revert it for
testing. Checking out a kernel before those patches does have
the warning on va_format() but not on the other ones.

>> Link: https://lore.kernel.org/all/CAADnVQK3eZp3yp35OUx8j1UBsQFhgsn5-4VReqAJ=68PaaKYmg@mail.gmail.com/
>> Closes: https://lore.kernel.org/oe-kbuild-all/202512061640.9hKTnB8p-lkp@intel.com/
>> Reported-by: kernel test robot <lkp@...el.com>
>> Suggested-by: Alexei Starovoitov <alexei.starovoitov@...il.com>
>> Acked-by: Alexei Starovoitov <alexei.starovoitov@...il.com>
>> Signed-off-by: Arnd Bergmann <arnd@...db.de>
>> ---
>> For reference, three additional patches are required before we can drop
>> the Makefile.warn line that currently hides these warnings:
>> 
>> https://lore.kernel.org/lkml/20260203162546.2254900-1-arnd@kernel.org/
>> https://lore.kernel.org/lkml/20260203163440.2674340-1-arnd@kernel.org/
>> https://lore.kernel.org/lkml/20260203164545.3174910-1-arnd@kernel.org/
>> 
>> Tested using randconfig builds on arm/arm64/x86
>> ---
>>  include/linux/seq_file.h | 1 -
>>  include/linux/string.h   | 4 ++--
>>  2 files changed, 2 insertions(+), 3 deletions(-)
>
> Otherwise, the change looks good to me. Feel free to use,
> ideally with the updated commit message:
>
> Acked-by: Petr Mladek <pmladek@...e.com>
>
> I wonder who should take this patch. Should it go via
> printk/bpf/tracing or another tree?
> Does anyone has any preference, please?

I think your tree makes most sense here, but I have no strong
preference.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ