The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: David Miller <davem@davemloft.net>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vsprintf: Prevent NULL dereference using %pNF
Date: Tue, 17 Jan 2012 18:43:19 -0800	[thread overview]
Message-ID: <1326854599.20922.19.camel@joe2Laptop> (raw)
In-Reply-To: <20120117211215.GA18268@rere.qmqm.pl>

On Tue, 2012-01-17 at 22:12 +0100, Michał Mirosław wrote:
> On Tue, Jan 17, 2012 at 11:43:40AM -0800, Joe Perches wrote:
> > Isn't an additional copy of "struct printf_spec spec" on the stack
> > in function pointer() now?
> If the function is inlined then gcc should know that original is not needed
> after call and do no copy. Without inlining, gcc should too, optimize it
> because it's a tail call.
> We could read the generated assembly to be sure, of course.

At least for x86/gcc 4.6, it seems it doesn't make any difference.



      reply	other threads:[~2012-01-18  2:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17 18:37 [PATCH] vsprintf: Prevent NULL dereference using %pNF Joe Perches
2012-01-17 18:46 ` David Miller
2012-01-17 18:51   ` Joe Perches
2012-01-17 18:52     ` David Miller
2012-01-17 18:54       ` Joe Perches
2012-01-17 18:59         ` David Miller
2012-01-17 19:39     ` Michał Mirosław
2012-01-17 19:43       ` Joe Perches
2012-01-17 21:12         ` Michał Mirosław
2012-01-18  2:43           ` Joe Perches [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=1326854599.20922.19.camel@joe2Laptop \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mirq-linux@rere.qmqm.pl \
    /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