Skip to content

Commit 571d4e9

Browse files
suryasaimadhunumbqq
authored andcommitted
x86/alternatives: Add an auxilary section
commit 337e4cc upstream 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 <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Brian Gerst <[email protected]> Cc: Denys Vlasenko <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Srivatsa S. Bhat <[email protected]> Reviewed-by: Matt Helsley (VMware) <[email protected]> Reviewed-by: Alexey Makhalov <[email protected]> Reviewed-by: Bo Gan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e5075f7 commit 571d4e9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

arch/x86/kernel/vmlinux.lds.S

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,17 @@ SECTIONS
200200
:init
201201
#endif
202202

203+
/*
204+
* Section for code used exclusively before alternatives are run. All
205+
* references to such code must be patched out by alternatives, normally
206+
* by using X86_FEATURE_ALWAYS CPU feature bit.
207+
*
208+
* See static_cpu_has() for an example.
209+
*/
210+
.altinstr_aux : AT(ADDR(.altinstr_aux) - LOAD_OFFSET) {
211+
*(.altinstr_aux)
212+
}
213+
203214
INIT_DATA_SECTION(16)
204215

205216
.x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) {

0 commit comments

Comments
 (0)