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: <20070110200249.GA30676@aepfle.de>
Date:	Wed, 10 Jan 2007 21:02:49 +0100
From:	Olaf Hering <olaf@...fle.de>
To:	Linus Torvalds <torvalds@...l.org>
Cc:	Jean Delvare <khali@...ux-fr.org>,
	Roman Zippel <zippel@...ux-m68k.org>,
	Andrey Borzenkov <arvidjaar@...l.ru>,
	Andrew Morton <akpm@...l.org>, linux-kernel@...r.kernel.org,
	Andy Whitcroft <apw@...dowen.org>,
	Herbert Poetzl <herbert@...hfloor.at>
Subject: Re: .version keeps being updated

On Wed, Jan 10, Olaf Hering wrote:

> On Wed, Jan 10, Linus Torvalds wrote:
> 
> > Grr.
> 
> It did work for me for some reason, but I was wondering why it did work.

with such a change, it will always be first. Tested on powerpc.
I could even add an ELF parser and look for the first bytes in the
.rodata section.

diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 9fcc8d9..2050d8e 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -11,6 +11,11 @@ #define ALIGN_FUNCTION()  . = ALIGN(8)
 
 #define RODATA								\
 	. = ALIGN(4096);						\
+									\
+	.rodata.uts         : AT(ADDR(.data.uts) - LOAD_OFFSET) {	\
+		*(.data.uts)						\
+	}								\
+									\
 	.rodata           : AT(ADDR(.rodata) - LOAD_OFFSET) {		\
 		VMLINUX_SYMBOL(__start_rodata) = .;			\
 		*(.rodata) *(.rodata.*)					\
diff --git a/init/version.c b/init/version.c
index 9d96d36..03f5916 100644
--- a/init/version.c
+++ b/init/version.c
@@ -19,6 +19,8 @@ #define version_string(a) version(a)
 
 int version_string(LINUX_VERSION_CODE);
 
+const char __attribute__ ((__section__ (".rodata.uts"))) get_kernel_version[] = "fiXme Linux version " UTS_RELEASE;
+
 struct uts_namespace init_uts_ns = {
 	.kref = {
 		.refcount	= ATOMIC_INIT(2),
-
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