public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Mathias Krause <minipli@googlemail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Mason <slash.tmp@free.fr>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: String literals in __init functions
Date: Fri, 27 Mar 2015 00:32:43 -0700	[thread overview]
Message-ID: <1427441563.20980.7.camel@perches.com> (raw)
In-Reply-To: <CA+rthh9H4C6b=eGdNmFj3Vb+rHUCPOuaDL1h5i_WXWtNGZYS2A@mail.gmail.com>

On Fri, 2015-03-27 at 08:05 +0100, Mathias Krause wrote:
> On 26 March 2015 at 22:40, Andrew Morton <akpm@linux-foundation.org> wrote:
> > On Thu, 26 Mar 2015 21:49:06 +0100 Mathias Krause <minipli@googlemail.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.



      reply	other threads:[~2015-03-27  7:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 17:56 String literals in __init functions Mason
2015-03-25 18:01 ` Joe Perches
2015-03-26 12:40   ` Mason
2015-03-26 16:13     ` Joe Perches
2015-03-26 16:37       ` Mathias Krause
2015-03-26 17:53         ` Joe Perches
2015-03-26 20:49           ` Mathias Krause
2015-03-26 21:40             ` Andrew Morton
2015-03-26 21:58               ` Joe Perches
2015-03-26 22:15                 ` Andrew Morton
2015-03-27  7:16                   ` Mathias Krause
2015-04-02 16:00                 ` Joseph Myers
2015-04-02 16:23                   ` Joe Perches
2015-03-27  7:05               ` Mathias Krause
2015-03-27  7:32                 ` 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=1427441563.20980.7.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=minipli@googlemail.com \
    --cc=slash.tmp@free.fr \
    /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