linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] vsprintf: Add __printf attribute to where it's required
@ 2025-03-21 14:40 Andy Shevchenko
  2025-03-21 14:40 ` [PATCH v2 1/6] seq_buf: Mark binary printing functions with __printf() attribute Andy Shevchenko
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Andy Shevchenko @ 2025-03-21 14:40 UTC (permalink / raw)
  To: Andy Shevchenko, Christophe JAILLET, Kees Cook, Steven Rostedt,
	Masami Hiramatsu (Google), linux-kernel, linux-hardening,
	linux-trace-kernel
  Cc: Andy Shevchenko, Mathieu Desnoyers, Andrew Morton, Petr Mladek,
	Rasmus Villemoes, Sergey Senozhatsky

This whole series started from a simple fix (see the last patch)
to make GCC (Debian 14.2.0-17) happy when compiling with `make W=1`
(note, that CONFIG_WERROR=y and all warnings break the build!)
down to a rabbit hole.

However starting from v2 the last patch doesn't require the first
part, I prefer still to have them since the functions, while being
_binary_ printf()-like, are still printf()-like. It also puts in align
the tracing stuff with the rest and fixes the wrong parameter value.

These first 4 patches are organised in a strict order and can't be
reshuffled, otherwise it will produce a warnings in between.

I believe the best route for the series is printk tree with immutable
tag or branch for the others.

Alternatively the first 4 patches can be applied first as they
are pretty much straightforward. They also can be squashed to one
(as the same topic behind), but it all is up to the respective
maintainers.

In v2:
- split out patch 5 (Rasmus)
- rewritten the approach for the va_format() fix (Rasmus)
- amended tracing patch (removed a blank line and a __printf() in C file)

Andy Shevchenko (6):
  seq_buf: Mark binary printing functions with __printf() attribute
  seq_file: Mark binary printing functions with __printf() attribute
  tracing: Mark binary printing functions with __printf() attribute
  vsnprintf: Mark binary printing functions with __printf() attribute
  vsnprintf: Drop unused const char fmt * in va_format()
  vsnprintf: Silence false positive GCC warning for va_format()

 include/linux/seq_buf.h   |  4 ++--
 include/linux/seq_file.h  |  1 +
 include/linux/string.h    |  4 ++--
 include/linux/trace.h     |  4 ++--
 include/linux/trace_seq.h |  8 ++++----
 kernel/trace/trace.c      | 11 +++--------
 kernel/trace/trace.h      | 16 +++++++++-------
 lib/vsprintf.c            |  9 +++++++--
 8 files changed, 30 insertions(+), 27 deletions(-)

-- 
2.47.2


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-03-28 15:06 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-21 14:40 [PATCH v2 0/6] vsprintf: Add __printf attribute to where it's required Andy Shevchenko
2025-03-21 14:40 ` [PATCH v2 1/6] seq_buf: Mark binary printing functions with __printf() attribute Andy Shevchenko
2025-03-21 14:40 ` [PATCH v2 2/6] seq_file: " Andy Shevchenko
2025-03-21 14:40 ` [PATCH v2 3/6] tracing: " Andy Shevchenko
2025-03-21 14:40 ` [PATCH v2 4/6] vsnprintf: " Andy Shevchenko
2025-03-24 19:20   ` Steven Rostedt
2025-03-24 19:32     ` Andy Shevchenko
2025-03-21 14:40 ` [PATCH v2 5/6] vsnprintf: Drop unused const char fmt * in va_format() Andy Shevchenko
2025-03-21 14:40 ` [PATCH v2 6/6] vsnprintf: Silence false positive GCC warning for va_format() Andy Shevchenko
2025-03-25 10:15 ` [PATCH v2 0/6] vsprintf: Add __printf attribute to where it's required Petr Mladek
2025-03-28 13:51   ` Petr Mladek
2025-03-28 15:05     ` Andy Shevchenko
2025-03-25 19:38 ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).