Received: by 10.223.176.5 with SMTP id f5csp717683wra; Sat, 27 Jan 2018 08:26:45 -0800 (PST) X-Google-Smtp-Source: AH8x227XZ5SzMNathMW37SAP0sM2MGLUiPGv2q05VXhXPNUO3dLW8KE5OZJlTjfsamBN+MfR4E1Q X-Received: by 2002:a17:902:bc4b:: with SMTP id t11-v6mr17556016plz.324.1517070405878; Sat, 27 Jan 2018 08:26:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517070405; cv=none; d=google.com; s=arc-20160816; b=MJvhkRIL2fu5k9oujRaEzNeUjJ0clNqlxojpD6AS34JI0QA4fLGkBVus2FYT5Fg7Hv 65PG/4j24rfMKnrzraAGUjFWnWqRzjHPSFpkGbfg+1zRsBGonNwMufmZ2FRxUau2mmQO coFhs5A6EelzR0whz7WLpXIeChFFecHdXc3YgcfpGmmJeleU1hMpkU3BWDJQuHe4FhXS 3a1sju9qIcN5aJIA9t6scGkh+NfG5EyFHTdWiRwFZj4ifjJkHjhAgXZdYBpim3C5ilUb PSk89KX4Yo1I9bYt9oBzp36MTgtwFmBhfYgGo8imASA0y3k59AkaTGvG1fnOeUT8oAXA ALKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from :dkim-signature:arc-authentication-results; bh=T9UXqeIlUKCZsdq2nTn8zgZOpamUIkiYxdB1QBuIMpE=; b=WlSUG8a5+au8Mi1069N4NLCyRD/P8R2UNiojqhMiTtUx47XN5Q9srzqKfaQ2QnxoP5 be359jXlH8qiXaYYYCeeZBU/azGznjRw0WaoAY/vUDVjrYihL2mBUn4kKaXJaSyiGbrK +i8JcxkO5UGP4HhR7ZeNkqbRz+x8TMeD4iVKC6ZJckyFO0UfDT1+TiEoDQQklEeklTOl Y0vMuGf4kWpriSItvoEyCLG+B3St0YD31zY4gE1yijW1vupJsDlFrMmEFTFfNbdOySJt LOA9BXfQRCk2wzt0rfEU/gxfKrXDgfIIya7hykaOUXb6xs9uJX1ejA27qGwDNK7Q+hKk /fOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.co.uk header.s=amazon201209 header.b=edf8ISVF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e188si8259269pfc.75.2018.01.27.08.26.31; Sat, 27 Jan 2018 08:26:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.co.uk header.s=amazon201209 header.b=edf8ISVF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753232AbeA0QYt (ORCPT + 99 others); Sat, 27 Jan 2018 11:24:49 -0500 Received: from smtp-fw-4101.amazon.com ([72.21.198.25]:31768 "EHLO smtp-fw-4101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753144AbeA0QYr (ORCPT ); Sat, 27 Jan 2018 11:24:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.co.uk; i=@amazon.co.uk; q=dns/txt; s=amazon201209; t=1517070287; x=1548606287; h=from:to:subject:date:message-id; bh=T9UXqeIlUKCZsdq2nTn8zgZOpamUIkiYxdB1QBuIMpE=; b=edf8ISVF/scU6pTI1HjGFciONBMmQp/zdFYp8pUU9XBkg6gO7+qsaUaZ I3sf3Q1a1HoXw149cpnZNhJr+B+voAWetPJBlRQsvZirZm/KYEMo2gj5s ZXWWOwUemY5cJVgSXdL3eROODxw50uSB1GZADt/Dh4Ao0WZ3imIRlDrw3 c=; X-IronPort-AV: E=Sophos;i="5.46,422,1511827200"; d="scan'208";a="705555699" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1a-67b371d8.us-east-1.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-4101.iad4.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Jan 2018 16:24:46 +0000 Received: from uc8d3ff76b9bc5848a9cc.ant.amazon.com (iad1-ws-svc-lb91-vlan3.amazon.com [10.0.103.150]) by email-inbound-relay-1a-67b371d8.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id w0RGOcmm015169 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 27 Jan 2018 16:24:40 GMT Received: from uc8d3ff76b9bc5848a9cc.ant.amazon.com (localhost [127.0.0.1]) by uc8d3ff76b9bc5848a9cc.ant.amazon.com (8.15.2/8.15.2/Debian-3) with ESMTP id w0RGOb6H012535; Sat, 27 Jan 2018 16:24:37 GMT Received: (from dwmw@localhost) by uc8d3ff76b9bc5848a9cc.ant.amazon.com (8.15.2/8.15.2/Submit) id w0RGOaje012532; Sat, 27 Jan 2018 16:24:36 GMT From: David Woodhouse To: arjan@linux.intel.com, tglx@linutronix.de, karahmed@amazon.de, x86@kernel.org, linux-kernel@vger.kernel.org, tim.c.chen@linux.intel.com, bp@alien8.de, peterz@infradead.org, pbonzini@redhat.com, ak@linux.intel.com, torvalds@linux-foundation.org, gregkh@linux-foundation.org, dave.hansen@intel.com Subject: [PATCH 0/3] Speculation CPU feature cleanups Date: Sat, 27 Jan 2018 16:24:31 +0000 Message-Id: <1517070274-12128-1-git-send-email-dwmw@amazon.co.uk> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix up the cpufeatures so that only the hardware features are visible in /proc/cpuinfo. as "ibpb", "ibrs" and "stibp". The virtual features, and software flags which are only in X86_FEATURE_* because that's the only way to use alternatives, get masked away. We don't *want* to show that stuff to all users in /proc/cpuinfo; it's available to a more restricted audience in the sysfs vulnerability files instead. (We should probably remove PTI too, but that can be done separately.) Boris also wants to put things out of line to reduce the size of the ALTERNATIVE blocks and simplify backports to older kernels, so tweak and apply his patches for that too. Borislav Petkov (2): x86/retpoline: Simplify vmexit_fill_RSB() x86/speculation: Simplify indirect_branch_prediction_barrier() David Woodhouse (1): x86/cpufeatures: Clean up Spectre v2 related CPUID flags arch/x86/entry/entry_32.S | 3 +- arch/x86/entry/entry_64.S | 3 +- arch/x86/include/asm/asm-prototypes.h | 3 ++ arch/x86/include/asm/cpufeatures.h | 18 ++++---- arch/x86/include/asm/nospec-branch.h | 83 +++++------------------------------ arch/x86/include/asm/processor.h | 3 ++ arch/x86/kernel/cpu/bugs.c | 11 +++-- arch/x86/kernel/cpu/intel.c | 31 ++++++++----- arch/x86/lib/Makefile | 1 + arch/x86/lib/retpoline.S | 56 +++++++++++++++++++++++ 10 files changed, 116 insertions(+), 96 deletions(-) -- 2.7.4