public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	John Ogness <john.ogness@linutronix.de>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] more printk for 6.15
Date: Thu, 3 Apr 2025 09:14:54 -0700	[thread overview]
Message-ID: <202504030913.B50F046CB7@keescook> (raw)
In-Reply-To: <CAHp75Vf=tYmWXDUZDqcMK4i8k6_VBqGttw6-mEgt6VhvRVFwuA@mail.gmail.com>

On Wed, Apr 02, 2025 at 10:25:46PM +0300, Andy Shevchenko wrote:
> I actually don't know what the benefit of __printf() attribute from
> security (?) point of view is. I may speculate that this helps to
> validate the format string and arguments (when provided as ...) and
> helps with potential wrong argument sizes, etc. Kees, what do you
> think about Linus' proposal?

It's a bit low on the severity list since we long ago removed %n, but
it's effectively a form of type-checking for arguments to printf. I look
at it more as a robustness/correctness checker. If we can make it work,
it's good to have. And it looks like Nathan's suggestion will make it
feasible.

-Kees

-- 
Kees Cook

  parent reply	other threads:[~2025-04-03 16:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02 12:58 [GIT PULL] more printk for 6.15 Petr Mladek
2025-04-02 17:12 ` Linus Torvalds
2025-04-02 18:39   ` Andy Shevchenko
2025-04-02 19:06     ` Linus Torvalds
2025-04-02 19:25       ` Andy Shevchenko
2025-04-02 20:34         ` Nathan Chancellor
2025-04-03 12:07           ` Andy Shevchenko
2025-04-04  8:19             ` Petr Mladek
2025-04-04 21:02               ` Nathan Chancellor
2025-04-03 16:14         ` Kees Cook [this message]
2025-04-02 19:07     ` Linus Torvalds
2025-04-02 19:10       ` Linus Torvalds
2025-04-02 19:44         ` Steven Rostedt
2025-04-02 19:52           ` Linus Torvalds
2025-04-02 20:25           ` Andy Shevchenko
2025-04-02 20:00         ` Sean Christopherson
2025-04-02 20:11           ` Steven Rostedt
2025-04-03  9:34         ` Petr Mladek
2025-04-02 17:48 ` pr-tracker-bot

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=202504030913.B50F046CB7@keescook \
    --to=kees@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=nathan@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=torvalds@linux-foundation.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