]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
cpu/hotplug: Fix SMT supported evaluation
authorThomas Gleixner <tglx@linutronix.de>
Tue, 7 Aug 2018 06:19:57 +0000 (08:19 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 9 Aug 2018 16:05:03 +0000 (18:05 +0200)
commitade31b9e4b25f50b8e2bbf21e74d9385b713d141
treee131c34b75a89a46b7034ddbcd1530afc41995cb
parent1ccd99944c7fcd46f86723d5fbbf2b0910a1e580
cpu/hotplug: Fix SMT supported evaluation

Josh reported that the late SMT evaluation in cpu_smt_state_init() sets
cpu_smt_control to CPU_SMT_NOT_SUPPORTED in case that 'nosmt' was supplied
on the kernel command line as it cannot differentiate between SMT disabled
by BIOS and SMT soft disable via 'nosmt'. That wreckages the state and
makes the sysfs interface unusable.

Rework this so that during bringup of the non boot CPUs the availability of
SMT is determined in cpu_smt_allowed(). If a newly booted CPU is not a
'primary' thread then set the local cpu_smt_available marker and evaluate
this explicitely right after the initial SMP bringup has finished.

SMT evaulation on x86 is a trainwreck as the firmware has all the
information _before_ booting the kernel, but there is no interface to query
it.

Fixes: 73d5e2b47264 ("cpu/hotplug: detect SMT disabled by BIOS")
Reported-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
CVE-2018-3620
CVE-2018-3646

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/x86/kernel/cpu/bugs.c
include/linux/cpu.h
kernel/cpu.c
kernel/smp.c