]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/speculation: Simplify the CPU bug detection logic
authorDominik Brodowski <linux@dominikbrodowski.net>
Tue, 22 May 2018 09:05:39 +0000 (11:05 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 22 May 2019 22:15:09 +0000 (23:15 +0100)
commit59abe0ba8ee02d9144c5e527de94b4dfa1c092bd
treead71b55b97f9c8e5f3dccf5aa8bdc68b6d00e06c
parentf5942c1205ffd7d5d0ade0253eb37aa941e5d834
x86/speculation: Simplify the CPU bug detection logic

commit 8ecc4979b1bd9c94168e6fc92960033b7a951336 upstream.

Only CPUs which speculate can speculate. Therefore, it seems prudent
to test for cpu_no_speculation first and only then determine whether
a specific speculating CPU is susceptible to store bypass speculation.
This is underlined by all CPUs currently listed in cpu_no_speculation
were present in cpu_no_spec_store_bypass as well.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: bp@suse.de
Cc: konrad.wilk@oracle.com
Link: https://lkml.kernel.org/r/20180522090539.GA24668@light.dominikbrodowski.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/kernel/cpu/common.c