[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1427441563.20980.7.camel@perches.com>
Date: Fri, 27 Mar 2015 00:32:43 -0700
From: Joe Perches <joe@...ches.com>
To: Mathias Krause <minipli@...glemail.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Mason <slash.tmp@...e.fr>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: String literals in __init functions
On Fri, 2015-03-27 at 08:05 +0100, Mathias Krause wrote:
> On 26 March 2015 at 22:40, Andrew Morton <akpm@...ux-foundation.org> wrote:
> > On Thu, 26 Mar 2015 21:49:06 +0100 Mathias Krause <minipli@...glemail.com> wrote:
> >
> >> Andrew, what's your opinion on such a patch set? Do you too think it's
> >> useful? Or do you share Ingo's fear about the additional maintenance
> >> burden?
> >
> > I don't think the burden would be toooo high, although it will mess the
> > code up a bit.
[]
> > Did anyone ask the gcc developers? I'd have thought that a function-wide
> > __attribute__((__string_section__(foo))
> > wouldn't be a ton of work to implement.
>
> The point is you cannot blindly mark all strings referenced from
> __init / __exit code to end up in a matching string section because
> strings in this code might have to live longer when passed to
> functions keeping a pointer on them.
This is the primary reason I support the pi_<level>/pe_<level>/
printk_init/printk_exit markings. It's simple and not a large
burden to the coder/reader. If a few formats aren't marked
appropriately, it's not generally a significant loss, but it
is easily correctable by scripts.
--
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