* [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y
@ 2018-07-14 9:25 Srivatsa S. Bhat
2018-07-14 9:31 ` [PATCH 4.4.y 035/101] x86/speculation: Update Speculation Control microcode blacklist Srivatsa S. Bhat
` (7 more replies)
0 siblings, 8 replies; 21+ messages in thread
From: Srivatsa S. Bhat @ 2018-07-14 9:25 UTC (permalink / raw)
To: gregkh, stable
Cc: Dave Hansen, srivatsa, Wanpeng Li, Andi Kleen, linux-tip-commits,
Piotr Luc, Mel Gorman, arjan.van.de.ven, xen-devel,
Alexander Sergeyev, Brian Gerst, luto, MickaëlSalaün,
Thomas Gleixner, Joe Konno, Laura Abbott, Will Drewry,
Jiri Kosina, linux-kernel, Jia Zhang, Andrew Morton,
Linus Torvalds, David Woodhouse, KarimAllah Ahmed
Hi Greg,
This patch series is a backport of the Spectre-v2 fixes (IBPB/IBRS)
and patches for the Speculative Store Bypass vulnerability to 4.4.y
(they apply cleanly on top of 4.4.140).
I used 4.9.y as my reference when backporting to 4.4.y (as I thought
that would minimize the amount of fixing up necessary). Unfortunately
I had to skip the KVM fixes for these vulnerabilities, as the KVM
codebase is drastically different in 4.4 as compared to 4.9. (I tried
my best to backport them initially, but wasn't confident that they
were correct, so I decided to drop them from this series).
You'll notice that the initial few patches in this series include
cleanups etc., that are non-critical to IBPB/IBRS/SSBD. Most of these
patches are aimed at getting the cpufeature.h vs cpufeatures.h split
into 4.4, since a lot of the subsequent patches update these headers.
On my first attempt to backport these patches to 4.4.y, I had actually
tried to do all the updates on the cpufeature.h file itself, but it
started getting very cumbersome, so I resorted to backporting the
cpufeature.h vs cpufeatures.h split and their dependencies as well. I
think apart from these initial patches, the rest of the patchset
doesn't have all that much noise.
This patchset has been tested on both Intel and AMD machines (Intel
Xeon CPU E5-2660 v4 and AMD EPYC 7281 16-Core Processor, respectively)
with updated microcode. All the patch backports have been
independently reviewed by Matt Helsley, Alexey Makhalov and Bo Gan.
I would appreciate if you could kindly consider these patches for
review and inclusion in a future 4.4.y release.
Thank you very much!
Regards,
Srivatsa
VMware Photon OS
P.S. This patchset is also available in the following repo if anyone
is interested in giving it a try:
https://github.com/srivatsabhat/linux-stable spectre-v2-fixes-nokvm-4.4.140
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 4.4.y 035/101] x86/speculation: Update Speculation Control microcode blacklist
2018-07-14 9:25 [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y Srivatsa S. Bhat
@ 2018-07-14 9:31 ` Srivatsa S. Bhat
2018-07-14 9:31 ` [PATCH 4.4.y 036/101] x86/speculation: Correct Speculation Control microcode blacklist again Srivatsa S. Bhat
` (6 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Srivatsa S. Bhat @ 2018-07-14 9:31 UTC (permalink / raw)
To: gregkh, stable
Cc: David Woodhouse, Andy Lutomirski, Arjan van de Ven,
Borislav Petkov, Dan Williams, Dave Hansen, David Woodhouse,
Josh Poimboeuf, Linus Torvalds, Peter Zijlstra, Thomas Gleixner,
arjan.van.de.ven, jmattson, karahmed, kvm, pbonzini, rkrcmar,
sironi, Ingo Molnar, Matt Helsley (VMware), Alexey Makhalov,
Bo Gan, matt.helsley
From: David Woodhouse <dwmw@amazon.co.uk>
commit 1751342095f0d2b36fa8114d8e12c5688c455ac4 upstream.
Intel have retroactively blessed the 0xc2 microcode on Skylake mobile
and desktop parts, and the Gemini Lake 0x22 microcode is apparently fine
too. We blacklisted the latter purely because it was present with all
the other problematic ones in the 2018-01-08 release, but now it's
explicitly listed as OK.
We still list 0x84 for the various Kaby Lake / Coffee Lake parts, as
that appeared in one version of the blacklist and then reverted to
0x80 again. We can change it if 0x84 is actually announced to be safe.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: arjan.van.de.ven@intel.com
Cc: jmattson@google.com
Cc: karahmed@amazon.de
Cc: kvm@vger.kernel.org
Cc: pbonzini@redhat.com
Cc: rkrcmar@redhat.com
Cc: sironi@amazon.de
Link: http://lkml.kernel.org/r/1518305967-31356-2-git-send-email-dwmw@amazon.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Srivatsa S. Bhat <srivatsa@csail.mit.edu>
Reviewed-by: Matt Helsley (VMware) <matt.helsley@gmail.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
Reviewed-by: Bo Gan <ganb@vmware.com>
---
arch/x86/kernel/cpu/intel.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index 0f13189..71492d2 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -47,8 +47,6 @@ static const struct sku_microcode spectre_bad_microcodes[] = {
{ INTEL_FAM6_KABYLAKE_MOBILE, 0x09, 0x84 },
{ INTEL_FAM6_SKYLAKE_X, 0x03, 0x0100013e },
{ INTEL_FAM6_SKYLAKE_X, 0x04, 0x0200003c },
- { INTEL_FAM6_SKYLAKE_MOBILE, 0x03, 0xc2 },
- { INTEL_FAM6_SKYLAKE_DESKTOP, 0x03, 0xc2 },
{ INTEL_FAM6_BROADWELL_CORE, 0x04, 0x28 },
{ INTEL_FAM6_BROADWELL_GT3E, 0x01, 0x1b },
{ INTEL_FAM6_BROADWELL_XEON_D, 0x02, 0x14 },
@@ -60,8 +58,6 @@ static const struct sku_microcode spectre_bad_microcodes[] = {
{ INTEL_FAM6_HASWELL_X, 0x02, 0x3b },
{ INTEL_FAM6_HASWELL_X, 0x04, 0x10 },
{ INTEL_FAM6_IVYBRIDGE_X, 0x04, 0x42a },
- /* Updated in the 20180108 release; blacklist until we know otherwise */
- { INTEL_FAM6_ATOM_GEMINI_LAKE, 0x01, 0x22 },
/* Observed in the wild */
{ INTEL_FAM6_SANDYBRIDGE_X, 0x06, 0x61b },
{ INTEL_FAM6_SANDYBRIDGE_X, 0x07, 0x712 },
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 4.4.y 036/101] x86/speculation: Correct Speculation Control microcode blacklist again
2018-07-14 9:25 [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y Srivatsa S. Bhat
2018-07-14 9:31 ` [PATCH 4.4.y 035/101] x86/speculation: Update Speculation Control microcode blacklist Srivatsa S. Bhat
@ 2018-07-14 9:31 ` Srivatsa S. Bhat
2018-07-14 9:32 ` [PATCH 4.4.y 044/101] x86/spectre_v2: Don't check microcode versions when running under hypervisors Srivatsa S. Bhat
` (5 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Srivatsa S. Bhat @ 2018-07-14 9:31 UTC (permalink / raw)
To: gregkh, stable
Cc: David Woodhouse, Andy Lutomirski, Arjan van de Ven,
Borislav Petkov, Dan Williams, Dave Hansen, David Woodhouse,
Josh Poimboeuf, Linus Torvalds, Peter Zijlstra, Thomas Gleixner,
arjan.van.de.ven, dave.hansen, kvm, pbonzini, Ingo Molnar,
Matt Helsley (VMware), Alexey Makhalov, Bo Gan, matt.helsley,
rostedt, amakhalov, ganb
From: David Woodhouse <dwmw@amazon.co.uk>
commit d37fc6d360a404b208547ba112e7dabb6533c7fc upstream.
Arjan points out that the Intel document only clears the 0xc2 microcode
on *some* parts with CPUID 506E3 (INTEL_FAM6_SKYLAKE_DESKTOP stepping 3).
For the Skylake H/S platform it's OK but for Skylake E3 which has the
same CPUID it isn't (yet) cleared.
So removing it from the blacklist was premature. Put it back for now.
Also, Arjan assures me that the 0x84 microcode for Kaby Lake which was
featured in one of the early revisions of the Intel document was never
released to the public, and won't be until/unless it is also validated
as safe. So those can change to 0x80 which is what all *other* versions
of the doc have identified.
Once the retrospective testing of existing public microcodes is done, we
should be back into a mode where new microcodes are only released in
batches and we shouldn't even need to update the blacklist for those
anyway, so this tweaking of the list isn't expected to be a thing which
keeps happening.
Requested-by: Arjan van de Ven <arjan.van.de.ven@intel.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: arjan.van.de.ven@intel.com
Cc: dave.hansen@intel.com
Cc: kvm@vger.kernel.org
Cc: pbonzini@redhat.com
Link: http://lkml.kernel.org/r/1518449255-2182-1-git-send-email-dwmw@amazon.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Srivatsa S. Bhat <srivatsa@csail.mit.edu>
Reviewed-by: Matt Helsley (VMware) <matt.helsley@gmail.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
Reviewed-by: Bo Gan <ganb@vmware.com>
---
arch/x86/kernel/cpu/intel.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index 71492d2..b69d258 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -40,13 +40,14 @@ struct sku_microcode {
u32 microcode;
};
static const struct sku_microcode spectre_bad_microcodes[] = {
- { INTEL_FAM6_KABYLAKE_DESKTOP, 0x0B, 0x84 },
- { INTEL_FAM6_KABYLAKE_DESKTOP, 0x0A, 0x84 },
- { INTEL_FAM6_KABYLAKE_DESKTOP, 0x09, 0x84 },
- { INTEL_FAM6_KABYLAKE_MOBILE, 0x0A, 0x84 },
- { INTEL_FAM6_KABYLAKE_MOBILE, 0x09, 0x84 },
+ { INTEL_FAM6_KABYLAKE_DESKTOP, 0x0B, 0x80 },
+ { INTEL_FAM6_KABYLAKE_DESKTOP, 0x0A, 0x80 },
+ { INTEL_FAM6_KABYLAKE_DESKTOP, 0x09, 0x80 },
+ { INTEL_FAM6_KABYLAKE_MOBILE, 0x0A, 0x80 },
+ { INTEL_FAM6_KABYLAKE_MOBILE, 0x09, 0x80 },
{ INTEL_FAM6_SKYLAKE_X, 0x03, 0x0100013e },
{ INTEL_FAM6_SKYLAKE_X, 0x04, 0x0200003c },
+ { INTEL_FAM6_SKYLAKE_DESKTOP, 0x03, 0xc2 },
{ INTEL_FAM6_BROADWELL_CORE, 0x04, 0x28 },
{ INTEL_FAM6_BROADWELL_GT3E, 0x01, 0x1b },
{ INTEL_FAM6_BROADWELL_XEON_D, 0x02, 0x14 },
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 4.4.y 044/101] x86/spectre_v2: Don't check microcode versions when running under hypervisors
2018-07-14 9:25 [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y Srivatsa S. Bhat
2018-07-14 9:31 ` [PATCH 4.4.y 035/101] x86/speculation: Update Speculation Control microcode blacklist Srivatsa S. Bhat
2018-07-14 9:31 ` [PATCH 4.4.y 036/101] x86/speculation: Correct Speculation Control microcode blacklist again Srivatsa S. Bhat
@ 2018-07-14 9:32 ` Srivatsa S. Bhat
2018-07-14 9:32 ` [PATCH 4.4.y 045/101] x86/speculation: Use IBRS if available before calling into firmware Srivatsa S. Bhat
` (4 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Srivatsa S. Bhat @ 2018-07-14 9:32 UTC (permalink / raw)
To: gregkh, stable
Cc: Konrad Rzeszutek Wilk, Thomas Gleixner, Paolo Bonzini, Wanpeng Li,
kvm, Krčmář, Borislav Petkov, H. Peter Anvin,
Matt Helsley (VMware), Alexey Makhalov, Bo Gan, matt.helsley,
rostedt, amakhalov, ganb, srivatsa, srivatsab
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
commit 36268223c1e9981d6cfc33aff8520b3bde4b8114 upstream.
As:
1) It's known that hypervisors lie about the environment anyhow (host
mismatch)
2) Even if the hypervisor (Xen, KVM, VMWare, etc) provided a valid
"correct" value, it all gets to be very murky when migration happens
(do you provide the "new" microcode of the machine?).
And in reality the cloud vendors are the ones that should make sure that
the microcode that is running is correct and we should just sing lalalala
and trust them.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Wanpeng Li <kernellwp@gmail.com>
Cc: kvm <kvm@vger.kernel.org>
Cc: Krčmář <rkrcmar@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20180226213019.GE9497@char.us.oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Srivatsa S. Bhat <srivatsa@csail.mit.edu>
Reviewed-by: Matt Helsley (VMware) <matt.helsley@gmail.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
Reviewed-by: Bo Gan <ganb@vmware.com>
---
arch/x86/kernel/cpu/intel.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index b69d258..dcc0349 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -68,6 +68,13 @@ static bool bad_spectre_microcode(struct cpuinfo_x86 *c)
{
int i;
+ /*
+ * We know that the hypervisor lie to us on the microcode version so
+ * we may as well hope that it is running the correct version.
+ */
+ if (cpu_has(c, X86_FEATURE_HYPERVISOR))
+ return false;
+
for (i = 0; i < ARRAY_SIZE(spectre_bad_microcodes); i++) {
if (c->x86_model == spectre_bad_microcodes[i].model &&
c->x86_mask == spectre_bad_microcodes[i].stepping)
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 4.4.y 045/101] x86/speculation: Use IBRS if available before calling into firmware
2018-07-14 9:25 [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y Srivatsa S. Bhat
` (2 preceding siblings ...)
2018-07-14 9:32 ` [PATCH 4.4.y 044/101] x86/spectre_v2: Don't check microcode versions when running under hypervisors Srivatsa S. Bhat
@ 2018-07-14 9:32 ` Srivatsa S. Bhat
2018-07-14 9:32 ` [PATCH 4.4.y 046/101] x86/speculation: Move firmware_restrict_branch_speculation_*() from C to CPP Srivatsa S. Bhat
` (3 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Srivatsa S. Bhat @ 2018-07-14 9:32 UTC (permalink / raw)
To: gregkh, stable
Cc: David Woodhouse, Thomas Gleixner, Linus Torvalds, Peter Zijlstra,
arjan.van.de.ven, bp, dave.hansen, jmattson, karahmed, kvm,
pbonzini, rkrcmar, Ingo Molnar, Matt Helsley (VMware),
Alexey Makhalov, Bo Gan, matt.helsley, rostedt, amakhalov, ganb,
srivatsa, srivatsab
From: David Woodhouse <dwmw@amazon.co.uk>
commit dd84441a797150dcc49298ec95c459a8891d8bb1 upstream.
Retpoline means the kernel is safe because it has no indirect branches.
But firmware isn't, so use IBRS for firmware calls if it's available.
Block preemption while IBRS is set, although in practice the call sites
already had to be doing that.
Ignore hpwdt.c for now. It's taking spinlocks and calling into firmware
code, from an NMI handler. I don't want to touch that with a bargepole.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: arjan.van.de.ven@intel.com
Cc: bp@alien8.de
Cc: dave.hansen@intel.com
Cc: jmattson@google.com
Cc: karahmed@amazon.de
Cc: kvm@vger.kernel.org
Cc: pbonzini@redhat.com
Cc: rkrcmar@redhat.com
Link: http://lkml.kernel.org/r/1519037457-7643-2-git-send-email-dwmw@amazon.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Srivatsa: Backported to 4.4.y, patching the efi_call_virt() family of functions,
which are the 4.4.y-equivalents of arch_efi_call_virt_setup()/teardown() ]
Signed-off-by: Srivatsa S. Bhat <srivatsa@csail.mit.edu>
Reviewed-by: Matt Helsley (VMware) <matt.helsley@gmail.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
Reviewed-by: Bo Gan <ganb@vmware.com>
---
arch/x86/include/asm/apm.h | 6 +++++
arch/x86/include/asm/cpufeatures.h | 1 +
arch/x86/include/asm/efi.h | 7 ++++++
arch/x86/include/asm/nospec-branch.h | 39 ++++++++++++++++++++++++++--------
arch/x86/kernel/cpu/bugs.c | 12 ++++++++++
arch/x86/platform/efi/efi_64.c | 3 +++
6 files changed, 58 insertions(+), 10 deletions(-)
diff --git a/arch/x86/include/asm/apm.h b/arch/x86/include/asm/apm.h
index 20370c6..3d1ec41 100644
--- a/arch/x86/include/asm/apm.h
+++ b/arch/x86/include/asm/apm.h
@@ -6,6 +6,8 @@
#ifndef _ASM_X86_MACH_DEFAULT_APM_H
#define _ASM_X86_MACH_DEFAULT_APM_H
+#include <asm/nospec-branch.h>
+
#ifdef APM_ZERO_SEGS
# define APM_DO_ZERO_SEGS \
"pushl %%ds\n\t" \
@@ -31,6 +33,7 @@ static inline void apm_bios_call_asm(u32 func, u32 ebx_in, u32 ecx_in,
* N.B. We do NOT need a cld after the BIOS call
* because we always save and restore the flags.
*/
+ firmware_restrict_branch_speculation_start();
__asm__ __volatile__(APM_DO_ZERO_SEGS
"pushl %%edi\n\t"
"pushl %%ebp\n\t"
@@ -43,6 +46,7 @@ static inline void apm_bios_call_asm(u32 func, u32 ebx_in, u32 ecx_in,
"=S" (*esi)
: "a" (func), "b" (ebx_in), "c" (ecx_in)
: "memory", "cc");
+ firmware_restrict_branch_speculation_end();
}
static inline u8 apm_bios_call_simple_asm(u32 func, u32 ebx_in,
@@ -55,6 +59,7 @@ static inline u8 apm_bios_call_simple_asm(u32 func, u32 ebx_in,
* N.B. We do NOT need a cld after the BIOS call
* because we always save and restore the flags.
*/
+ firmware_restrict_branch_speculation_start();
__asm__ __volatile__(APM_DO_ZERO_SEGS
"pushl %%edi\n\t"
"pushl %%ebp\n\t"
@@ -67,6 +72,7 @@ static inline u8 apm_bios_call_simple_asm(u32 func, u32 ebx_in,
"=S" (si)
: "a" (func), "b" (ebx_in), "c" (ecx_in)
: "memory", "cc");
+ firmware_restrict_branch_speculation_end();
return error;
}
diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
index 782005d..bc76bf3 100644
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -202,6 +202,7 @@
#define X86_FEATURE_KAISER ( 7*32+31) /* CONFIG_PAGE_TABLE_ISOLATION w/o nokaiser */
#define X86_FEATURE_USE_IBPB ( 7*32+21) /* "" Indirect Branch Prediction Barrier enabled*/
+#define X86_FEATURE_USE_IBRS_FW ( 7*32+22) /* "" Use IBRS during runtime firmware calls */
/* Virtualization flags: Linux defined, word 8 */
#define X86_FEATURE_TPR_SHADOW ( 8*32+ 0) /* Intel TPR Shadow */
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
index 0010c78..7e5a2ff 100644
--- a/arch/x86/include/asm/efi.h
+++ b/arch/x86/include/asm/efi.h
@@ -3,6 +3,7 @@
#include <asm/fpu/api.h>
#include <asm/pgtable.h>
+#include <asm/nospec-branch.h>
/*
* We map the EFI regions needed for runtime services non-contiguously,
@@ -39,8 +40,10 @@ extern unsigned long asmlinkage efi_call_phys(void *, ...);
({ \
efi_status_t __s; \
kernel_fpu_begin(); \
+ firmware_restrict_branch_speculation_start(); \
__s = ((efi_##f##_t __attribute__((regparm(0)))*) \
efi.systab->runtime->f)(args); \
+ firmware_restrict_branch_speculation_end(); \
kernel_fpu_end(); \
__s; \
})
@@ -49,8 +52,10 @@ extern unsigned long asmlinkage efi_call_phys(void *, ...);
#define __efi_call_virt(f, args...) \
({ \
kernel_fpu_begin(); \
+ firmware_restrict_branch_speculation_start(); \
((efi_##f##_t __attribute__((regparm(0)))*) \
efi.systab->runtime->f)(args); \
+ firmware_restrict_branch_speculation_end(); \
kernel_fpu_end(); \
})
@@ -71,7 +76,9 @@ extern u64 asmlinkage efi_call(void *fp, ...);
efi_sync_low_kernel_mappings(); \
preempt_disable(); \
__kernel_fpu_begin(); \
+ firmware_restrict_branch_speculation_start(); \
__s = efi_call((void *)efi.systab->runtime->f, __VA_ARGS__); \
+ firmware_restrict_branch_speculation_end(); \
__kernel_fpu_end(); \
preempt_enable(); \
__s; \
diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h
index bca2860..36ded24 100644
--- a/arch/x86/include/asm/nospec-branch.h
+++ b/arch/x86/include/asm/nospec-branch.h
@@ -195,17 +195,38 @@ static inline void vmexit_fill_RSB(void)
#endif
}
+#define alternative_msr_write(_msr, _val, _feature) \
+ asm volatile(ALTERNATIVE("", \
+ "movl %[msr], %%ecx\n\t" \
+ "movl %[val], %%eax\n\t" \
+ "movl $0, %%edx\n\t" \
+ "wrmsr", \
+ _feature) \
+ : : [msr] "i" (_msr), [val] "i" (_val) \
+ : "eax", "ecx", "edx", "memory")
+
static inline void indirect_branch_prediction_barrier(void)
{
- asm volatile(ALTERNATIVE("",
- "movl %[msr], %%ecx\n\t"
- "movl %[val], %%eax\n\t"
- "movl $0, %%edx\n\t"
- "wrmsr",
- X86_FEATURE_USE_IBPB)
- : : [msr] "i" (MSR_IA32_PRED_CMD),
- [val] "i" (PRED_CMD_IBPB)
- : "eax", "ecx", "edx", "memory");
+ alternative_msr_write(MSR_IA32_PRED_CMD, PRED_CMD_IBPB,
+ X86_FEATURE_USE_IBPB);
+}
+
+/*
+ * With retpoline, we must use IBRS to restrict branch prediction
+ * before calling into firmware.
+ */
+static inline void firmware_restrict_branch_speculation_start(void)
+{
+ preempt_disable();
+ alternative_msr_write(MSR_IA32_SPEC_CTRL, SPEC_CTRL_IBRS,
+ X86_FEATURE_USE_IBRS_FW);
+}
+
+static inline void firmware_restrict_branch_speculation_end(void)
+{
+ alternative_msr_write(MSR_IA32_SPEC_CTRL, 0,
+ X86_FEATURE_USE_IBRS_FW);
+ preempt_enable();
}
#endif /* __ASSEMBLY__ */
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index fea368d..b294fdc 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -300,6 +300,15 @@ retpoline_auto:
setup_force_cpu_cap(X86_FEATURE_USE_IBPB);
pr_info("Spectre v2 mitigation: Enabling Indirect Branch Prediction Barrier\n");
}
+
+ /*
+ * Retpoline means the kernel is safe because it has no indirect
+ * branches. But firmware isn't, so use IBRS to protect that.
+ */
+ if (boot_cpu_has(X86_FEATURE_IBRS)) {
+ setup_force_cpu_cap(X86_FEATURE_USE_IBRS_FW);
+ pr_info("Enabling Restricted Speculation for firmware calls\n");
+ }
}
#undef pr_fmt
@@ -326,8 +335,9 @@ ssize_t cpu_show_spectre_v2(struct device *dev, struct device_attribute *attr, c
if (!boot_cpu_has_bug(X86_BUG_SPECTRE_V2))
return sprintf(buf, "Not affected\n");
- return sprintf(buf, "%s%s%s\n", spectre_v2_strings[spectre_v2_enabled],
+ return sprintf(buf, "%s%s%s%s\n", spectre_v2_strings[spectre_v2_enabled],
boot_cpu_has(X86_FEATURE_USE_IBPB) ? ", IBPB" : "",
+ boot_cpu_has(X86_FEATURE_USE_IBRS_FW) ? ", IBRS_FW" : "",
spectre_v2_module_string());
}
#endif
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index a0ac0f9..f5a8cd9 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -40,6 +40,7 @@
#include <asm/fixmap.h>
#include <asm/realmode.h>
#include <asm/time.h>
+#include <asm/nospec-branch.h>
/*
* We allocate runtime services regions bottom-up, starting from -4G, i.e.
@@ -347,6 +348,7 @@ extern efi_status_t efi64_thunk(u32, ...);
\
efi_sync_low_kernel_mappings(); \
local_irq_save(flags); \
+ firmware_restrict_branch_speculation_start(); \
\
efi_scratch.prev_cr3 = read_cr3(); \
write_cr3((unsigned long)efi_scratch.efi_pgt); \
@@ -357,6 +359,7 @@ extern efi_status_t efi64_thunk(u32, ...);
\
write_cr3(efi_scratch.prev_cr3); \
__flush_tlb_all(); \
+ firmware_restrict_branch_speculation_end(); \
local_irq_restore(flags); \
\
__s; \
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 4.4.y 046/101] x86/speculation: Move firmware_restrict_branch_speculation_*() from C to CPP
2018-07-14 9:25 [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y Srivatsa S. Bhat
` (3 preceding siblings ...)
2018-07-14 9:32 ` [PATCH 4.4.y 045/101] x86/speculation: Use IBRS if available before calling into firmware Srivatsa S. Bhat
@ 2018-07-14 9:32 ` Srivatsa S. Bhat
2018-07-15 11:26 ` [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y Greg KH
` (2 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Srivatsa S. Bhat @ 2018-07-14 9:32 UTC (permalink / raw)
To: gregkh, stable
Cc: David Woodhouse, Thomas Gleixner, Linus Torvalds, Peter Zijlstra,
arjan.van.de.ven, bp, dave.hansen, jmattson, karahmed, kvm,
pbonzini, rkrcmar, linux-kernel, Ingo Molnar,
Matt Helsley (VMware), Alexey Makhalov, Bo Gan, matt.helsley,
rostedt, amakhalov, ganb, srivatsa, srivatsab
From: Ingo Molnar <mingo@kernel.org>
commit d72f4e29e6d84b7ec02ae93088aa459ac70e733b upstream.
firmware_restrict_branch_speculation_*() recently started using
preempt_enable()/disable(), but those are relatively high level
primitives and cause build failures on some 32-bit builds.
Since we want to keep <asm/nospec-branch.h> low level, convert
them to macros to avoid header hell...
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: arjan.van.de.ven@intel.com
Cc: bp@alien8.de
Cc: dave.hansen@intel.com
Cc: jmattson@google.com
Cc: karahmed@amazon.de
Cc: kvm@vger.kernel.org
Cc: pbonzini@redhat.com
Cc: rkrcmar@redhat.com
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Srivatsa S. Bhat <srivatsa@csail.mit.edu>
Reviewed-by: Matt Helsley (VMware) <matt.helsley@gmail.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
Reviewed-by: Bo Gan <ganb@vmware.com>
---
arch/x86/include/asm/nospec-branch.h | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h
index 36ded24..b9dd1d9 100644
--- a/arch/x86/include/asm/nospec-branch.h
+++ b/arch/x86/include/asm/nospec-branch.h
@@ -214,20 +214,22 @@ static inline void indirect_branch_prediction_barrier(void)
/*
* With retpoline, we must use IBRS to restrict branch prediction
* before calling into firmware.
+ *
+ * (Implemented as CPP macros due to header hell.)
*/
-static inline void firmware_restrict_branch_speculation_start(void)
-{
- preempt_disable();
- alternative_msr_write(MSR_IA32_SPEC_CTRL, SPEC_CTRL_IBRS,
- X86_FEATURE_USE_IBRS_FW);
-}
+#define firmware_restrict_branch_speculation_start() \
+do { \
+ preempt_disable(); \
+ alternative_msr_write(MSR_IA32_SPEC_CTRL, SPEC_CTRL_IBRS, \
+ X86_FEATURE_USE_IBRS_FW); \
+} while (0)
-static inline void firmware_restrict_branch_speculation_end(void)
-{
- alternative_msr_write(MSR_IA32_SPEC_CTRL, 0,
- X86_FEATURE_USE_IBRS_FW);
- preempt_enable();
-}
+#define firmware_restrict_branch_speculation_end() \
+do { \
+ alternative_msr_write(MSR_IA32_SPEC_CTRL, 0, \
+ X86_FEATURE_USE_IBRS_FW); \
+ preempt_enable(); \
+} while (0)
#endif /* __ASSEMBLY__ */
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y
2018-07-14 9:25 [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y Srivatsa S. Bhat
` (4 preceding siblings ...)
2018-07-14 9:32 ` [PATCH 4.4.y 046/101] x86/speculation: Move firmware_restrict_branch_speculation_*() from C to CPP Srivatsa S. Bhat
@ 2018-07-15 11:26 ` Greg KH
2018-07-16 8:02 ` Srivatsa S. Bhat
2018-07-23 11:26 ` Greg KH
2018-07-23 22:06 ` Jiri Kosina
7 siblings, 1 reply; 21+ messages in thread
From: Greg KH @ 2018-07-15 11:26 UTC (permalink / raw)
To: Srivatsa S. Bhat
Cc: Dave Hansen, Wanpeng Li, ak, linux-tip-commits, Piotr Luc,
Mel Gorman, arjan.van.de.ven, xen-devel, Alexander Sergeyev,
Brian Gerst, Andy Lutomirski, MickaëlSalaün,
Thomas Gleixner, Joe Konno, Laura Abbott, Will Drewry,
Jiri Kosina, linux-kernel, Jia Zhang, Andrew Morton, torvalds,
dwmw, karahmed, dave.hansen, linux, Bo Gan
On Sat, Jul 14, 2018 at 02:25:43AM -0700, Srivatsa S. Bhat wrote:
> Hi Greg,
>
> This patch series is a backport of the Spectre-v2 fixes (IBPB/IBRS)
> and patches for the Speculative Store Bypass vulnerability to 4.4.y
> (they apply cleanly on top of 4.4.140).
>
> I used 4.9.y as my reference when backporting to 4.4.y (as I thought
> that would minimize the amount of fixing up necessary). Unfortunately
> I had to skip the KVM fixes for these vulnerabilities, as the KVM
> codebase is drastically different in 4.4 as compared to 4.9. (I tried
> my best to backport them initially, but wasn't confident that they
> were correct, so I decided to drop them from this series).
>
> You'll notice that the initial few patches in this series include
> cleanups etc., that are non-critical to IBPB/IBRS/SSBD. Most of these
> patches are aimed at getting the cpufeature.h vs cpufeatures.h split
> into 4.4, since a lot of the subsequent patches update these headers.
> On my first attempt to backport these patches to 4.4.y, I had actually
> tried to do all the updates on the cpufeature.h file itself, but it
> started getting very cumbersome, so I resorted to backporting the
> cpufeature.h vs cpufeatures.h split and their dependencies as well. I
> think apart from these initial patches, the rest of the patchset
> doesn't have all that much noise.
I've applied the "initial" patches to the 4.4-stable queue right now, as
those were all just "housekeeping" stuff. I'll let others review the
rest of the series this week and see if anyone objects before throwing
them at the test-bots.
Many thanks for doing all of this work.
greg k-h
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y
2018-07-15 11:26 ` [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y Greg KH
@ 2018-07-16 8:02 ` Srivatsa S. Bhat
0 siblings, 0 replies; 21+ messages in thread
From: Srivatsa S. Bhat @ 2018-07-16 8:02 UTC (permalink / raw)
To: Greg KH
Cc: Dave Hansen, Wanpeng Li, ak, linux-tip-commits, Piotr Luc,
Mel Gorman, arjan.van.de.ven, xen-devel, Alexander Sergeyev,
Brian Gerst, Andy Lutomirski, MickaëlSalaün,
Thomas Gleixner, Joe Konno, Laura Abbott, Will Drewry,
Jiri Kosina, linux-kernel, Jia Zhang, Andrew Morton, torvalds,
dwmw, karahmed, dave.hansen, linux, Bo Gan
On 7/15/18 4:26 AM, Greg KH wrote:
> On Sat, Jul 14, 2018 at 02:25:43AM -0700, Srivatsa S. Bhat wrote:
>> Hi Greg,
>>
>> This patch series is a backport of the Spectre-v2 fixes (IBPB/IBRS)
>> and patches for the Speculative Store Bypass vulnerability to 4.4.y
>> (they apply cleanly on top of 4.4.140).
>>
>> I used 4.9.y as my reference when backporting to 4.4.y (as I thought
>> that would minimize the amount of fixing up necessary). Unfortunately
>> I had to skip the KVM fixes for these vulnerabilities, as the KVM
>> codebase is drastically different in 4.4 as compared to 4.9. (I tried
>> my best to backport them initially, but wasn't confident that they
>> were correct, so I decided to drop them from this series).
>>
>> You'll notice that the initial few patches in this series include
>> cleanups etc., that are non-critical to IBPB/IBRS/SSBD. Most of these
>> patches are aimed at getting the cpufeature.h vs cpufeatures.h split
>> into 4.4, since a lot of the subsequent patches update these headers.
>> On my first attempt to backport these patches to 4.4.y, I had actually
>> tried to do all the updates on the cpufeature.h file itself, but it
>> started getting very cumbersome, so I resorted to backporting the
>> cpufeature.h vs cpufeatures.h split and their dependencies as well. I
>> think apart from these initial patches, the rest of the patchset
>> doesn't have all that much noise.
>
> I've applied the "initial" patches to the 4.4-stable queue right now, as
> those were all just "housekeeping" stuff. I'll let others review the
> rest of the series this week and see if anyone objects before throwing
> them at the test-bots.
>
Sounds great! Thanks a lot!
> Many thanks for doing all of this work.
>
Thank you Greg!
Regards,
Srivatsa
VMware Photon OS
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y
2018-07-14 9:25 [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y Srivatsa S. Bhat
` (5 preceding siblings ...)
2018-07-15 11:26 ` [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y Greg KH
@ 2018-07-23 11:26 ` Greg KH
2018-07-23 17:27 ` Srivatsa S. Bhat
2018-07-23 22:06 ` Jiri Kosina
7 siblings, 1 reply; 21+ messages in thread
From: Greg KH @ 2018-07-23 11:26 UTC (permalink / raw)
To: Srivatsa S. Bhat
Cc: Dave Hansen, Wanpeng Li, ak, linux-tip-commits, Piotr Luc,
Mel Gorman, arjan.van.de.ven, xen-devel, Alexander Sergeyev,
Brian Gerst, Andy Lutomirski, MickaëlSalaün,
Thomas Gleixner, Joe Konno, Laura Abbott, Will Drewry,
Jiri Kosina, linux-kernel, Jia Zhang, Andrew Morton, torvalds,
dwmw, karahmed, dave.hansen, linux, Bo Gan
On Sat, Jul 14, 2018 at 02:25:43AM -0700, Srivatsa S. Bhat wrote:
> Hi Greg,
>
> This patch series is a backport of the Spectre-v2 fixes (IBPB/IBRS)
> and patches for the Speculative Store Bypass vulnerability to 4.4.y
> (they apply cleanly on top of 4.4.140).
>
> I used 4.9.y as my reference when backporting to 4.4.y (as I thought
> that would minimize the amount of fixing up necessary). Unfortunately
> I had to skip the KVM fixes for these vulnerabilities, as the KVM
> codebase is drastically different in 4.4 as compared to 4.9. (I tried
> my best to backport them initially, but wasn't confident that they
> were correct, so I decided to drop them from this series).
>
> You'll notice that the initial few patches in this series include
> cleanups etc., that are non-critical to IBPB/IBRS/SSBD. Most of these
> patches are aimed at getting the cpufeature.h vs cpufeatures.h split
> into 4.4, since a lot of the subsequent patches update these headers.
> On my first attempt to backport these patches to 4.4.y, I had actually
> tried to do all the updates on the cpufeature.h file itself, but it
> started getting very cumbersome, so I resorted to backporting the
> cpufeature.h vs cpufeatures.h split and their dependencies as well. I
> think apart from these initial patches, the rest of the patchset
> doesn't have all that much noise.
>
> This patchset has been tested on both Intel and AMD machines (Intel
> Xeon CPU E5-2660 v4 and AMD EPYC 7281 16-Core Processor, respectively)
> with updated microcode. All the patch backports have been
> independently reviewed by Matt Helsley, Alexey Makhalov and Bo Gan.
>
> I would appreciate if you could kindly consider these patches for
> review and inclusion in a future 4.4.y release.
Given no one has complained about these yet, I've queued them all up,
including the 2 extra ones you sent afterward.
Let's see what breaks :)
thanks,
greg k-h
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y
2018-07-23 11:26 ` Greg KH
@ 2018-07-23 17:27 ` Srivatsa S. Bhat
0 siblings, 0 replies; 21+ messages in thread
From: Srivatsa S. Bhat @ 2018-07-23 17:27 UTC (permalink / raw)
To: Greg KH
Cc: Dave Hansen, Wanpeng Li, ak, linux-tip-commits, Piotr Luc,
Mel Gorman, arjan.van.de.ven, xen-devel, Alexander Sergeyev,
Brian Gerst, Andy Lutomirski, MickaëlSalaün,
Thomas Gleixner, Joe Konno, Laura Abbott, Will Drewry,
Jiri Kosina, linux-kernel, Jia Zhang, Andrew Morton, torvalds,
dwmw, karahmed, dave.hansen, linux, Bo Gan
On 7/23/18 4:26 AM, Greg KH wrote:
> On Sat, Jul 14, 2018 at 02:25:43AM -0700, Srivatsa S. Bhat wrote:
>> Hi Greg,
>>
>> This patch series is a backport of the Spectre-v2 fixes (IBPB/IBRS)
>> and patches for the Speculative Store Bypass vulnerability to 4.4.y
>> (they apply cleanly on top of 4.4.140).
>>
>> I used 4.9.y as my reference when backporting to 4.4.y (as I thought
>> that would minimize the amount of fixing up necessary). Unfortunately
>> I had to skip the KVM fixes for these vulnerabilities, as the KVM
>> codebase is drastically different in 4.4 as compared to 4.9. (I tried
>> my best to backport them initially, but wasn't confident that they
>> were correct, so I decided to drop them from this series).
>>
>> You'll notice that the initial few patches in this series include
>> cleanups etc., that are non-critical to IBPB/IBRS/SSBD. Most of these
>> patches are aimed at getting the cpufeature.h vs cpufeatures.h split
>> into 4.4, since a lot of the subsequent patches update these headers.
>> On my first attempt to backport these patches to 4.4.y, I had actually
>> tried to do all the updates on the cpufeature.h file itself, but it
>> started getting very cumbersome, so I resorted to backporting the
>> cpufeature.h vs cpufeatures.h split and their dependencies as well. I
>> think apart from these initial patches, the rest of the patchset
>> doesn't have all that much noise.
>>
>> This patchset has been tested on both Intel and AMD machines (Intel
>> Xeon CPU E5-2660 v4 and AMD EPYC 7281 16-Core Processor, respectively)
>> with updated microcode. All the patch backports have been
>> independently reviewed by Matt Helsley, Alexey Makhalov and Bo Gan.
>>
>> I would appreciate if you could kindly consider these patches for
>> review and inclusion in a future 4.4.y release.
>
> Given no one has complained about these yet, I've queued them all up,
> including the 2 extra ones you sent afterward.
>
Great! Thank you very much!
> Let's see what breaks :)
>
Hehe :)
Regards,
Srivatsa
VMware Photon OS
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y
2018-07-14 9:25 [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y Srivatsa S. Bhat
` (6 preceding siblings ...)
2018-07-23 11:26 ` Greg KH
@ 2018-07-23 22:06 ` Jiri Kosina
2018-07-24 20:13 ` Srivatsa S. Bhat
7 siblings, 1 reply; 21+ messages in thread
From: Jiri Kosina @ 2018-07-23 22:06 UTC (permalink / raw)
To: Srivatsa S. Bhat
Cc: Dave Hansen, Wanpeng Li, Andi Kleen, linux-tip-commits, Piotr Luc,
Mel Gorman, arjan.van.de.ven, xen-devel, Alexander Sergeyev,
Brian Gerst, Andy Lutomirski, MickaëlSalaün,
Thomas Gleixner, Joe Konno, Laura Abbott, Will Drewry, gregkh,
linux-kernel, Jia Zhang, Andrew Morton, Linus Torvalds,
David Woodhouse, KarimAllah Ahmed, Dave Hansen
On Sat, 14 Jul 2018, Srivatsa S. Bhat wrote:
> This patch series is a backport of the Spectre-v2 fixes (IBPB/IBRS)
> and patches for the Speculative Store Bypass vulnerability to 4.4.y
> (they apply cleanly on top of 4.4.140).
FWIW -- not sure how much inspiration you took from our SLE 4.4-based
tree, but most of the stuff is already there for quite some time
(including the non-upstream IBRS on kernel boundary on SKL+, trampoline
stack for PTI (which the original port didn't have), etc).
The IBRS SKL+ stuff has not been picked up by Greg, as it's non-upstream,
and the trampoline stack I believe was pointed out to stable@, but noone
really sat down and did the port (our codebase is different than 4.4.x
stable base), but it definitely should be done if someone has to put 100%
trust into the PTI port (either that, or at least zeroing out the kernel
thread thread stack ... we used to have temporarily that before we
switched over to proper entry trampoline in this version as well).
Thanks,
--
Jiri Kosina
SUSE Labs
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y
2018-07-23 22:06 ` Jiri Kosina
@ 2018-07-24 20:13 ` Srivatsa S. Bhat
2018-07-24 22:02 ` Jiri Kosina
0 siblings, 1 reply; 21+ messages in thread
From: Srivatsa S. Bhat @ 2018-07-24 20:13 UTC (permalink / raw)
To: Jiri Kosina
Cc: Dave Hansen, Wanpeng Li, Andi Kleen, linux-tip-commits, Piotr Luc,
Mel Gorman, arjan.van.de.ven, xen-devel, Alexander Sergeyev,
Brian Gerst, Andy Lutomirski, MickaëlSalaün,
Thomas Gleixner, Joe Konno, Laura Abbott, Will Drewry, gregkh,
linux-kernel, Jia Zhang, Andrew Morton, Linus Torvalds,
David Woodhouse, KarimAllah Ahmed, Dave Hansen
On 7/23/18 3:06 PM, Jiri Kosina wrote:
> On Sat, 14 Jul 2018, Srivatsa S. Bhat wrote:
>
>> This patch series is a backport of the Spectre-v2 fixes (IBPB/IBRS)
>> and patches for the Speculative Store Bypass vulnerability to 4.4.y
>> (they apply cleanly on top of 4.4.140).
>
> FWIW -- not sure how much inspiration you took from our SLE 4.4-based
> tree, but most of the stuff is already there for quite some time
> (including the non-upstream IBRS on kernel boundary on SKL+, trampoline
> stack for PTI (which the original port didn't have), etc).
>
> The IBRS SKL+ stuff has not been picked up by Greg, as it's non-upstream,
> and the trampoline stack I believe was pointed out to stable@, but noone
> really sat down and did the port (our codebase is different than 4.4.x
> stable base), but it definitely should be done if someone has to put 100%
> trust into the PTI port (either that, or at least zeroing out the kernel
> thread thread stack ... we used to have temporarily that before we
> switched over to proper entry trampoline in this version as well).
>
I did glance at the SLES 4.4 kernel sometime ago, but there seemed to
be way too many custom patches and I wasn't sure in what ways your
PTI/Spectre fixes depended on the other (x86) patches in your tree. So
I decided to backport entirely from the 4.9 stable tree instead. My
reasoning was that, since the 4.9 stable patches were trusted to work
well, their 4.4 backports should work well too, as long as they are
backported correctly.
However, if you are proposing that you'd like to contribute the
enhanced PTI/Spectre (upstream) patches from the SLES 4.4 tree to 4.4
stable, and have them merged instead of this patch series, then I
would certainly welcome it!
Regards,
Srivatsa
VMware Photon OS
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y
2018-07-24 20:13 ` Srivatsa S. Bhat
@ 2018-07-24 22:02 ` Jiri Kosina
2018-07-26 23:09 ` Kees Cook
0 siblings, 1 reply; 21+ messages in thread
From: Jiri Kosina @ 2018-07-24 22:02 UTC (permalink / raw)
To: Srivatsa S. Bhat
Cc: Dave Hansen, Wanpeng Li, Andi Kleen, linux-tip-commits, Piotr Luc,
Mel Gorman, arjan.van.de.ven, xen-devel, Alexander Sergeyev,
Brian Gerst, Andy Lutomirski, MickaëlSalaün,
Thomas Gleixner, Joe Konno, Laura Abbott, Will Drewry, gregkh,
linux-kernel, Jia Zhang, Andrew Morton, Linus Torvalds,
David Woodhouse, KarimAllah Ahmed, Dave Hansen
On Tue, 24 Jul 2018, Srivatsa S. Bhat wrote:
> However, if you are proposing that you'd like to contribute the enhanced
> PTI/Spectre (upstream) patches from the SLES 4.4 tree to 4.4 stable, and
> have them merged instead of this patch series, then I would certainly
> welcome it!
I'd in principle love us to push everything back to 4.4, but there are a
few reasons (*) why that's not happening shortly.
Anyway, to point out explicitly what's really needed for those folks
running 4.4-stable and relying on PTI providing The Real Thing(TM), it's
either a 4.4-stable port of
http://kernel.suse.com/cgit/kernel-source/plain/patches.suse/x86-entry-64-use-a-per-cpu-trampoline-stack.patch?id=3428a77b02b1ba03e45d8fc352ec350429f57fc7
or making THREADINFO_GFP imply __GFP_ZERO.
(*) IBRS is not upstream, we historically have had very different x86
codebase compared to either 4.4, 4.4-stable or current Linus' tree,
and there are simply too many things happening right now to give this
high enough priority, sadly. We're not fully-dependent downstream
consumer of -stable any more, so this is one of the expected outcomes,
unfortunately; we don't immediately benefit from pushing our
downstream changes to stable, as we have to carry those over forward
ourselves anyway.
Thanks,
--
Jiri Kosina
SUSE Labs
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y
2018-07-24 22:02 ` Jiri Kosina
@ 2018-07-26 23:09 ` Kees Cook
2018-08-02 19:22 ` Srivatsa S. Bhat
0 siblings, 1 reply; 21+ messages in thread
From: Kees Cook @ 2018-07-26 23:09 UTC (permalink / raw)
To: Jiri Kosina
Cc: Dave Hansen, Srivatsa S. Bhat, Wanpeng Li, Andi Kleen,
linux-tip-commits, Piotr Luc, Mel Gorman, Van De Ven, Arjan,
xen-devel, Alexander Sergeyev, Brian Gerst, Andy Lutomirski,
MickaëlSalaün, Thomas Gleixner, Joe Konno, Laura Abbott,
Will Drewry, Greg KH, LKML, Jia Zhang, Andrew Morton,
Linus Torvalds, David Woodhouse
On Tue, Jul 24, 2018 at 3:02 PM, Jiri Kosina <jikos@kernel.org> wrote:
> On Tue, 24 Jul 2018, Srivatsa S. Bhat wrote:
>
>> However, if you are proposing that you'd like to contribute the enhanced
>> PTI/Spectre (upstream) patches from the SLES 4.4 tree to 4.4 stable, and
>> have them merged instead of this patch series, then I would certainly
>> welcome it!
>
> I'd in principle love us to push everything back to 4.4, but there are a
> few reasons (*) why that's not happening shortly.
>
> Anyway, to point out explicitly what's really needed for those folks
> running 4.4-stable and relying on PTI providing The Real Thing(TM), it's
> either a 4.4-stable port of
>
> http://kernel.suse.com/cgit/kernel-source/plain/patches.suse/x86-entry-64-use-a-per-cpu-trampoline-stack.patch?id=3428a77b02b1ba03e45d8fc352ec350429f57fc7
>
> or making THREADINFO_GFP imply __GFP_ZERO.
This is true in Linus's tree now. Should be trivial to backport:
https://git.kernel.org/linus/e01e80634ecdd
-Kees
--
Kees Cook
Pixel Security
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y
2018-07-26 23:09 ` Kees Cook
@ 2018-08-02 19:22 ` Srivatsa S. Bhat
2018-08-02 22:22 ` Kees Cook
0 siblings, 1 reply; 21+ messages in thread
From: Srivatsa S. Bhat @ 2018-08-02 19:22 UTC (permalink / raw)
To: Kees Cook, Jiri Kosina
Cc: Dave Hansen, Wanpeng Li, Andi Kleen, linux-tip-commits, Piotr Luc,
Mel Gorman, Van De Ven, Arjan, xen-devel, Alexander Sergeyev,
Brian Gerst, Andy Lutomirski, MickaëlSalaün,
Thomas Gleixner, Joe Konno, Laura Abbott, Will Drewry, Greg KH,
LKML, Jia Zhang, Andrew Morton, Linus Torvalds, David Woodhouse,
srinidhir
[-- Attachment #1: Type: text/plain, Size: 1379 bytes --]
On 7/26/18 4:09 PM, Kees Cook wrote:
> On Tue, Jul 24, 2018 at 3:02 PM, Jiri Kosina <jikos@kernel.org> wrote:
>> On Tue, 24 Jul 2018, Srivatsa S. Bhat wrote:
>>
>>> However, if you are proposing that you'd like to contribute the enhanced
>>> PTI/Spectre (upstream) patches from the SLES 4.4 tree to 4.4 stable, and
>>> have them merged instead of this patch series, then I would certainly
>>> welcome it!
>>
>> I'd in principle love us to push everything back to 4.4, but there are a
>> few reasons (*) why that's not happening shortly.
>>
>> Anyway, to point out explicitly what's really needed for those folks
>> running 4.4-stable and relying on PTI providing The Real Thing(TM), it's
>> either a 4.4-stable port of
>>
>> http://kernel.suse.com/cgit/kernel-source/plain/patches.suse/x86-entry-64-use-a-per-cpu-trampoline-stack.patch?id=3428a77b02b1ba03e45d8fc352ec350429f57fc7
>>
>> or making THREADINFO_GFP imply __GFP_ZERO.
>
> This is true in Linus's tree now. Should be trivial to backport:
> https://git.kernel.org/linus/e01e80634ecdd
>
Hi Jiri, Kees,
Thank you for suggesting the patch! I have attached the (locally
tested) 4.4 and 4.9 backports of that patch with this mail. (The
mainline commit applies cleanly on 4.14).
Greg, could you please consider including them in stable 4.4, 4.9
and 4.14?
Thank you very much!
Regards,
Srivatsa
VMware Photon OS
[-- Attachment #2: 4.4-fork-unconditionally-clear-stack-on-fork.patch --]
[-- Type: text/plain, Size: 3081 bytes --]
From 7e39d8ccbb0889c03ce6dc0dee0e63d78f37d0a9 Mon Sep 17 00:00:00 2001
From: Kees Cook <keescook@chromium.org>
Date: Fri, 20 Apr 2018 14:55:31 -0700
Subject: [PATCH] fork: unconditionally clear stack on fork
commit e01e80634ecdde1dd113ac43b3adad21b47f3957 upstream.
One of the classes of kernel stack content leaks[1] is exposing the
contents of prior heap or stack contents when a new process stack is
allocated. Normally, those stacks are not zeroed, and the old contents
remain in place. In the face of stack content exposure flaws, those
contents can leak to userspace.
Fixing this will make the kernel no longer vulnerable to these flaws, as
the stack will be wiped each time a stack is assigned to a new process.
There's not a meaningful change in runtime performance; it almost looks
like it provides a benefit.
Performing back-to-back kernel builds before:
Run times: 157.86 157.09 158.90 160.94 160.80
Mean: 159.12
Std Dev: 1.54
and after:
Run times: 159.31 157.34 156.71 158.15 160.81
Mean: 158.46
Std Dev: 1.46
Instead of making this a build or runtime config, Andy Lutomirski
recommended this just be enabled by default.
[1] A noisy search for many kinds of stack content leaks can be seen here:
https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=linux+kernel+stack+leak
I did some more with perf and cycle counts on running 100,000 execs of
/bin/true.
before:
Cycles: 218858861551 218853036130 214727610969 227656844122 224980542841
Mean: 221015379122.60
Std Dev: 4662486552.47
after:
Cycles: 213868945060 213119275204 211820169456 224426673259 225489986348
Mean: 217745009865.40
Std Dev: 5935559279.99
It continues to look like it's faster, though the deviation is rather
wide, but I'm not sure what I could do that would be less noisy. I'm
open to ideas!
Link: http://lkml.kernel.org/r/20180221021659.GA37073@beast
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[ Srivatsa: Backported to 4.4.y ]
Signed-off-by: Srivatsa S. Bhat <srivatsa@csail.mit.edu>
Reviewed-by: Srinidhi Rao <srinidhir@vmware.com>
---
include/linux/thread_info.h | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
index ff307b5..646891f 100644
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
@@ -55,11 +55,7 @@ extern long do_no_restart_syscall(struct restart_block *parm);
#ifdef __KERNEL__
-#ifdef CONFIG_DEBUG_STACK_USAGE
-# define THREADINFO_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO)
-#else
-# define THREADINFO_GFP (GFP_KERNEL | __GFP_NOTRACK)
-#endif
+#define THREADINFO_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO)
/*
* flag set/clear/test wrappers
--
2.7.4
[-- Attachment #3: 4.9-fork-unconditionally-clear-stack-on-fork.patch --]
[-- Type: text/plain, Size: 3113 bytes --]
From 7debcc6438b4a0bdc9a7b509a751350dad883328 Mon Sep 17 00:00:00 2001
From: Kees Cook <keescook@chromium.org>
Date: Fri, 20 Apr 2018 14:55:31 -0700
Subject: [PATCH] fork: unconditionally clear stack on fork
commit e01e80634ecdde1dd113ac43b3adad21b47f3957 upstream.
One of the classes of kernel stack content leaks[1] is exposing the
contents of prior heap or stack contents when a new process stack is
allocated. Normally, those stacks are not zeroed, and the old contents
remain in place. In the face of stack content exposure flaws, those
contents can leak to userspace.
Fixing this will make the kernel no longer vulnerable to these flaws, as
the stack will be wiped each time a stack is assigned to a new process.
There's not a meaningful change in runtime performance; it almost looks
like it provides a benefit.
Performing back-to-back kernel builds before:
Run times: 157.86 157.09 158.90 160.94 160.80
Mean: 159.12
Std Dev: 1.54
and after:
Run times: 159.31 157.34 156.71 158.15 160.81
Mean: 158.46
Std Dev: 1.46
Instead of making this a build or runtime config, Andy Lutomirski
recommended this just be enabled by default.
[1] A noisy search for many kinds of stack content leaks can be seen here:
https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=linux+kernel+stack+leak
I did some more with perf and cycle counts on running 100,000 execs of
/bin/true.
before:
Cycles: 218858861551 218853036130 214727610969 227656844122 224980542841
Mean: 221015379122.60
Std Dev: 4662486552.47
after:
Cycles: 213868945060 213119275204 211820169456 224426673259 225489986348
Mean: 217745009865.40
Std Dev: 5935559279.99
It continues to look like it's faster, though the deviation is rather
wide, but I'm not sure what I could do that would be less noisy. I'm
open to ideas!
Link: http://lkml.kernel.org/r/20180221021659.GA37073@beast
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[ Srivatsa: Backported to 4.9.y ]
Signed-off-by: Srivatsa S. Bhat <srivatsa@csail.mit.edu>
Reviewed-by: Srinidhi Rao <srinidhir@vmware.com>
---
include/linux/thread_info.h | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
index 2873baf..5e64367 100644
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
@@ -59,12 +59,7 @@ extern long do_no_restart_syscall(struct restart_block *parm);
#ifdef __KERNEL__
-#ifdef CONFIG_DEBUG_STACK_USAGE
-# define THREADINFO_GFP (GFP_KERNEL_ACCOUNT | __GFP_NOTRACK | \
- __GFP_ZERO)
-#else
-# define THREADINFO_GFP (GFP_KERNEL_ACCOUNT | __GFP_NOTRACK)
-#endif
+#define THREADINFO_GFP (GFP_KERNEL_ACCOUNT | __GFP_NOTRACK | __GFP_ZERO)
/*
* flag set/clear/test wrappers
--
2.7.4
[-- Attachment #4: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y
2018-08-02 19:22 ` Srivatsa S. Bhat
@ 2018-08-02 22:22 ` Kees Cook
2018-08-03 23:20 ` Srivatsa S. Bhat
0 siblings, 1 reply; 21+ messages in thread
From: Kees Cook @ 2018-08-02 22:22 UTC (permalink / raw)
To: Srivatsa S. Bhat
Cc: Dave Hansen, Wanpeng Li, Andi Kleen, linux-tip-commits, Piotr Luc,
Mel Gorman, Van De Ven, Arjan, xen-devel, Alexander Sergeyev,
Brian Gerst, Andy Lutomirski, MickaëlSalaün,
Thomas Gleixner, Joe Konno, Laura Abbott, Will Drewry, Greg KH,
LKML, Jia Zhang, Andrew Morton, Linus Torvalds, David Woodhouse,
srinidhir
On Thu, Aug 2, 2018 at 12:22 PM, Srivatsa S. Bhat
<srivatsa@csail.mit.edu> wrote:
> On 7/26/18 4:09 PM, Kees Cook wrote:
>> On Tue, Jul 24, 2018 at 3:02 PM, Jiri Kosina <jikos@kernel.org> wrote:
>>> On Tue, 24 Jul 2018, Srivatsa S. Bhat wrote:
>>>
>>>> However, if you are proposing that you'd like to contribute the enhanced
>>>> PTI/Spectre (upstream) patches from the SLES 4.4 tree to 4.4 stable, and
>>>> have them merged instead of this patch series, then I would certainly
>>>> welcome it!
>>>
>>> I'd in principle love us to push everything back to 4.4, but there are a
>>> few reasons (*) why that's not happening shortly.
>>>
>>> Anyway, to point out explicitly what's really needed for those folks
>>> running 4.4-stable and relying on PTI providing The Real Thing(TM), it's
>>> either a 4.4-stable port of
>>>
>>> http://kernel.suse.com/cgit/kernel-source/plain/patches.suse/x86-entry-64-use-a-per-cpu-trampoline-stack.patch?id=3428a77b02b1ba03e45d8fc352ec350429f57fc7
>>>
>>> or making THREADINFO_GFP imply __GFP_ZERO.
>>
>> This is true in Linus's tree now. Should be trivial to backport:
>> https://git.kernel.org/linus/e01e80634ecdd
>>
>
> Hi Jiri, Kees,
>
> Thank you for suggesting the patch! I have attached the (locally
> tested) 4.4 and 4.9 backports of that patch with this mail. (The
> mainline commit applies cleanly on 4.14).
>
> Greg, could you please consider including them in stable 4.4, 4.9
> and 4.14?
I don't think your v4.9 is sufficient: it leaves the vmapped stack
uncleared. v4.9 needs ca182551857 ("kmemleak: clear stale pointers
from task stacks") included in the backport (really, just adding the
memset()).
Otherwise, yup, looks good.
-Kees
--
Kees Cook
Pixel Security
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y
2018-08-02 22:22 ` Kees Cook
@ 2018-08-03 23:20 ` Srivatsa S. Bhat
2018-08-07 13:49 ` Greg KH
0 siblings, 1 reply; 21+ messages in thread
From: Srivatsa S. Bhat @ 2018-08-03 23:20 UTC (permalink / raw)
To: Kees Cook
Cc: Dave Hansen, catalin.marinas, Wanpeng Li, Andi Kleen,
linux-tip-commits, Piotr Luc, Mel Gorman, Van De Ven, Arjan,
xen-devel, Alexander Sergeyev, Brian Gerst, Andy Lutomirski,
MickaëlSalaün, Thomas Gleixner, Joe Konno, Laura Abbott,
Will Drewry, Greg KH, LKML, Jia Zhang, Andrew Morton,
Linus Torvalds, David Woodhouse, srinidhir
[-- Attachment #1: Type: text/plain, Size: 1932 bytes --]
On 8/2/18 3:22 PM, Kees Cook wrote:
> On Thu, Aug 2, 2018 at 12:22 PM, Srivatsa S. Bhat
> <srivatsa@csail.mit.edu> wrote:
>> On 7/26/18 4:09 PM, Kees Cook wrote:
>>> On Tue, Jul 24, 2018 at 3:02 PM, Jiri Kosina <jikos@kernel.org> wrote:
>>>> On Tue, 24 Jul 2018, Srivatsa S. Bhat wrote:
>>>>
>>>>> However, if you are proposing that you'd like to contribute the enhanced
>>>>> PTI/Spectre (upstream) patches from the SLES 4.4 tree to 4.4 stable, and
>>>>> have them merged instead of this patch series, then I would certainly
>>>>> welcome it!
>>>>
>>>> I'd in principle love us to push everything back to 4.4, but there are a
>>>> few reasons (*) why that's not happening shortly.
>>>>
>>>> Anyway, to point out explicitly what's really needed for those folks
>>>> running 4.4-stable and relying on PTI providing The Real Thing(TM), it's
>>>> either a 4.4-stable port of
>>>>
>>>> http://kernel.suse.com/cgit/kernel-source/plain/patches.suse/x86-entry-64-use-a-per-cpu-trampoline-stack.patch?id=3428a77b02b1ba03e45d8fc352ec350429f57fc7
>>>>
>>>> or making THREADINFO_GFP imply __GFP_ZERO.
>>>
>>> This is true in Linus's tree now. Should be trivial to backport:
>>> https://git.kernel.org/linus/e01e80634ecdd
>>>
>>
>> Hi Jiri, Kees,
>>
>> Thank you for suggesting the patch! I have attached the (locally
>> tested) 4.4 and 4.9 backports of that patch with this mail. (The
>> mainline commit applies cleanly on 4.14).
>>
>> Greg, could you please consider including them in stable 4.4, 4.9
>> and 4.14?
>
> I don't think your v4.9 is sufficient: it leaves the vmapped stack
> uncleared. v4.9 needs ca182551857 ("kmemleak: clear stale pointers
> from task stacks") included in the backport (really, just adding the
> memset()).
>
Ah, I see, thank you! I have attached the updated patchset for 4.9
with this mail.
> Otherwise, yup, looks good.
>
Thank you for reviewing the patches!
Regards,
Srivatsa
VMware Photon OS
[-- Attachment #2: 4.9-0001-kmemleak-clear-stale-pointers-from-task-stacks.patch --]
[-- Type: text/plain, Size: 1906 bytes --]
From edf835d8b6bac08bc5e69efb3e1cc321e2457f61 Mon Sep 17 00:00:00 2001
From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Date: Fri, 13 Oct 2017 15:58:22 -0700
Subject: [PATCH 1/2] kmemleak: clear stale pointers from task stacks
commit ca182551857cc2c1e6a2b7f1e72090a137a15008 upstream.
Kmemleak considers any pointers on task stacks as references. This
patch clears newly allocated and reused vmap stacks.
Link: http://lkml.kernel.org/r/150728990124.744199.8403409836394318684.stgit@buzz
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[ Srivatsa: Backported to 4.9.y ]
Signed-off-by: Srivatsa S. Bhat <srivatsa@csail.mit.edu>
---
include/linux/thread_info.h | 2 +-
kernel/fork.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
index 2873baf..cf87c16 100644
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
@@ -59,7 +59,7 @@ extern long do_no_restart_syscall(struct restart_block *parm);
#ifdef __KERNEL__
-#ifdef CONFIG_DEBUG_STACK_USAGE
+#if IS_ENABLED(CONFIG_DEBUG_STACK_USAGE) || IS_ENABLED(CONFIG_DEBUG_KMEMLEAK)
# define THREADINFO_GFP (GFP_KERNEL_ACCOUNT | __GFP_NOTRACK | \
__GFP_ZERO)
#else
diff --git a/kernel/fork.c b/kernel/fork.c
index 70e10cb..c19e6d4 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -184,6 +184,10 @@ static unsigned long *alloc_thread_stack_node(struct task_struct *tsk, int node)
continue;
this_cpu_write(cached_stacks[i], NULL);
+#ifdef CONFIG_DEBUG_KMEMLEAK
+ /* Clear stale pointers from reused stack. */
+ memset(s->addr, 0, THREAD_SIZE);
+#endif
tsk->stack_vm_area = s;
local_irq_enable();
return s->addr;
--
2.7.4
[-- Attachment #3: 4.9-0002-fork-unconditionally-clear-stack-on-fork.patch --]
[-- Type: text/plain, Size: 3670 bytes --]
From 5371cd0bb1e2ca8d1603845c764e1524f7e729ad Mon Sep 17 00:00:00 2001
From: Kees Cook <keescook@chromium.org>
Date: Fri, 20 Apr 2018 14:55:31 -0700
Subject: [PATCH 2/2] fork: unconditionally clear stack on fork
commit e01e80634ecdde1dd113ac43b3adad21b47f3957 upstream.
One of the classes of kernel stack content leaks[1] is exposing the
contents of prior heap or stack contents when a new process stack is
allocated. Normally, those stacks are not zeroed, and the old contents
remain in place. In the face of stack content exposure flaws, those
contents can leak to userspace.
Fixing this will make the kernel no longer vulnerable to these flaws, as
the stack will be wiped each time a stack is assigned to a new process.
There's not a meaningful change in runtime performance; it almost looks
like it provides a benefit.
Performing back-to-back kernel builds before:
Run times: 157.86 157.09 158.90 160.94 160.80
Mean: 159.12
Std Dev: 1.54
and after:
Run times: 159.31 157.34 156.71 158.15 160.81
Mean: 158.46
Std Dev: 1.46
Instead of making this a build or runtime config, Andy Lutomirski
recommended this just be enabled by default.
[1] A noisy search for many kinds of stack content leaks can be seen here:
https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=linux+kernel+stack+leak
I did some more with perf and cycle counts on running 100,000 execs of
/bin/true.
before:
Cycles: 218858861551 218853036130 214727610969 227656844122 224980542841
Mean: 221015379122.60
Std Dev: 4662486552.47
after:
Cycles: 213868945060 213119275204 211820169456 224426673259 225489986348
Mean: 217745009865.40
Std Dev: 5935559279.99
It continues to look like it's faster, though the deviation is rather
wide, but I'm not sure what I could do that would be less noisy. I'm
open to ideas!
Link: http://lkml.kernel.org/r/20180221021659.GA37073@beast
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[ Srivatsa: Backported to 4.9.y ]
Signed-off-by: Srivatsa S. Bhat <srivatsa@csail.mit.edu>
Reviewed-by: Srinidhi Rao <srinidhir@vmware.com>
---
include/linux/thread_info.h | 7 +------
kernel/fork.c | 3 +--
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
index cf87c16..5e64367 100644
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
@@ -59,12 +59,7 @@ extern long do_no_restart_syscall(struct restart_block *parm);
#ifdef __KERNEL__
-#if IS_ENABLED(CONFIG_DEBUG_STACK_USAGE) || IS_ENABLED(CONFIG_DEBUG_KMEMLEAK)
-# define THREADINFO_GFP (GFP_KERNEL_ACCOUNT | __GFP_NOTRACK | \
- __GFP_ZERO)
-#else
-# define THREADINFO_GFP (GFP_KERNEL_ACCOUNT | __GFP_NOTRACK)
-#endif
+#define THREADINFO_GFP (GFP_KERNEL_ACCOUNT | __GFP_NOTRACK | __GFP_ZERO)
/*
* flag set/clear/test wrappers
diff --git a/kernel/fork.c b/kernel/fork.c
index c19e6d4..2c98b98 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -184,10 +184,9 @@ static unsigned long *alloc_thread_stack_node(struct task_struct *tsk, int node)
continue;
this_cpu_write(cached_stacks[i], NULL);
-#ifdef CONFIG_DEBUG_KMEMLEAK
/* Clear stale pointers from reused stack. */
memset(s->addr, 0, THREAD_SIZE);
-#endif
+
tsk->stack_vm_area = s;
local_irq_enable();
return s->addr;
--
2.7.4
[-- Attachment #4: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y
2018-08-03 23:20 ` Srivatsa S. Bhat
@ 2018-08-07 13:49 ` Greg KH
2018-08-07 19:08 ` Srivatsa S. Bhat
0 siblings, 1 reply; 21+ messages in thread
From: Greg KH @ 2018-08-07 13:49 UTC (permalink / raw)
To: Srivatsa S. Bhat
Cc: Dave Hansen, catalin.marinas, Wanpeng Li, Andi Kleen,
linux-tip-commits, Piotr Luc, Mel Gorman, Van De Ven, Arjan,
xen-devel, Alexander Sergeyev, Brian Gerst, Andy Lutomirski,
MickaëlSalaün, Thomas Gleixner, Joe Konno, Laura Abbott,
Will Drewry, LKML, Jia Zhang, Andrew Morton, Linus Torvalds,
David Woodhouse, srinidhir
On Fri, Aug 03, 2018 at 04:20:31PM -0700, Srivatsa S. Bhat wrote:
> On 8/2/18 3:22 PM, Kees Cook wrote:
> > On Thu, Aug 2, 2018 at 12:22 PM, Srivatsa S. Bhat
> > <srivatsa@csail.mit.edu> wrote:
> >> On 7/26/18 4:09 PM, Kees Cook wrote:
> >>> On Tue, Jul 24, 2018 at 3:02 PM, Jiri Kosina <jikos@kernel.org> wrote:
> >>>> On Tue, 24 Jul 2018, Srivatsa S. Bhat wrote:
> >>>>
> >>>>> However, if you are proposing that you'd like to contribute the enhanced
> >>>>> PTI/Spectre (upstream) patches from the SLES 4.4 tree to 4.4 stable, and
> >>>>> have them merged instead of this patch series, then I would certainly
> >>>>> welcome it!
> >>>>
> >>>> I'd in principle love us to push everything back to 4.4, but there are a
> >>>> few reasons (*) why that's not happening shortly.
> >>>>
> >>>> Anyway, to point out explicitly what's really needed for those folks
> >>>> running 4.4-stable and relying on PTI providing The Real Thing(TM), it's
> >>>> either a 4.4-stable port of
> >>>>
> >>>> http://kernel.suse.com/cgit/kernel-source/plain/patches.suse/x86-entry-64-use-a-per-cpu-trampoline-stack.patch?id=3428a77b02b1ba03e45d8fc352ec350429f57fc7
> >>>>
> >>>> or making THREADINFO_GFP imply __GFP_ZERO.
> >>>
> >>> This is true in Linus's tree now. Should be trivial to backport:
> >>> https://git.kernel.org/linus/e01e80634ecdd
> >>>
> >>
> >> Hi Jiri, Kees,
> >>
> >> Thank you for suggesting the patch! I have attached the (locally
> >> tested) 4.4 and 4.9 backports of that patch with this mail. (The
> >> mainline commit applies cleanly on 4.14).
> >>
> >> Greg, could you please consider including them in stable 4.4, 4.9
> >> and 4.14?
> >
> > I don't think your v4.9 is sufficient: it leaves the vmapped stack
> > uncleared. v4.9 needs ca182551857 ("kmemleak: clear stale pointers
> > from task stacks") included in the backport (really, just adding the
> > memset()).
> >
>
> Ah, I see, thank you! I have attached the updated patchset for 4.9
> with this mail.
>
> > Otherwise, yup, looks good.
> >
> Thank you for reviewing the patches!
>
> Regards,
> Srivatsa
> VMware Photon OS
These work for 4.9, do you also have a set for 4.4?
thanks,
greg k-h
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y
2018-08-07 13:49 ` Greg KH
@ 2018-08-07 19:08 ` Srivatsa S. Bhat
2018-08-07 19:15 ` Greg KH
0 siblings, 1 reply; 21+ messages in thread
From: Srivatsa S. Bhat @ 2018-08-07 19:08 UTC (permalink / raw)
To: Greg KH
Cc: Dave Hansen, catalin.marinas, Wanpeng Li, Andi Kleen,
linux-tip-commits, Piotr Luc, Mel Gorman, Van De Ven, Arjan,
xen-devel, Alexander Sergeyev, Brian Gerst, Andy Lutomirski,
MickaëlSalaün, Thomas Gleixner, Joe Konno, Laura Abbott,
Will Drewry, LKML, Jia Zhang, Andrew Morton, Linus Torvalds,
David Woodhouse, srinidhir, KarimAllah Ahmed
[-- Attachment #1: Type: text/plain, Size: 2649 bytes --]
On 8/7/18 6:49 AM, Greg KH wrote:
> On Fri, Aug 03, 2018 at 04:20:31PM -0700, Srivatsa S. Bhat wrote:
>> On 8/2/18 3:22 PM, Kees Cook wrote:
>>> On Thu, Aug 2, 2018 at 12:22 PM, Srivatsa S. Bhat
>>> <srivatsa@csail.mit.edu> wrote:
>>>> On 7/26/18 4:09 PM, Kees Cook wrote:
>>>>> On Tue, Jul 24, 2018 at 3:02 PM, Jiri Kosina <jikos@kernel.org> wrote:
>>>>>> On Tue, 24 Jul 2018, Srivatsa S. Bhat wrote:
>>>>>>
>>>>>>> However, if you are proposing that you'd like to contribute the enhanced
>>>>>>> PTI/Spectre (upstream) patches from the SLES 4.4 tree to 4.4 stable, and
>>>>>>> have them merged instead of this patch series, then I would certainly
>>>>>>> welcome it!
>>>>>>
>>>>>> I'd in principle love us to push everything back to 4.4, but there are a
>>>>>> few reasons (*) why that's not happening shortly.
>>>>>>
>>>>>> Anyway, to point out explicitly what's really needed for those folks
>>>>>> running 4.4-stable and relying on PTI providing The Real Thing(TM), it's
>>>>>> either a 4.4-stable port of
>>>>>>
>>>>>> http://kernel.suse.com/cgit/kernel-source/plain/patches.suse/x86-entry-64-use-a-per-cpu-trampoline-stack.patch?id=3428a77b02b1ba03e45d8fc352ec350429f57fc7
>>>>>>
>>>>>> or making THREADINFO_GFP imply __GFP_ZERO.
>>>>>
>>>>> This is true in Linus's tree now. Should be trivial to backport:
>>>>> https://git.kernel.org/linus/e01e80634ecdd
>>>>>
>>>>
>>>> Hi Jiri, Kees,
>>>>
>>>> Thank you for suggesting the patch! I have attached the (locally
>>>> tested) 4.4 and 4.9 backports of that patch with this mail. (The
>>>> mainline commit applies cleanly on 4.14).
>>>>
>>>> Greg, could you please consider including them in stable 4.4, 4.9
>>>> and 4.14?
>>>
>>> I don't think your v4.9 is sufficient: it leaves the vmapped stack
>>> uncleared. v4.9 needs ca182551857 ("kmemleak: clear stale pointers
>>> from task stacks") included in the backport (really, just adding the
>>> memset()).
>>>
>>
>> Ah, I see, thank you! I have attached the updated patchset for 4.9
>> with this mail.
>>
>>> Otherwise, yup, looks good.
>>>
>> Thank you for reviewing the patches!
>>
>> Regards,
>> Srivatsa
>> VMware Photon OS
>
> These work for 4.9, do you also have a set for 4.4?
>
Thank you for considering these patches for 4.9!
The (single) patch for 4.4 did not need any more changes, and hence is
the same as the one I attached in my previous mail. I'll attach it
again here for your reference.
Also, upstream commit e01e80634ecdde1 (fork: unconditionally clear
stack on fork) applies cleanly on 4.14 stable, so it would be great to
cherry-pick it to 4.14 stable as well.
Thank you!
Regards,
Srivatsa
VMware Photon OS
[-- Attachment #2: 4.4-fork-unconditionally-clear-stack-on-fork.patch --]
[-- Type: text/plain, Size: 3081 bytes --]
From 7e39d8ccbb0889c03ce6dc0dee0e63d78f37d0a9 Mon Sep 17 00:00:00 2001
From: Kees Cook <keescook@chromium.org>
Date: Fri, 20 Apr 2018 14:55:31 -0700
Subject: [PATCH] fork: unconditionally clear stack on fork
commit e01e80634ecdde1dd113ac43b3adad21b47f3957 upstream.
One of the classes of kernel stack content leaks[1] is exposing the
contents of prior heap or stack contents when a new process stack is
allocated. Normally, those stacks are not zeroed, and the old contents
remain in place. In the face of stack content exposure flaws, those
contents can leak to userspace.
Fixing this will make the kernel no longer vulnerable to these flaws, as
the stack will be wiped each time a stack is assigned to a new process.
There's not a meaningful change in runtime performance; it almost looks
like it provides a benefit.
Performing back-to-back kernel builds before:
Run times: 157.86 157.09 158.90 160.94 160.80
Mean: 159.12
Std Dev: 1.54
and after:
Run times: 159.31 157.34 156.71 158.15 160.81
Mean: 158.46
Std Dev: 1.46
Instead of making this a build or runtime config, Andy Lutomirski
recommended this just be enabled by default.
[1] A noisy search for many kinds of stack content leaks can be seen here:
https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=linux+kernel+stack+leak
I did some more with perf and cycle counts on running 100,000 execs of
/bin/true.
before:
Cycles: 218858861551 218853036130 214727610969 227656844122 224980542841
Mean: 221015379122.60
Std Dev: 4662486552.47
after:
Cycles: 213868945060 213119275204 211820169456 224426673259 225489986348
Mean: 217745009865.40
Std Dev: 5935559279.99
It continues to look like it's faster, though the deviation is rather
wide, but I'm not sure what I could do that would be less noisy. I'm
open to ideas!
Link: http://lkml.kernel.org/r/20180221021659.GA37073@beast
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[ Srivatsa: Backported to 4.4.y ]
Signed-off-by: Srivatsa S. Bhat <srivatsa@csail.mit.edu>
Reviewed-by: Srinidhi Rao <srinidhir@vmware.com>
---
include/linux/thread_info.h | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
index ff307b5..646891f 100644
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
@@ -55,11 +55,7 @@ extern long do_no_restart_syscall(struct restart_block *parm);
#ifdef __KERNEL__
-#ifdef CONFIG_DEBUG_STACK_USAGE
-# define THREADINFO_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO)
-#else
-# define THREADINFO_GFP (GFP_KERNEL | __GFP_NOTRACK)
-#endif
+#define THREADINFO_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO)
/*
* flag set/clear/test wrappers
--
2.7.4
[-- Attachment #3: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y
2018-08-07 19:08 ` Srivatsa S. Bhat
@ 2018-08-07 19:15 ` Greg KH
2018-08-07 19:19 ` Srivatsa S. Bhat
0 siblings, 1 reply; 21+ messages in thread
From: Greg KH @ 2018-08-07 19:15 UTC (permalink / raw)
To: Srivatsa S. Bhat
Cc: Dave Hansen, catalin.marinas, Wanpeng Li, Andi Kleen,
linux-tip-commits, Piotr Luc, Mel Gorman, Van De Ven, Arjan,
xen-devel, Alexander Sergeyev, Brian Gerst, Andy Lutomirski,
MickaëlSalaün, Thomas Gleixner, Joe Konno, Laura Abbott,
Will Drewry, LKML, Jia Zhang, Andrew Morton, Linus Torvalds,
David Woodhouse, srinidhir
On Tue, Aug 07, 2018 at 12:08:07PM -0700, Srivatsa S. Bhat wrote:
> Also, upstream commit e01e80634ecdde1 (fork: unconditionally clear
> stack on fork) applies cleanly on 4.14 stable, so it would be great to
> cherry-pick it to 4.14 stable as well.
It is already in the 4.14.60 release, did I somehow mess up the
backport?
thanks,
greg k-h
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y
2018-08-07 19:15 ` Greg KH
@ 2018-08-07 19:19 ` Srivatsa S. Bhat
0 siblings, 0 replies; 21+ messages in thread
From: Srivatsa S. Bhat @ 2018-08-07 19:19 UTC (permalink / raw)
To: Greg KH
Cc: Dave Hansen, catalin.marinas, Wanpeng Li, Andi Kleen,
linux-tip-commits, Piotr Luc, Mel Gorman, Van De Ven, Arjan,
xen-devel, Alexander Sergeyev, Brian Gerst, Andy Lutomirski,
MickaëlSalaün, Thomas Gleixner, Joe Konno, Laura Abbott,
Will Drewry, LKML, Jia Zhang, Andrew Morton, Linus Torvalds,
David Woodhouse, srinidhir, KarimAllah Ahmed
On 8/7/18 12:15 PM, Greg KH wrote:
> On Tue, Aug 07, 2018 at 12:08:07PM -0700, Srivatsa S. Bhat wrote:
>> Also, upstream commit e01e80634ecdde1 (fork: unconditionally clear
>> stack on fork) applies cleanly on 4.14 stable, so it would be great to
>> cherry-pick it to 4.14 stable as well.
>
> It is already in the 4.14.60 release, did I somehow mess up the
> backport?
>
Sorry, my bad! The backport in 4.14.60 looks fine. Thank you!
Regards,
Srivatsa
VMware Photon OS
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2018-08-07 19:19 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-14 9:25 [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y Srivatsa S. Bhat
2018-07-14 9:31 ` [PATCH 4.4.y 035/101] x86/speculation: Update Speculation Control microcode blacklist Srivatsa S. Bhat
2018-07-14 9:31 ` [PATCH 4.4.y 036/101] x86/speculation: Correct Speculation Control microcode blacklist again Srivatsa S. Bhat
2018-07-14 9:32 ` [PATCH 4.4.y 044/101] x86/spectre_v2: Don't check microcode versions when running under hypervisors Srivatsa S. Bhat
2018-07-14 9:32 ` [PATCH 4.4.y 045/101] x86/speculation: Use IBRS if available before calling into firmware Srivatsa S. Bhat
2018-07-14 9:32 ` [PATCH 4.4.y 046/101] x86/speculation: Move firmware_restrict_branch_speculation_*() from C to CPP Srivatsa S. Bhat
2018-07-15 11:26 ` [RESEND] Spectre-v2 (IBPB/IBRS) and SSBD fixes for 4.4.y Greg KH
2018-07-16 8:02 ` Srivatsa S. Bhat
2018-07-23 11:26 ` Greg KH
2018-07-23 17:27 ` Srivatsa S. Bhat
2018-07-23 22:06 ` Jiri Kosina
2018-07-24 20:13 ` Srivatsa S. Bhat
2018-07-24 22:02 ` Jiri Kosina
2018-07-26 23:09 ` Kees Cook
2018-08-02 19:22 ` Srivatsa S. Bhat
2018-08-02 22:22 ` Kees Cook
2018-08-03 23:20 ` Srivatsa S. Bhat
2018-08-07 13:49 ` Greg KH
2018-08-07 19:08 ` Srivatsa S. Bhat
2018-08-07 19:15 ` Greg KH
2018-08-07 19:19 ` Srivatsa S. Bhat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).