lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1240711870-30505-15-git-send-email-tabbott@mit.edu>
Date:	Sat, 25 Apr 2009 22:11:10 -0400
From:	Tim Abbott <tabbott@....EDU>
To:	Sam Ravnborg <sam@...nborg.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Linux kernel mailing list <linux-kernel@...r.kernel.org>,
	Anders Kaseorg <andersk@....edu>,
	Waseem Daher <wdaher@....edu>,
	Denys Vlasenko <vda.linux@...glemail.com>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Andi Kleen <andi@...stfloor.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Jeff Arnold <jbarnold@....edu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jon Masters <jonathan@...masters.org>,
	Masami Hiramatsu <mhiramat@...hat.com>,
	"Theodore Ts'o" <tytso@....edu>,
	Nikanth Karthikesan <knikanth@...e.de>,
	Arjan van de Ven <arjan@...radead.org>,
	Paul Mundt <lethal@...ux-sh.org>,
	Américo Wang <xiyou.wangcong@...il.com>,
	Ralf Baechle <ralf@...ux-mips.org>,
	Kyle McMartin <kyle@...artin.ca>,
	David Howells <dhowells@...hat.com>,
	Tim Abbott <tabbott@....edu>
Subject: [PATCH 15/15] modpost: convert modpost to use HEAD_TEXT_SECTION macro.

Using the HEAD_TEXT_SECTION macro in modpost requires including a few
more files from the linux headers.

The entry in head_sections[] ".head.text*" should be ".head.text",
since only that section name is actually used by any architectures.  I
corrected this since preserving this over-broad pattern would have
involved some string concatination nastiness.

Signed-off-by: Tim Abbott <tabbott@....edu>
Cc: Rusty Russell <rusty@...tcorp.com.au>
---
 scripts/mod/modpost.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index df6e628..f93645f 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -16,6 +16,8 @@
 #include <ctype.h>
 #include "modpost.h"
 #include "../../include/linux/license.h"
+#include "../../include/linux/section-names.h"
+#include "../../include/linux/stringify.h"
 
 /* Are we using CONFIG_MODVERSIONS? */
 int modversions = 0;
@@ -818,7 +820,7 @@ static const char *symbol_white_list[] =
 	NULL
 };
 
-static const char *head_sections[] = { ".head.text*", NULL };
+static const char *head_sections[] = { __stringify(HEAD_TEXT_SECTION), NULL };
 static const char *linker_symbols[] =
 	{ "__init_begin", "_sinittext", "_einittext", NULL };
 
@@ -942,8 +944,8 @@ static int section_mismatch(const char *fromsec, const char *tosec)
  *           *probe_one, *_console, *_timer
  *
  * Pattern 3:
- *   Whitelist all refereces from .text.head to .init.data
- *   Whitelist all refereces from .text.head to .init.text
+ *   Whitelist all refereces from HEAD_TEXT_SECTION to .init.data
+ *   Whitelist all refereces from HEAD_TEXT_SECTION to .init.text
  *
  * Pattern 4:
  *   Some symbols belong to init section but still it is ok to reference
-- 
1.6.2.1

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ