[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-337e4cc84021212a87b04b77b65cccc49304909e@git.kernel.org>
Date: Sat, 30 Jan 2016 05:19:49 -0800
From: tip-bot for Borislav Petkov <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: dvlasenk@...hat.com, linux-kernel@...r.kernel.org,
mingo@...nel.org, brgerst@...il.com, tglx@...utronix.de,
hpa@...or.com, bp@...e.de, bp@...en8.de, luto@...capital.net,
peterz@...radead.org, torvalds@...ux-foundation.org
Subject: [tip:x86/asm] x86/alternatives: Add an auxilary section
Commit-ID: 337e4cc84021212a87b04b77b65cccc49304909e
Gitweb: http://git.kernel.org/tip/337e4cc84021212a87b04b77b65cccc49304909e
Author: Borislav Petkov <bp@...e.de>
AuthorDate: Tue, 26 Jan 2016 22:12:07 +0100
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Sat, 30 Jan 2016 11:22:20 +0100
x86/alternatives: Add an auxilary section
Add .altinstr_aux for additional instructions which will be used
before and/or during patching. All stuff which needs more
sophisticated patching should go there. See next patch.
Signed-off-by: Borislav Petkov <bp@...e.de>
Cc: Andy Lutomirski <luto@...capital.net>
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: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/1453842730-28463-8-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/kernel/vmlinux.lds.S | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index 74e4bf1..92dc211 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -195,6 +195,17 @@ SECTIONS
:init
#endif
+ /*
+ * Section for code used exclusively before alternatives are run. All
+ * references to such code must be patched out by alternatives, normally
+ * by using X86_FEATURE_ALWAYS CPU feature bit.
+ *
+ * See static_cpu_has() for an example.
+ */
+ .altinstr_aux : AT(ADDR(.altinstr_aux) - LOAD_OFFSET) {
+ *(.altinstr_aux)
+ }
+
INIT_DATA_SECTION(16)
.x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) {
Powered by blists - more mailing lists