]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
x86/spec_ctrl: Add sysctl knobs to enable/disable SPEC_CTRL feature
authorTim Chen <tim@otc-grantley-02.jf.intel.com>
Thu, 16 Nov 2017 12:47:48 +0000 (04:47 -0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 9 Feb 2018 20:14:26 +0000 (20:14 +0000)
commitdf043b74ba716ae2f6468e6b0c1d6b5a27d7b180
tree258fcfe5a21017aa87df56f3ab23f94bb35facc1
parent9bfbaa3eeb4a1311eb3666c16afa5b56f8176f14
x86/spec_ctrl: Add sysctl knobs to enable/disable SPEC_CTRL feature

CVE-2017-5715 (Spectre v2 Intel)

There are 2 ways to control IBPB and IBRS

1. At boot time
noibrs kernel boot parameter will disable IBRS usage
noibpb kernel boot parameter will disable IBPB usage
Otherwise if the above parameters are not specified, the system
will enable ibrs and ibpb usage if the cpu supports it.

2. At run time
echo 0 > /proc/sys/kernel/ibrs_enabled will turn off IBRS
echo 1 > /proc/sys/kernel/ibrs_enabled will turn on IBRS in kernel
echo 2 > /proc/sys/kernel/ibrs_enabled will turn on IBRS in both userspace and kernel

Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
(backported from commit 50169d8fada2532084c9f8ccde51c6c9211603d5)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
13 files changed:
Documentation/admin-guide/kernel-parameters.txt [new file with mode: 0644]
arch/x86/include/asm/mwait.h
arch/x86/include/asm/spec_ctrl.h
arch/x86/kernel/cpu/intel.c
arch/x86/kernel/cpu/microcode/core.c
arch/x86/kernel/process.c
arch/x86/kernel/smpboot.c
arch/x86/kvm/vmx.c
arch/x86/lib/delay.c
arch/x86/mm/tlb.c
include/linux/smp.h
kernel/smp.c
kernel/sysctl.c