[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250106212928.7b836da9@gandalf.local.home>
Date: Mon, 6 Jan 2025 21:29:28 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Andrew Morton
<akpm@...ux-foundation.org>, Petr Mladek <pmladek@...e.com>, Andy
Shevchenko <andriy.shevchenko@...ux.intel.com>, Rasmus Villemoes
<linux@...musvillemoes.dk>, Sergey Senozhatsky <senozhatsky@...omium.org>,
Kees Cook <keescook@...omium.org>
Subject: Re: [RFC][PATCH] printf: Harden accessing pointer dereference in
vsprintf()
On Mon, 6 Jan 2025 15:29:01 -0800
Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> On Mon, 6 Jan 2025 at 14:25, Steven Rostedt <rostedt@...dmis.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
Powered by blists - more mailing lists