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: <20250324120430.0620a8f6@gandalf.local.home>
Date: Mon, 24 Mar 2025 12:04:30 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Petr Mladek <pmladek@...e.com>, Christophe JAILLET
 <christophe.jaillet@...adoo.fr>, Kees Cook <kees@...nel.org>, "Masami
 Hiramatsu (Google)" <mhiramat@...nel.org>, linux-kernel@...r.kernel.org,
 linux-hardening@...r.kernel.org, linux-trace-kernel@...r.kernel.org, John
 Ogness <john.ogness@...utronix.de>, Sergey Senozhatsky
 <senozhatsky@...omium.org>, Andy Shevchenko <andy@...nel.org>, Mathieu
 Desnoyers <mathieu.desnoyers@...icios.com>, Andrew Morton
 <akpm@...ux-foundation.org>, Rasmus Villemoes <linux@...musvillemoes.dk>
Subject: Re: [PATCH v1 1/6] seq_buf: Mark binary printing functions with
 __printf() attribute

On Thu, 20 Mar 2025 20:04:22 +0200
Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:

> Binary printing functions are using printf() type of format, and compiler
> is not happy about them as is:
> 
> lib/seq_buf.c:162:17: error: function ‘seq_buf_bprintf’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]
> 
> Fix the compilation errors by adding __printf() attribute.
> 

Should also note the removal of "extern"

-- Steve

> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
>  include/linux/seq_buf.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/seq_buf.h b/include/linux/seq_buf.h
> index fe41da005970..52791e070506 100644
> --- a/include/linux/seq_buf.h
> +++ b/include/linux/seq_buf.h
> @@ -167,8 +167,8 @@ extern int seq_buf_hex_dump(struct seq_buf *s, const char *prefix_str,
>  			    const void *buf, size_t len, bool ascii);
>  
>  #ifdef CONFIG_BINARY_PRINTF
> -extern int
> -seq_buf_bprintf(struct seq_buf *s, const char *fmt, const u32 *binary);
> +__printf(2, 0)
> +int seq_buf_bprintf(struct seq_buf *s, const char *fmt, const u32 *binary);
>  #endif
>  
>  void seq_buf_do_printk(struct seq_buf *s, const char *lvl);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ