From: Konrad Rzeszutek Wilk Date: Sun, 7 Jan 2018 16:30:51 +0000 (-0500) Subject: x86/spec: Actually do the check for in_use on ENABLE_IBRS X-Git-Tag: v4.1.12-124.31.3~1294 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b66aff637834a1bb791d42ec97c7cb027570eb5c;p=users%2Fjedix%2Flinux-maple.git x86/spec: Actually do the check for in_use on ENABLE_IBRS Orabug: 27344012 CVE: CVE-2017-5715 Reported-by: Boris Ostrovsky Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Kirtikar Kashyap --- diff --git a/arch/x86/include/asm/spec_ctrl.h b/arch/x86/include/asm/spec_ctrl.h index 5f7e27644a81..26f1fac1fee9 100644 --- a/arch/x86/include/asm/spec_ctrl.h +++ b/arch/x86/include/asm/spec_ctrl.h @@ -128,7 +128,10 @@ add $(32*8), %rsp; .macro ENABLE_IBRS -ALTERNATIVE "", __stringify(__ASM_ENABLE_IBRS), X86_FEATURE_SPEC_CTRL + testl $SPEC_CTRL_IBRS_INUSE, use_ibrs + jz 7f + __ASM_ENABLE_IBRS +7: .endm .macro ENABLE_IBRS_CLOBBER