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-next>] [day] [month] [year] [list]
Message-Id: <4AA0E8F60200007800013703@vpn.id2.novell.com>
Date:	Fri, 04 Sep 2009 09:16:22 +0100
From:	"Jan Beulich" <JBeulich@...ell.com>
To:	<mingo@...e.hu>, <tglx@...utronix.de>, <hpa@...or.com>
Cc:	<linux-kernel@...r.kernel.org>
Subject: [PATCH] x86: properly cpuinit-annotate SMP boot trampolines

Add missing annotations, and make use of include/linux/init.h's macros.

Signed-off-by: Jan Beulich <jbeulich@...ell.com>

---
 arch/x86/kernel/trampoline.c    |    4 ++--
 arch/x86/kernel/trampoline_32.S |    8 ++------
 arch/x86/kernel/trampoline_64.S |    5 +++--
 3 files changed, 7 insertions(+), 10 deletions(-)

--- linux-2.6.31-rc8/arch/x86/kernel/trampoline.c	2009-03-24 00:12:14.000000000 +0100
+++ 2.6.31-rc8-x86-trampoline-cpuinit/arch/x86/kernel/trampoline.c	2009-09-02 12:13:01.000000000 +0200
@@ -4,7 +4,7 @@
 #include <asm/e820.h>
 
 /* ready for x86_64 and x86 */
-unsigned char *trampoline_base = __va(TRAMPOLINE_BASE);
+unsigned char *__cpuinitdata trampoline_base = __va(TRAMPOLINE_BASE);
 
 void __init reserve_trampoline_memory(void)
 {
@@ -26,7 +26,7 @@ void __init reserve_trampoline_memory(vo
  * bootstrap into the page concerned. The caller
  * has made sure it's suitably aligned.
  */
-unsigned long setup_trampoline(void)
+unsigned long __cpuinit setup_trampoline(void)
 {
 	memcpy(trampoline_base, trampoline_data, TRAMPOLINE_SIZE);
 	return virt_to_phys(trampoline_base);
--- linux-2.6.31-rc8/arch/x86/kernel/trampoline_32.S	2009-06-10 05:05:27.000000000 +0200
+++ 2.6.31-rc8-x86-trampoline-cpuinit/arch/x86/kernel/trampoline_32.S	2009-09-02 12:13:01.000000000 +0200
@@ -28,16 +28,12 @@
  */
 
 #include <linux/linkage.h>
+#include <linux/init.h>
 #include <asm/segment.h>
 #include <asm/page_types.h>
 
 /* We can free up trampoline after bootup if cpu hotplug is not supported. */
-#ifndef CONFIG_HOTPLUG_CPU
-.section ".cpuinit.data","aw",@progbits
-#else
-.section .rodata,"a",@progbits
-#endif
-
+__CPUINITRODATA
 .code16
 
 ENTRY(trampoline_data)
--- linux-2.6.31-rc8/arch/x86/kernel/trampoline_64.S	2009-06-10 05:05:27.000000000 +0200
+++ 2.6.31-rc8-x86-trampoline-cpuinit/arch/x86/kernel/trampoline_64.S	2009-09-02 12:13:01.000000000 +0200
@@ -25,14 +25,15 @@
  */
 
 #include <linux/linkage.h>
+#include <linux/init.h>
 #include <asm/pgtable_types.h>
 #include <asm/page_types.h>
 #include <asm/msr.h>
 #include <asm/segment.h>
 #include <asm/processor-flags.h>
 
-.section .rodata, "a", @progbits
-
+/* We can free up the trampoline after bootup if cpu hotplug is not supported. */
+__CPUINITRODATA
 .code16
 
 ENTRY(trampoline_data)



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