]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - Documentation/admin-guide/kernel-parameters.txt
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, 16 Feb 2018 17:42:52 +0000 (12:42 -0500)
commit357b57d7357d94c89bd1b8d5c15641e549c8e4c2
treedc4263de330d4327b67d9a747ef71dbc81e181de
parentdd2f70b28a565a5409daa16e0d357743087daa9d
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>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
[marcelo.cerri@canonical.com: add x86 guards to kernel/smp.c]
[marcelo.cerri@canonical.com: include asm/msr.h under x86 guard in kernel/sysctl.c]
Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
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
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