[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-e728f61ce05404a26447e6bbc1885ca5956d6a44@git.kernel.org>
Date: Thu, 20 Oct 2016 04:12:49 -0700
From: tip-bot for Josh Poimboeuf <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: hpa@...or.com, bp@...en8.de, peterz@...radead.org,
mingo@...nel.org, torvalds@...ux-foundation.org,
linux-kernel@...r.kernel.org, dvlasenk@...hat.com,
brgerst@...il.com, luto@...nel.org, jpoimboe@...hat.com,
nilayvaish@...il.com, tglx@...utronix.de
Subject: [tip:x86/asm] x86/boot: Move the _stext marker to before the boot
code
Commit-ID: e728f61ce05404a26447e6bbc1885ca5956d6a44
Gitweb: http://git.kernel.org/tip/e728f61ce05404a26447e6bbc1885ca5956d6a44
Author: Josh Poimboeuf <jpoimboe@...hat.com>
AuthorDate: Wed, 21 Sep 2016 16:04:07 -0500
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 20 Oct 2016 09:15:24 +0200
x86/boot: Move the _stext marker to before the boot code
When core_kernel_text() is used to determine whether an address on a
task's stack trace is a kernel text address, it incorrectly returns
false for early text addresses for the head code between the _text and
_stext markers. Among other things, this can cause the unwinder to
behave incorrectly when unwinding to x86 head code.
Head code is text code too, so mark it as such. This seems to match the
intent of other users of the _stext symbol, and it also seems consistent
with what other architectures are already doing.
Signed-off-by: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Nilay Vaish <nilayvaish@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/789cf978866420e72fa89df44aa2849426ac378d.1474480779.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/kernel/vmlinux.lds.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index dbf67f6..e79f15f 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -91,10 +91,10 @@ SECTIONS
/* Text and read-only data */
.text : AT(ADDR(.text) - LOAD_OFFSET) {
_text = .;
+ _stext = .;
/* bootstrapping code */
HEAD_TEXT
. = ALIGN(8);
- _stext = .;
TEXT_TEXT
SCHED_TEXT
CPUIDLE_TEXT
Powered by blists - more mailing lists