[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1326854599.20922.19.camel@joe2Laptop>
Date: Tue, 17 Jan 2012 18:43:19 -0800
From: Joe Perches <joe@...ches.com>
To: Michał Mirosław <mirq-linux@...e.qmqm.pl>
Cc: David Miller <davem@...emloft.net>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vsprintf: Prevent NULL dereference using %pNF
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists