Return-path: Received: from aserp2120.oracle.com ([141.146.126.78]) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fBqp8-00061X-6R for speck@linutronix.de; Fri, 27 Apr 2018 02:01:14 +0200 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w3QNvH6Z087996 for ; Fri, 27 Apr 2018 00:01:07 GMT Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2120.oracle.com with ESMTP id 2hfw9anb7m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 27 Apr 2018 00:01:07 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w3R01611027665 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 27 Apr 2018 00:01:06 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w3R0153g015039 for ; Fri, 27 Apr 2018 00:01:05 GMT Message-Id: <20180426234820.977604071@localhost.localdomain> Date: Thu, 26 Apr 2018 19:48:20 -0400 From: konrad.wilk@oracle.com Subject: [MODERATED] [PATCH v6 00/11] [PATCH v6] Patches formerly known as SSB or MDD Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 To: speck@linutronix.de List-ID: Since v5: - Rebase on v4.17-rc2, retested on Skylake - Added Reviewed-by from Boris - Fixed up per Boris's review. Since v4 - Added support for bit(4) of X86_FEATURE_ARCH_CAPABILITIES - Created bugzilla to hold the existing Intel docs - Have three CPU flags for all of this: X86_BUG_SPEC_STORE_BYPASS - CPU is susceptible. X86_FEATURE_RDS - CPU is able to turn off speculative store bypass X86_FEATURE_SPEC_STORE_BYPASS_DISABLE - engage the mitigation - Fixed my EFI build issue - Extra patch (now up to 10) to deal with SPEC_CTRL whitelist so we don't try to WRMSRL SPEC_CTRL_RDS (Bit 2) on AMD machines. Since v3: - Fixed it per Boris's review. - Added Tim's comments. Things folks already know, but just in case you are new: - The titles are obfuscated as Subject: are not encrypted. Nor are the MIME attachment file names. - The cover letter subject is also mangled as I can't say spec_store_bypass_disable in the title. - The Suggested-by and Reviewed-by have an XX in front of them so that git send-email does not include the CC on the mailbox file. Here is the diffstat including the non-scrambled names of the patches. Documentation/admin-guide/kernel-parameters.txt | 32 ++++ arch/x86/include/asm/cpufeatures.h | 3 + arch/x86/include/asm/msr-index.h | 2 + arch/x86/include/asm/nospec-branch.h | 41 ++++- arch/x86/kernel/cpu/amd.c | 16 ++ arch/x86/kernel/cpu/bugs.c | 233 ++++++++++++++++++++++-- arch/x86/kernel/cpu/common.c | 46 +++-- arch/x86/kernel/cpu/intel.c | 6 + arch/x86/kvm/cpuid.c | 2 +- arch/x86/kvm/svm.c | 6 +- arch/x86/kvm/vmx.c | 14 +- drivers/base/cpu.c | 8 + include/linux/cpu.h | 2 + 13 files changed, 368 insertions(+), 43 deletions(-) Konrad Rzeszutek Wilk (10): x86/bugs: Concentrate bug detection into a separate function x86/bugs: Concentrate bug reporting into a separate function x86/bugs: Read SPEC_CTRL MSR during boot and re-use reserved bits. KVM/SVM/VMX/x86/bugs: Support the combination of guest IBRS and ours. x86/bugs: Expose the /sys/../spec_store_bypass and X86_BUG_SPEC_STORE_BYPASS x86/bugs: Provide boot parameters for the spec_store_bypass_disable mitigation x86/bugs/Intel: set proper CPU features and latch mitigation for RDS x86/bugs: Whitelist allowed SPEC_CTRL MSR values x86/bugs/AMD: Add support to disable RDS on Fam[15,16,17]h if requested x86/KVM/VMX: Expose SPEC_CTRL Bit(2) to the guest