]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
x86/bugs: Unify x86_spec_ctrl_{set_guest,restore_host}
authorBorislav Petkov <bp@suse.de>
Fri, 11 May 2018 22:14:51 +0000 (00:14 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 24 May 2018 07:59:19 +0000 (09:59 +0200)
commit3a403df4197bb016b8cfe3f0e425e8ef648faa2d
tree30dcbe62acb70051fd11e08a50751f622ee0eb64
parent559c7a5917056bd60a11ad4095a550ef8b95825f
x86/bugs: Unify x86_spec_ctrl_{set_guest,restore_host}

Function bodies are very similar and are going to grow more almost
identical code. Add a bool arg to determine whether SPEC_CTRL is being set
for the guest or restored to the host.

No functional changes.

Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CVE-2018-3639 (x86)

(backported from commit cc69b34989210f067b2c51d5539b5f96ebcc3a01)
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/x86/include/asm/spec-ctrl.h
arch/x86/kernel/cpu/bugs.c