Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1488394 > unrolled thread

[PATCH v2 9/9] x86: move _stext marker to before head code

Started byJosh Poimboeuf <jpoimboe@redhat.com>
First post2016-09-21 23:10 +0200
Last post2016-09-21 23:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 9/9] x86: move _stext marker to before head code Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-21 23:10 +0200

#1488394 — [PATCH v2 9/9] x86: move _stext marker to before head code

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2016-09-21 23:10 +0200
Subject[PATCH v2 9/9] x86: move _stext marker to before head code
Message-ID<sjWWd-5EH-3@gated-at.bofh.it>
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@redhat.com>
---
 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 9297a00..1d9b636 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
 		LOCK_TEXT
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web