lkml.org 
[lkml]   [2009]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH] Kbuild: Disable the -Wformat-security gcc flag
    From
    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


    \
     
     \ /
      Last update: 2009-02-10 22:59    [W:0.021 / U:30.576 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site