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: <1241136098-10376-9-git-send-email-tabbott@mit.edu>
Date:	Thu, 30 Apr 2009 20:01:35 -0400
From:	Tim Abbott <tabbott@....EDU>
To:	Sam Ravnborg <sam@...nborg.org>
Cc:	Linux kernel mailing list <linux-kernel@...r.kernel.org>,
	Anders Kaseorg <andersk@....edu>,
	Waseem Daher <wdaher@....edu>,
	Denys Vlasenko <vda.linux@...glemail.com>,
	Jeff Arnold <jbarnold@....edu>, Ingo Molnar <mingo@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>, Tim Abbott <tabbott@....edu>
Subject: [PATCH 08/11] x86: use new macros for .data.init_task.

.data.init_task should not need a separate output section; this change
moves it into the .data section.  This has the consequence of moving
the init_task data inside _edata, which I think should be OK.

Signed-off-by: Tim Abbott <tabbott@....edu>
Cc: Ingo Molnar <mingo@...hat.com>
---
 arch/x86/kernel/init_task.c   |    3 +--
 arch/x86/kernel/vmlinux.lds.S |   13 ++++---------
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/arch/x86/kernel/init_task.c b/arch/x86/kernel/init_task.c
index df3bf26..e0383af 100644
--- a/arch/x86/kernel/init_task.c
+++ b/arch/x86/kernel/init_task.c
@@ -21,8 +21,7 @@ struct mm_struct init_mm = INIT_MM(init_mm);
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
-union thread_union init_thread_union
-	__attribute__((__section__(".data.init_task"))) =
+union thread_union init_thread_union __init_task_data =
 		{ INIT_THREAD_INFO(init_task) };
 
 /*
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index c7d54bf..6b8a633 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -102,6 +102,7 @@ SECTIONS
 	/* Data */
 	. = ALIGN(PAGE_SIZE);
 	.data : AT(ADDR(.data) - LOAD_OFFSET) {
+		INIT_TASK_DATA(THREAD_SIZE)
 		PAGE_ALIGNED_DATA
 		NOSAVE_DATA
 #ifdef CONFIG_X86_32
@@ -205,15 +206,6 @@ SECTIONS
 
 #endif /* CONFIG_X86_64 */
 
-	/* init_task */
-	. = ALIGN(THREAD_SIZE);
-	.data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
-		*(.data.init_task)
-	}
-#ifdef CONFIG_X86_64
-	 :data.init
-#endif
-
 	/*
 	 * smp_locks might be freed after init
 	 * start/end must be page aligned
@@ -225,6 +217,9 @@ SECTIONS
 		__smp_locks_end = .;
 		. = ALIGN(PAGE_SIZE);
 	}
+#ifdef CONFIG_X86_64
+	 :data.init
+#endif
 
 	/* Init code and data - will be freed after init */
 	. = ALIGN(PAGE_SIZE);
-- 
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