]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/spectre: move microcode check before kernel ibrs flags are set
authorDaniel Jordan <daniel.m.jordan@oracle.com>
Tue, 13 Feb 2018 14:52:59 +0000 (06:52 -0800)
committerJack Vogel <jack.vogel@oracle.com>
Fri, 16 Feb 2018 22:47:43 +0000 (14:47 -0800)
commit3886855cb7358c0be3a3176805f591c423533358
treec5c31af3700e42e565737c143cce1ae7b93c92c6
parent889fcce7521993b403a02e200c42f89c0f6a10c8
x86/spectre: move microcode check before kernel ibrs flags are set

The check for bad spectre microcode, which prints "disabling
SPEC_CTRL/IBRS", happens after the kernel turns on its flags for "IBRS
supported" and "IBRS in use"

When the microcode check runs, it disables the CPU capability but the
kernel flags have already been set based on the disabled capability.

So to fix it, we should move the microcode check to before the kernel
flags are set.

Orabug: 27542331
CVE: CVE-2017-5715
Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
arch/x86/kernel/cpu/intel.c
arch/x86/kernel/cpu/scattered.c