This is a note to let you know that I've just added the patch titled
x86/paravirt, objtool: Annotate indirect calls
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
x86-paravirt-objtool-annotate-indirect-calls.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From 3010a0663fd949d122eca0561b06b0a9453f7866 Mon Sep 17 00:00:00 2001
From: Peter Zijlstra <peterz(a)infradead.org>
Date: Wed, 17 Jan 2018 16:58:11 +0100
Subject: x86/paravirt, objtool: Annotate indirect calls
From: Peter Zijlstra <peterz(a)infradead.org>
commit 3010a0663fd949d122eca0561b06b0a9453f7866 upstream.
Paravirt emits indirect calls which get flagged by objtool retpoline
checks, annotate it away because all these indirect calls will be
patched out before we start userspace.
This patching happens through alternative_instructions() ->
apply_paravirt() -> pv_init_ops.patch() which will eventually end up
in paravirt_patch_default(). This function _will_ write direct
alternatives.
Signed-off-by: Peter Zijlstra (Intel) <peterz(a)infradead.org>
Reviewed-by: David Woodhouse <dwmw(a)amazon.co.uk>
Acked-by: Thomas Gleixner <tglx(a)linutronix.de>
Acked-by: Josh Poimboeuf <jpoimboe(a)redhat.com>
Cc: Andy Lutomirski <luto(a)kernel.org>
Cc: Arjan van de Ven <arjan(a)linux.intel.com>
Cc: Borislav Petkov <bp(a)alien8.de>
Cc: Dan Williams <dan.j.williams(a)intel.com>
Cc: Dave Hansen <dave.hansen(a)linux.intel.com>
Cc: David Woodhouse <dwmw2(a)infradead.org>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Signed-off-by: Ingo Molnar <mingo(a)kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
arch/x86/include/asm/paravirt.h | 16 ++++++++++++----
arch/x86/include/asm/paravirt_types.h | 5 ++++-
2 files changed, 16 insertions(+), 5 deletions(-)
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -6,6 +6,7 @@
#ifdef CONFIG_PARAVIRT
#include <asm/pgtable_types.h>
#include <asm/asm.h>
+#include <asm/nospec-branch.h>
#include <asm/paravirt_types.h>
@@ -869,23 +870,27 @@ extern void default_banner(void);
#define INTERRUPT_RETURN \
PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_iret), CLBR_NONE, \
- jmp PARA_INDIRECT(pv_cpu_ops+PV_CPU_iret))
+ ANNOTATE_RETPOLINE_SAFE; \
+ jmp PARA_INDIRECT(pv_cpu_ops+PV_CPU_iret);)
#define DISABLE_INTERRUPTS(clobbers) \
PARA_SITE(PARA_PATCH(pv_irq_ops, PV_IRQ_irq_disable), clobbers, \
PV_SAVE_REGS(clobbers | CLBR_CALLEE_SAVE); \
+ ANNOTATE_RETPOLINE_SAFE; \
call PARA_INDIRECT(pv_irq_ops+PV_IRQ_irq_disable); \
PV_RESTORE_REGS(clobbers | CLBR_CALLEE_SAVE);)
#define ENABLE_INTERRUPTS(clobbers) \
PARA_SITE(PARA_PATCH(pv_irq_ops, PV_IRQ_irq_enable), clobbers, \
PV_SAVE_REGS(clobbers | CLBR_CALLEE_SAVE); \
+ ANNOTATE_RETPOLINE_SAFE; \
call PARA_INDIRECT(pv_irq_ops+PV_IRQ_irq_enable); \
PV_RESTORE_REGS(clobbers | CLBR_CALLEE_SAVE);)
#ifdef CONFIG_X86_32
#define GET_CR0_INTO_EAX \
push %ecx; push %edx; \
+ ANNOTATE_RETPOLINE_SAFE; \
call PARA_INDIRECT(pv_cpu_ops+PV_CPU_read_cr0); \
pop %edx; pop %ecx
#else /* !CONFIG_X86_32 */
@@ -907,11 +912,13 @@ extern void default_banner(void);
*/
#define SWAPGS \
PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_swapgs), CLBR_NONE, \
- call PARA_INDIRECT(pv_cpu_ops+PV_CPU_swapgs) \
+ ANNOTATE_RETPOLINE_SAFE; \
+ call PARA_INDIRECT(pv_cpu_ops+PV_CPU_swapgs); \
)
#define GET_CR2_INTO_RAX \
- call PARA_INDIRECT(pv_mmu_ops+PV_MMU_read_cr2)
+ ANNOTATE_RETPOLINE_SAFE; \
+ call PARA_INDIRECT(pv_mmu_ops+PV_MMU_read_cr2);
#define PARAVIRT_ADJUST_EXCEPTION_FRAME \
PARA_SITE(PARA_PATCH(pv_irq_ops, PV_IRQ_adjust_exception_frame), \
@@ -921,7 +928,8 @@ extern void default_banner(void);
#define USERGS_SYSRET64 \
PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_usergs_sysret64), \
CLBR_NONE, \
- jmp PARA_INDIRECT(pv_cpu_ops+PV_CPU_usergs_sysret64))
+ ANNOTATE_RETPOLINE_SAFE; \
+ jmp PARA_INDIRECT(pv_cpu_ops+PV_CPU_usergs_sysret64);)
#endif /* CONFIG_X86_32 */
#endif /* __ASSEMBLY__ */
--- a/arch/x86/include/asm/paravirt_types.h
+++ b/arch/x86/include/asm/paravirt_types.h
@@ -42,6 +42,7 @@
#include <asm/desc_defs.h>
#include <asm/kmap_types.h>
#include <asm/pgtable_types.h>
+#include <asm/nospec-branch.h>
struct page;
struct thread_struct;
@@ -391,7 +392,9 @@ int paravirt_disable_iospace(void);
* offset into the paravirt_patch_template structure, and can therefore be
* freely converted back into a structure offset.
*/
-#define PARAVIRT_CALL "call *%c[paravirt_opptr];"
+#define PARAVIRT_CALL \
+ ANNOTATE_RETPOLINE_SAFE \
+ "call *%c[paravirt_opptr];"
/*
* These macros are intended to wrap calls through one of the paravirt
Patches currently in stable-queue which might be from peterz(a)infradead.org are
queue-4.9/x86-boot-objtool-annotate-indirect-jump-in-secondary_startup_64.patch
queue-4.9/x86-retpoline-support-retpoline-builds-with-clang.patch
queue-4.9/revert-x86-retpoline-simplify-vmexit_fill_rsb.patch
queue-4.9/nospec-include-asm-barrier.h-dependency.patch
queue-4.9/x86-speculation-use-ibrs-if-available-before-calling-into-firmware.patch
queue-4.9/x86-speculation-objtool-annotate-indirect-calls-jumps-for-objtool.patch
queue-4.9/x86-paravirt-objtool-annotate-indirect-calls.patch
queue-4.9/nospec-kill-array_index_nospec_mask_check.patch
This is a note to let you know that I've just added the patch titled
x86/boot, objtool: Annotate indirect jump in secondary_startup_64()
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
x86-boot-objtool-annotate-indirect-jump-in-secondary_startup_64.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From bd89004f6305cbf7352238f61da093207ee518d6 Mon Sep 17 00:00:00 2001
From: Peter Zijlstra <peterz(a)infradead.org>
Date: Tue, 16 Jan 2018 10:38:09 +0100
Subject: x86/boot, objtool: Annotate indirect jump in secondary_startup_64()
From: Peter Zijlstra <peterz(a)infradead.org>
commit bd89004f6305cbf7352238f61da093207ee518d6 upstream.
The objtool retpoline validation found this indirect jump. Seeing how
it's on CPU bringup before we run userspace it should be safe, annotate
it.
Signed-off-by: Peter Zijlstra (Intel) <peterz(a)infradead.org>
Reviewed-by: David Woodhouse <dwmw(a)amazon.co.uk>
Acked-by: Thomas Gleixner <tglx(a)linutronix.de>
Acked-by: Josh Poimboeuf <jpoimboe(a)redhat.com>
Cc: Andy Lutomirski <luto(a)kernel.org>
Cc: Arjan van de Ven <arjan(a)linux.intel.com>
Cc: Borislav Petkov <bp(a)alien8.de>
Cc: Dan Williams <dan.j.williams(a)intel.com>
Cc: Dave Hansen <dave.hansen(a)linux.intel.com>
Cc: David Woodhouse <dwmw2(a)infradead.org>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Signed-off-by: Ingo Molnar <mingo(a)kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
arch/x86/kernel/head_64.S | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -22,6 +22,7 @@
#include <asm/nops.h>
#include "../entry/calling.h"
#include <asm/export.h>
+#include <asm/nospec-branch.h>
#ifdef CONFIG_PARAVIRT
#include <asm/asm-offsets.h>
@@ -200,6 +201,7 @@ ENTRY(secondary_startup_64)
/* Ensure I am executing from virtual addresses */
movq $1f, %rax
+ ANNOTATE_RETPOLINE_SAFE
jmp *%rax
1:
Patches currently in stable-queue which might be from peterz(a)infradead.org are
queue-4.9/x86-boot-objtool-annotate-indirect-jump-in-secondary_startup_64.patch
queue-4.9/x86-retpoline-support-retpoline-builds-with-clang.patch
queue-4.9/revert-x86-retpoline-simplify-vmexit_fill_rsb.patch
queue-4.9/nospec-include-asm-barrier.h-dependency.patch
queue-4.9/x86-speculation-use-ibrs-if-available-before-calling-into-firmware.patch
queue-4.9/x86-speculation-objtool-annotate-indirect-calls-jumps-for-objtool.patch
queue-4.9/x86-paravirt-objtool-annotate-indirect-calls.patch
queue-4.9/nospec-kill-array_index_nospec_mask_check.patch
This is a note to let you know that I've just added the patch titled
x86/mm/sme, objtool: Annotate indirect call in sme_encrypt_execute()
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
x86-mm-sme-objtool-annotate-indirect-call-in-sme_encrypt_execute.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From 531bb52a869a9c6e08c8d17ba955fcbfc18037ad Mon Sep 17 00:00:00 2001
From: Peter Zijlstra <peterz(a)infradead.org>
Date: Tue, 23 Jan 2018 16:18:50 +0100
Subject: x86/mm/sme, objtool: Annotate indirect call in sme_encrypt_execute()
From: Peter Zijlstra <peterz(a)infradead.org>
commit 531bb52a869a9c6e08c8d17ba955fcbfc18037ad upstream.
This is boot code and thus Spectre-safe: we run this _way_ before userspace
comes along to have a chance to poison our branch predictor.
Signed-off-by: Peter Zijlstra (Intel) <peterz(a)infradead.org>
Acked-by: Thomas Gleixner <tglx(a)linutronix.de>
Acked-by: Josh Poimboeuf <jpoimboe(a)redhat.com>
Cc: Andy Lutomirski <luto(a)kernel.org>
Cc: Arjan van de Ven <arjan(a)linux.intel.com>
Cc: Borislav Petkov <bp(a)alien8.de>
Cc: Borislav Petkov <bp(a)suse.de>
Cc: Dan Williams <dan.j.williams(a)intel.com>
Cc: Dave Hansen <dave.hansen(a)linux.intel.com>
Cc: David Woodhouse <dwmw2(a)infradead.org>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Tom Lendacky <thomas.lendacky(a)amd.com>
Signed-off-by: Ingo Molnar <mingo(a)kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
arch/x86/mm/mem_encrypt_boot.S | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/x86/mm/mem_encrypt_boot.S
+++ b/arch/x86/mm/mem_encrypt_boot.S
@@ -15,6 +15,7 @@
#include <asm/page.h>
#include <asm/processor-flags.h>
#include <asm/msr-index.h>
+#include <asm/nospec-branch.h>
.text
.code64
@@ -59,6 +60,7 @@ ENTRY(sme_encrypt_execute)
movq %rax, %r8 /* Workarea encryption routine */
addq $PAGE_SIZE, %r8 /* Workarea intermediate copy buffer */
+ ANNOTATE_RETPOLINE_SAFE
call *%rax /* Call the encryption routine */
pop %r12
Patches currently in stable-queue which might be from peterz(a)infradead.org are
queue-4.15/x86-boot-objtool-annotate-indirect-jump-in-secondary_startup_64.patch
queue-4.15/x86-retpoline-support-retpoline-builds-with-clang.patch
queue-4.15/x86-ldt-avoid-warning-in-32-bit-builds-with-older-gcc.patch
queue-4.15/x86-entry-reduce-the-code-footprint-of-the-idtentry-macro.patch
queue-4.15/bug-use-pb-in-bug-and-stack-protector-failure.patch
queue-4.15/revert-x86-retpoline-simplify-vmexit_fill_rsb.patch
queue-4.15/nospec-include-asm-barrier.h-dependency.patch
queue-4.15/x86-mm-remove-stale-comment-about-kmemcheck.patch
queue-4.15/x86-mm-sme-objtool-annotate-indirect-call-in-sme_encrypt_execute.patch
queue-4.15/x86-speculation-use-ibrs-if-available-before-calling-into-firmware.patch
queue-4.15/x86-asm-improve-how-gen_-_suffixed_rmwcc-specify-clobbers.patch
queue-4.15/x86-64-realmode-add-instruction-suffix.patch
queue-4.15/x86-speculation-objtool-annotate-indirect-calls-jumps-for-objtool.patch
queue-4.15/x86-paravirt-objtool-annotate-indirect-calls.patch
queue-4.15/x86-entry-64-use-xorl-for-faster-register-clearing.patch
queue-4.15/nospec-kill-array_index_nospec_mask_check.patch
queue-4.15/lib-bug.c-exclude-non-bug-warn-exceptions-from-report_bug.patch
queue-4.15/x86-io-apic-avoid-warning-in-32-bit-builds.patch
This is a note to let you know that I've just added the patch titled
x86/boot, objtool: Annotate indirect jump in secondary_startup_64()
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
x86-boot-objtool-annotate-indirect-jump-in-secondary_startup_64.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From bd89004f6305cbf7352238f61da093207ee518d6 Mon Sep 17 00:00:00 2001
From: Peter Zijlstra <peterz(a)infradead.org>
Date: Tue, 16 Jan 2018 10:38:09 +0100
Subject: x86/boot, objtool: Annotate indirect jump in secondary_startup_64()
From: Peter Zijlstra <peterz(a)infradead.org>
commit bd89004f6305cbf7352238f61da093207ee518d6 upstream.
The objtool retpoline validation found this indirect jump. Seeing how
it's on CPU bringup before we run userspace it should be safe, annotate
it.
Signed-off-by: Peter Zijlstra (Intel) <peterz(a)infradead.org>
Reviewed-by: David Woodhouse <dwmw(a)amazon.co.uk>
Acked-by: Thomas Gleixner <tglx(a)linutronix.de>
Acked-by: Josh Poimboeuf <jpoimboe(a)redhat.com>
Cc: Andy Lutomirski <luto(a)kernel.org>
Cc: Arjan van de Ven <arjan(a)linux.intel.com>
Cc: Borislav Petkov <bp(a)alien8.de>
Cc: Dan Williams <dan.j.williams(a)intel.com>
Cc: Dave Hansen <dave.hansen(a)linux.intel.com>
Cc: David Woodhouse <dwmw2(a)infradead.org>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Signed-off-by: Ingo Molnar <mingo(a)kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
arch/x86/kernel/head_64.S | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -23,6 +23,7 @@
#include <asm/nops.h>
#include "../entry/calling.h"
#include <asm/export.h>
+#include <asm/nospec-branch.h>
#ifdef CONFIG_PARAVIRT
#include <asm/asm-offsets.h>
@@ -134,6 +135,7 @@ ENTRY(secondary_startup_64)
/* Ensure I am executing from virtual addresses */
movq $1f, %rax
+ ANNOTATE_RETPOLINE_SAFE
jmp *%rax
1:
UNWIND_HINT_EMPTY
Patches currently in stable-queue which might be from peterz(a)infradead.org are
queue-4.15/x86-boot-objtool-annotate-indirect-jump-in-secondary_startup_64.patch
queue-4.15/x86-retpoline-support-retpoline-builds-with-clang.patch
queue-4.15/x86-ldt-avoid-warning-in-32-bit-builds-with-older-gcc.patch
queue-4.15/x86-entry-reduce-the-code-footprint-of-the-idtentry-macro.patch
queue-4.15/bug-use-pb-in-bug-and-stack-protector-failure.patch
queue-4.15/revert-x86-retpoline-simplify-vmexit_fill_rsb.patch
queue-4.15/nospec-include-asm-barrier.h-dependency.patch
queue-4.15/x86-mm-remove-stale-comment-about-kmemcheck.patch
queue-4.15/x86-mm-sme-objtool-annotate-indirect-call-in-sme_encrypt_execute.patch
queue-4.15/x86-speculation-use-ibrs-if-available-before-calling-into-firmware.patch
queue-4.15/x86-asm-improve-how-gen_-_suffixed_rmwcc-specify-clobbers.patch
queue-4.15/x86-64-realmode-add-instruction-suffix.patch
queue-4.15/x86-speculation-objtool-annotate-indirect-calls-jumps-for-objtool.patch
queue-4.15/x86-paravirt-objtool-annotate-indirect-calls.patch
queue-4.15/x86-entry-64-use-xorl-for-faster-register-clearing.patch
queue-4.15/nospec-kill-array_index_nospec_mask_check.patch
queue-4.15/lib-bug.c-exclude-non-bug-warn-exceptions-from-report_bug.patch
queue-4.15/x86-io-apic-avoid-warning-in-32-bit-builds.patch
This is a note to let you know that I've just added the patch titled
x86/mm/sme, objtool: Annotate indirect call in sme_encrypt_execute()
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
x86-mm-sme-objtool-annotate-indirect-call-in-sme_encrypt_execute.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From 531bb52a869a9c6e08c8d17ba955fcbfc18037ad Mon Sep 17 00:00:00 2001
From: Peter Zijlstra <peterz(a)infradead.org>
Date: Tue, 23 Jan 2018 16:18:50 +0100
Subject: x86/mm/sme, objtool: Annotate indirect call in sme_encrypt_execute()
From: Peter Zijlstra <peterz(a)infradead.org>
commit 531bb52a869a9c6e08c8d17ba955fcbfc18037ad upstream.
This is boot code and thus Spectre-safe: we run this _way_ before userspace
comes along to have a chance to poison our branch predictor.
Signed-off-by: Peter Zijlstra (Intel) <peterz(a)infradead.org>
Acked-by: Thomas Gleixner <tglx(a)linutronix.de>
Acked-by: Josh Poimboeuf <jpoimboe(a)redhat.com>
Cc: Andy Lutomirski <luto(a)kernel.org>
Cc: Arjan van de Ven <arjan(a)linux.intel.com>
Cc: Borislav Petkov <bp(a)alien8.de>
Cc: Borislav Petkov <bp(a)suse.de>
Cc: Dan Williams <dan.j.williams(a)intel.com>
Cc: Dave Hansen <dave.hansen(a)linux.intel.com>
Cc: David Woodhouse <dwmw2(a)infradead.org>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Tom Lendacky <thomas.lendacky(a)amd.com>
Signed-off-by: Ingo Molnar <mingo(a)kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
arch/x86/mm/mem_encrypt_boot.S | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/x86/mm/mem_encrypt_boot.S
+++ b/arch/x86/mm/mem_encrypt_boot.S
@@ -15,6 +15,7 @@
#include <asm/page.h>
#include <asm/processor-flags.h>
#include <asm/msr-index.h>
+#include <asm/nospec-branch.h>
.text
.code64
@@ -59,6 +60,7 @@ ENTRY(sme_encrypt_execute)
movq %rax, %r8 /* Workarea encryption routine */
addq $PAGE_SIZE, %r8 /* Workarea intermediate copy buffer */
+ ANNOTATE_RETPOLINE_SAFE
call *%rax /* Call the encryption routine */
pop %r12
Patches currently in stable-queue which might be from peterz(a)infradead.org are
queue-4.14/x86-boot-objtool-annotate-indirect-jump-in-secondary_startup_64.patch
queue-4.14/x86-retpoline-support-retpoline-builds-with-clang.patch
queue-4.14/x86-ldt-avoid-warning-in-32-bit-builds-with-older-gcc.patch
queue-4.14/x86-entry-reduce-the-code-footprint-of-the-idtentry-macro.patch
queue-4.14/revert-x86-retpoline-simplify-vmexit_fill_rsb.patch
queue-4.14/nospec-include-asm-barrier.h-dependency.patch
queue-4.14/x86-mm-remove-stale-comment-about-kmemcheck.patch
queue-4.14/x86-mm-sme-objtool-annotate-indirect-call-in-sme_encrypt_execute.patch
queue-4.14/x86-speculation-use-ibrs-if-available-before-calling-into-firmware.patch
queue-4.14/x86-asm-improve-how-gen_-_suffixed_rmwcc-specify-clobbers.patch
queue-4.14/x86-64-realmode-add-instruction-suffix.patch
queue-4.14/x86-speculation-objtool-annotate-indirect-calls-jumps-for-objtool.patch
queue-4.14/x86-paravirt-objtool-annotate-indirect-calls.patch
queue-4.14/x86-entry-64-use-xorl-for-faster-register-clearing.patch
queue-4.14/nospec-kill-array_index_nospec_mask_check.patch
queue-4.14/lib-bug.c-exclude-non-bug-warn-exceptions-from-report_bug.patch
This is a note to let you know that I've just added the patch titled
x86/boot, objtool: Annotate indirect jump in secondary_startup_64()
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
x86-boot-objtool-annotate-indirect-jump-in-secondary_startup_64.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From bd89004f6305cbf7352238f61da093207ee518d6 Mon Sep 17 00:00:00 2001
From: Peter Zijlstra <peterz(a)infradead.org>
Date: Tue, 16 Jan 2018 10:38:09 +0100
Subject: x86/boot, objtool: Annotate indirect jump in secondary_startup_64()
From: Peter Zijlstra <peterz(a)infradead.org>
commit bd89004f6305cbf7352238f61da093207ee518d6 upstream.
The objtool retpoline validation found this indirect jump. Seeing how
it's on CPU bringup before we run userspace it should be safe, annotate
it.
Signed-off-by: Peter Zijlstra (Intel) <peterz(a)infradead.org>
Reviewed-by: David Woodhouse <dwmw(a)amazon.co.uk>
Acked-by: Thomas Gleixner <tglx(a)linutronix.de>
Acked-by: Josh Poimboeuf <jpoimboe(a)redhat.com>
Cc: Andy Lutomirski <luto(a)kernel.org>
Cc: Arjan van de Ven <arjan(a)linux.intel.com>
Cc: Borislav Petkov <bp(a)alien8.de>
Cc: Dan Williams <dan.j.williams(a)intel.com>
Cc: Dave Hansen <dave.hansen(a)linux.intel.com>
Cc: David Woodhouse <dwmw2(a)infradead.org>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Signed-off-by: Ingo Molnar <mingo(a)kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
arch/x86/kernel/head_64.S | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -23,6 +23,7 @@
#include <asm/nops.h>
#include "../entry/calling.h"
#include <asm/export.h>
+#include <asm/nospec-branch.h>
#ifdef CONFIG_PARAVIRT
#include <asm/asm-offsets.h>
@@ -134,6 +135,7 @@ ENTRY(secondary_startup_64)
/* Ensure I am executing from virtual addresses */
movq $1f, %rax
+ ANNOTATE_RETPOLINE_SAFE
jmp *%rax
1:
UNWIND_HINT_EMPTY
Patches currently in stable-queue which might be from peterz(a)infradead.org are
queue-4.14/x86-boot-objtool-annotate-indirect-jump-in-secondary_startup_64.patch
queue-4.14/x86-retpoline-support-retpoline-builds-with-clang.patch
queue-4.14/x86-ldt-avoid-warning-in-32-bit-builds-with-older-gcc.patch
queue-4.14/x86-entry-reduce-the-code-footprint-of-the-idtentry-macro.patch
queue-4.14/revert-x86-retpoline-simplify-vmexit_fill_rsb.patch
queue-4.14/nospec-include-asm-barrier.h-dependency.patch
queue-4.14/x86-mm-remove-stale-comment-about-kmemcheck.patch
queue-4.14/x86-mm-sme-objtool-annotate-indirect-call-in-sme_encrypt_execute.patch
queue-4.14/x86-speculation-use-ibrs-if-available-before-calling-into-firmware.patch
queue-4.14/x86-asm-improve-how-gen_-_suffixed_rmwcc-specify-clobbers.patch
queue-4.14/x86-64-realmode-add-instruction-suffix.patch
queue-4.14/x86-speculation-objtool-annotate-indirect-calls-jumps-for-objtool.patch
queue-4.14/x86-paravirt-objtool-annotate-indirect-calls.patch
queue-4.14/x86-entry-64-use-xorl-for-faster-register-clearing.patch
queue-4.14/nospec-kill-array_index_nospec_mask_check.patch
queue-4.14/lib-bug.c-exclude-non-bug-warn-exceptions-from-report_bug.patch