mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Petr Mladek <pmladek@suse.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Kees Cook <keescook@chromium.org>
Subject: Re: [RFC][PATCH] printf: Harden accessing pointer dereference in vsprintf()
Date: Mon, 6 Jan 2025 21:29:28 -0500	[thread overview]
Message-ID: <20250106212928.7b836da9@gandalf.local.home> (raw)
In-Reply-To: <CAHk-=whe3Kzk06s7dW4xwN+oiO2sDyDHCGOGrY892VtCLUQ1ig@mail.gmail.com>

On Mon, 6 Jan 2025 15:29:01 -0800
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Mon, 6 Jan 2025 at 14:25, Steven Rostedt <rostedt@goodmis.org> wrote:
> >
> > Linus had suggested adding this kind of check[1]. This is a bit different
> > than Linus's solution as it utilizes copy_from_kernel_nofault() and doesn't
> > require calls to pagefault_disable() and extra labels.  
> 
> Yeah, and it generates horrendous code as a result.
> 

I guess the question is do we prefer horrendous code generated or what we see?

vsprintf() is used in critical paths, but I wonder how much these two
versions actually make a difference in performance? If they do, then yeah,
the open coded version would be better.

-- Steve

  reply	other threads:[~2025-01-07  2:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-06 22:27 Steven Rostedt
2025-01-06 23:29 ` Linus Torvalds
2025-01-07  2:29   ` Steven Rostedt [this message]
2025-01-07  3:05     ` Linus Torvalds
2025-01-07  0:33 ` Kees Cook
2025-01-07  4:33 ` Sergey Senozhatsky

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=20250106212928.7b836da9@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=pmladek@suse.com \
    --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

all inboxes | Powered by JetHome®