linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	Steven Rostedt <rostedt@goodmis.org>,
	"Masami Hiramatsu (Google)" <mhiramat@kernel.org>,
	linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org,
	Andy Shevchenko <andy@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Petr Mladek <pmladek@suse.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Sergey Senozhatsky <senozhatsky@chromium.org>
Subject: Re: [PATCH v2 0/6] vsprintf: Add __printf attribute to where it's required
Date: Tue, 25 Mar 2025 12:38:38 -0700	[thread overview]
Message-ID: <202503251238.4BA5CA87@keescook> (raw)
In-Reply-To: <20250321144822.324050-1-andriy.shevchenko@linux.intel.com>

On Fri, Mar 21, 2025 at 04:40:46PM +0200, Andy Shevchenko wrote:
> 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(-)

Cool; it'll be nice to get these marked up.

Reviewed-by: Kees Cook <kees@kernel.org>

-- 
Kees Cook

      parent reply	other threads:[~2025-03-25 19:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202503251238.4BA5CA87@keescook \
    --to=kees@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy@kernel.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).