]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/speculation: Exclude ATOMs from speculation through SWAPGS
authorThomas Gleixner <tglx@linutronix.de>
Wed, 17 Jul 2019 19:18:59 +0000 (21:18 +0200)
committerBrian Maly <brian.maly@oracle.com>
Tue, 30 Jul 2019 19:28:18 +0000 (15:28 -0400)
commit945c68b03a18f3dc1c12046ae15f38fd999bd63b
tree106eafc93889779d758d8a9823913c0aca73a7be
parent0b69e5a68f144a05dc3ba5e80a823d45d7dec1d3
x86/speculation: Exclude ATOMs from speculation through SWAPGS

Intel provided the following information:

On all current Atom processors, instructions that use a segment register
value (e.g. a load or store) will not speculatively execute before the
last writer of that segment retires. Thus they will not use a
speculatively written segment value.

That means on ATOMs there is no speculation through SWAPGS, so the SWAPGS
entry paths can be excluded from the extra LFENCE if PTI is disabled.

Create a separate bug flag for the through SWAPGS speculation and mark all
out-of-order ATOMs and AMD/HYGON CPUs as not affected. The in-order ATOMs
are excluded from the whole mitigation mess anyway.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Tyler Hicks <tyhicks@canonical.com>
Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com>
(cherry picked from commit f36cf386e3fec258a341d446915862eded3e13d8)
Orabug: 29967571
CVE: CVE-2019-1125

Signed-off-by: Kanth Ghatraju <kanth.ghatraju@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
arch/x86/include/asm/cpufeature.h
arch/x86/kernel/cpu/bugs_64.c
arch/x86/kernel/cpu/common.c