public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Andi Kleen <ak@suse.de>, Andrew Morton <akpm@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCH] Tell modpost that any reference from .note* is OK
Date: Tue, 29 May 2007 23:07:48 +0200	[thread overview]
Message-ID: <20070529210748.GC7738@uranus.ravnborg.org> (raw)
In-Reply-To: <465C8E10.8040608@goop.org>

On Tue, May 29, 2007 at 01:33:20PM -0700, Jeremy Fitzhardinge wrote:
> .note* sections are ELF notes, which are typically used by external
> tools to examine the kernel image.  Since this is removed from any
> runtime consideration, it's OK to reference any section from a .note*
> section.
> 
> As a side-effect, this changes secref_whitelist to accept a NULL "atsym"
> pointer, allowing it to be called when "before" is NULL.  This is
> needed for .note sections since they don't necessarily have any
> symbols, and it also allows the .got2 check to to be folded into the
> normal whitelist checks.

I did it a bit different. Adding .note to init_section_ref_ok +
exit_section_ref_ok is much simpler.
Next patch will move .got2 there too.

	Sam

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 662deba..b824198 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1139,6 +1139,7 @@ static int init_section_ref_ok(const char *name)
 		".debug",
 		".parainstructions",
 		".rodata",
+		".note",		/* ignore ELF notes - may contain anything */
 		NULL
 	};
 	/* part of section name */
@@ -1214,6 +1215,7 @@ static int exit_section_ref_ok(const char *name)
 	/* Start of section names */
 	const char *namelist2[] = {
 		".debug",
+		".note",		/* ignore ELF notes - may contain anything */
 		NULL
 	};
 	/* part of section name */

  reply	other threads:[~2007-05-29 21:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-29 20:33 [PATCH] Tell modpost that any reference from .note* is OK Jeremy Fitzhardinge
2007-05-29 21:07 ` Sam Ravnborg [this message]
2007-05-29 21:13   ` Jeremy Fitzhardinge

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=20070529210748.GC7738@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=ebiederm@xmission.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.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