From: Floris Kraak <randakar@gmail.com>
To: Kyle Moffett <kyle@moffetthome.net>
Cc: Roland Dreier <rdreier@cisco.com>,
Robert Hancock <hancockrwd@gmail.com>,
Sam Ravnborg <sam@ravnborg.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Trivial Patch Monkey <trivial@kernel.org>
Subject: Re: [PATCH] Kbuild: Disable the -Wformat-security gcc flag
Date: Tue, 10 Feb 2009 22:56:32 +0100 [thread overview]
Message-ID: <56e1b5710902101356h56140a5r12be50439b2ce10f@mail.gmail.com> (raw)
In-Reply-To: <f73f7ab80902101311w30d5aecet6dd7c2123a671480@mail.gmail.com>
On Tue, Feb 10, 2009 at 10:11 PM, Kyle Moffett <kyle@moffetthome.net> wrote:
> On Thu, Feb 5, 2009 at 3:26 AM, Floris Kraak <randakar@gmail.com> wrote:
>> There are probably some real bugs in there. On the other hand there is
>> some overhead to fixing the warnings. Kernel text size increase,
>> possibly some CPU overhead from parsing the format string. Hopefully
>> none of these calls are in really hot code paths ;-)
>
> Actually, I would really suspect that CPU time would *decrease* for
> most of these, because instead of groveling through the whole argument
> string looking for '%' symbols we would do a single "%s" lookup
> followed by a basic strncpy(dmesg_buffer + offset, arg,
> dmesg_buffer_size - offset);
>
True enough.
Still increasing kernel text in a number of cases.
I've been thinking that in a lot of them (most of the 'banner' and
'version' substitutions, basically) I can probably get away with
moving the string argument into the function that uses it without
losing the __initdata section advantage - it just gets moved from an
__initdata segment into an __init declared function anyway.. or
something that should be declared __init at any rate since what the
hell is it using __initdata segment data for otherwise?
Unless some expert on these section markers can dispute that line of
reasoning, anyway ;-)
It means redoing most - possibly all - of the trivial patch though.
Getting rid if a few warnings most people don't even get is more work
than I thought. And to think I was considering looking into other
types of warnings as well ..
I should consider it a nice exercise in learning kernel development
practices I guess ..
Regards,
Floris
---
"They that give up essential liberty to obtain temporary safety,
deserve neither liberty nor safety."
-- Ben Franklin
"The course of history shows that as a government grows, liberty
decreases."
-- Thomas Jefferson
next prev parent reply other threads:[~2009-02-10 21:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-04 14:28 Floris Kraak
2009-02-04 22:14 ` Sam Ravnborg
2009-02-04 22:26 ` Roland Dreier
2009-02-04 23:48 ` Robert Hancock
2009-02-05 6:37 ` Roland Dreier
2009-02-05 8:26 ` Floris Kraak
2009-02-05 10:15 ` Floris Kraak
2009-02-05 10:27 ` Andreas Schwab
2009-02-05 10:50 ` Floris Kraak
2009-02-05 21:52 ` Roland Dreier
2009-02-10 21:11 ` Kyle Moffett
2009-02-10 21:56 ` Floris Kraak [this message]
2009-02-10 20:24 ` Pavel Machek
2009-02-10 21:48 ` Floris Kraak
2009-05-15 10:23 ` Pekka Enberg
2009-05-15 13:28 ` Floris Kraak
2009-05-15 20:42 ` Pekka Enberg
2009-05-15 22:09 ` Floris Kraak
2009-06-14 20:50 ` Sam Ravnborg
2009-06-15 5:54 ` Pekka J Enberg
2009-06-15 8:02 ` Floris Kraak
2009-06-26 22:15 ` Sam Ravnborg
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=56e1b5710902101356h56140a5r12be50439b2ce10f@mail.gmail.com \
--to=randakar@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=hancockrwd@gmail.com \
--cc=kyle@moffetthome.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rdreier@cisco.com \
--cc=sam@ravnborg.org \
--cc=trivial@kernel.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®