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]
Date:	Fri, 4 Dec 2009 22:26:02 +0600
From:	Rakib Mullick <rakib.mullick@...il.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	LKML <linux-kernel@...r.kernel.org>, x86@...nel.org
Subject: [PATCH] x86: Call __va() to get trampoline_base.

 x86, tboot: Call __va() to get trampoline_base.

 Do not pass trampoline_base as parameter of virt_to_phys.
Because trampoline_base is in .cpuinit.data section, but its
called from non-cpuinit function. So use __va(TRAMPOLINE_BASE)
instead of trampoline_base, which helps to fix section mismatch.

We were warned by the following warning:

  LD      arch/x86/kernel/built-in.o
WARNING: arch/x86/kernel/built-in.o(.text+0x13c5f): Section mismatch
in reference from the function tboot_setup_sleep() to the variable
.cpuinit.data:trampoline_base
The function tboot_setup_sleep() references
the variable __cpuinitdata trampoline_base.
This is often because tboot_setup_sleep lacks a __cpuinitdata
annotation or the annotation of trampoline_base is wrong.

Signed-off-by: Rakib Mullick <rakib.mullick@...il.com>
---

--- linus/arch/x86/kernel/tboot.c	2009-12-04 17:22:57.000000000 +0600
+++ rakib/arch/x86/kernel/tboot.c	2009-12-04 17:19:09.000000000 +0600
@@ -191,7 +191,7 @@ static int tboot_setup_sleep(void)

 #ifdef CONFIG_X86_TRAMPOLINE
 	/* AP trampoline code */
-	add_mac_region(virt_to_phys(trampoline_base), TRAMPOLINE_SIZE);
+	add_mac_region(virt_to_phys(__va(TRAMPOLINE_BASE)), TRAMPOLINE_SIZE);
 #endif

 	/* kernel code + data + bss */
--
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