Received: by 10.223.176.5 with SMTP id f5csp242112wra; Tue, 30 Jan 2018 10:45:29 -0800 (PST) X-Google-Smtp-Source: AH8x225KjGkr/0eWexR8MYYz2rV9Tj3J4skQ4PFYZDMo7FAkyFUXKOFtENCPrHnL1N2spHTfmQl9 X-Received: by 2002:a17:902:8491:: with SMTP id c17-v6mr26253076plo.105.1517337928991; Tue, 30 Jan 2018 10:45:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517337928; cv=none; d=google.com; s=arc-20160816; b=t+PvStTTVcIGoc4/YT3MSDSImYAQMoWxcoDvCrF/Z0wgfdW6ObYq0h6Z9stmQwgLKv NDVwbqmUsmT12MwTrWGDayXZYFzAHt0pE2vPciiPIKz+x/bEsPhnNPMNszyyKBXoqgb1 KFYCgSspIhJSemqEriL4r/ijTRGXhHtZXI6mOljoA16bTi2WyvlJHA1mGF0QWhi5nyzO kU5KKiCuRh3htBvnvhXEiM2+ZZoDSNWVZm7mhlPw8NRbPZPQF73hNONP20txzwPnP6nb 8J/YSqlOC4tpGnjLlR9Pq8l7tIHFNi8VjFBTmKWieL2Zicp+sYINEF133nsFZuQ0BJX6 1/mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature :arc-authentication-results; bh=kg8UWB4/imvMFAqiz7J3ZWDSaycdQAwxP6uUrcJ4UhY=; b=CtSjT00A2e3ymVdkdRXOyql0NriWDE4HmWjDhxg4NMOrxAp530EsDkmvtnsAkqY+Z+ FIpjUmac122HP8wHQUPZdbolrLF0QVUL6HMWFzjpt44KEXlvGbLcgtmnPYWRdN5Gfl25 u8au4e1Tq4K3d3yuYYBfwiuI/thalXwNA0kmA5Uw8DUIhnnQb/vcZvGVfrsdU3Wb+649 Yt0sse1qXPae+LBJww9KBS/EDDoQL7ygdltQ+XofQL6UD3xUI0cQkLM2pzd4OpmxH4IG e7VymSubj9qpdfyEaPr6tQTy1jEzdEL1JDCQfxgKBa8KNAmSH+9tQw+Qj0sQa/yVP/e1 d8TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hmh.eng.br header.s=fm1 header.b=Hn02O5zQ; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=oOmyrk6R; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23si2315314pff.83.2018.01.30.10.45.14; Tue, 30 Jan 2018 10:45:28 -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=@hmh.eng.br header.s=fm1 header.b=Hn02O5zQ; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=oOmyrk6R; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753561AbeA3STW (ORCPT + 99 others); Tue, 30 Jan 2018 13:19:22 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:60493 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752167AbeA3STS (ORCPT ); Tue, 30 Jan 2018 13:19:18 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id DAF3C2108D; Tue, 30 Jan 2018 13:19:17 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Tue, 30 Jan 2018 13:19:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hmh.eng.br; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=kg8UWB4/imvMFAqiz7J3ZWDSaycdQAwxP6uUrcJ4UhY=; b=Hn02O5zQ 30APLYx9LJaUE2mEYoaOBHgAw2htdQvHvzYQH99tZGca+oaZ0menfqo51TrVmABs onjrZc6QJ4FIlJ3OJTAYYa/FkC8Pte9LkPqcc5rvJAvRsNWUdxtuF9gpWJrxmX8S j3zD81KKHAyNxQyKNuqQ/aKX3C9+KQ3QpnU5Cj4p//RzsYNIBPn9QN+nsh0KLaHX zpFXwpp3YydWGP49soeyQE7gxceI9/SREjCb1WqSY0bg4s1xVRhPDg6H8816eSqv xl5P5W8Ql6fDhisUGjkeT5Z9BpQXYEItKbYa0YwNONczJbHpps/flCTq0Tt5cX6t Us/tiIKFQSdukQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=kg8UWB4/imvMFAqiz7J3ZWDSaycdQ AwxP6uUrcJ4UhY=; b=oOmyrk6RN/vMbIZTLXvynPj4fA/EWHF+/8Dhm+dVCq3RF PVBVVQmCClYG9eFdlh1Bwjru1bLPWx56Y9zzyjulKwcM/28FfXws2Vumsw5JV2Rs wsGI0bvAuUwnNesrQl/hKsWLDr646FMflNy04D9/cxi6uTF8MT+OmgiuWZ250sVU kHAzzgw5S1Wr8bc9WD7MH/bIm3hgEuNGOMag3jTOls7NdCwYjL6KLKYsmkzqhqMs 1AuHRVJR8o5IgnJzboq9YQEvim7CR7fNi1oMePbY+GJMcpb/oDnY8FCr6r02gpd1 J/UXuDru7Vw2ruBIpIaeXVZ6vRr4PhiLtnBo8BQ8Q== X-ME-Sender: Received: from khazad-dum.debian.net (unknown [201.82.128.91]) by mail.messagingengine.com (Postfix) with ESMTPA id 4CE4A7E3D5; Tue, 30 Jan 2018 13:19:17 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by localhost.khazad-dum.debian.net (Postfix) with ESMTP id 710123400BFC; Tue, 30 Jan 2018 16:19:15 -0200 (-02) X-Virus-Scanned: Debian amavisd-new at khazad-dum.debian.net Received: from khazad-dum.debian.net ([127.0.0.1]) by localhost (khazad-dum2.khazad-dum.debian.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nXoxQR7gh0JG; Tue, 30 Jan 2018 16:19:14 -0200 (-02) Received: by khazad-dum.debian.net (Postfix, from userid 1000) id 38A543400BEF; Tue, 30 Jan 2018 16:19:14 -0200 (-02) Date: Tue, 30 Jan 2018 16:19:14 -0200 From: Henrique de Moraes Holschuh To: Borislav Petkov Cc: Thomas Gleixner , David Woodhouse , arjan@linux.intel.com, karahmed@amazon.de, x86@kernel.org, linux-kernel@vger.kernel.org, tim.c.chen@linux.intel.com, peterz@infradead.org, pbonzini@redhat.com, ak@linux.intel.com, torvalds@linux-foundation.org, gregkh@linux-foundation.org Subject: Re: [PATCH] x86/cpuid: Fix up "virtual" IBRS/IBPB/STIBP feature bits on Intel Message-ID: <20180130181914.vxheaikugelkfxsb@khazad-dum.debian.net> References: <1517269773-16750-1-git-send-email-dwmw@amazon.co.uk> <20180130105814.m5zd43dyx2o2ius2@pd.tnic> <1517310230.18619.86.camel@infradead.org> <20180130111848.zjv2dngfzcz35lyt@pd.tnic> <1517311693.18619.102.camel@infradead.org> <1517314193.18619.115.camel@infradead.org> <20180130131122.s3bs6lbs43go73gj@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180130131122.s3bs6lbs43go73gj@pd.tnic> X-GPG-Fingerprint1: 4096R/0x0BD9E81139CB4807: C467 A717 507B BAFE D3C1 6092 0BD9 E811 39CB 4807 User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 30 Jan 2018, Borislav Petkov wrote: > On Tue, Jan 30, 2018 at 01:57:21PM +0100, Thomas Gleixner wrote: > > So much for the theory. That's not going to work. If the boot cpu has the > > feature then the alternatives will have been applied. So even if the flag > > mismatch can be observed when a secondary CPU comes up the outcome will be > > access to a non existing MSR and #GP. > > Yes, with mismatched microcode we're f*cked. > > So my question is: is there such microcode out there or is this > something theoretical which we want to address? Old mixed-stepping systems would have mismatched microcode even when everything went right, just because they had different processor steppings that took different microcode. Those systems could have mismatched CPU flags (regardless of their microcode being up-to-date or not) simply because the processor with the newer stepping might have more features. This happened at least once during the FSB-era Xeons. I came across several (large three-letter vendor) x86 Intel-based servers that were in such a condition, *all using official parts*, because they got upgraded with a second processor sometime after they were boght, and the part number delivered by said three-letter vendor was a newer stepping. You will notice those were all *fully and officially supported* hardware configurations, and documented as such in the processor specification updates. There was also a crop of UEFI and BIOSes out there that would not properly update the microcode on all processor cores, several years ago. > And if I were able to wish, I'd like to blacklist that microcode in > dracut so that it doesn't come anywhere near my system. Well, the microcode update of a core can soft-fail, and the fact is that we don't handle such failures at all in any way. Not that I know what would be the right error handling for something like this... kicking the processor offline (or refusing to online it) might be a good way to handle it. And one could at least retry once... Anyway, we don't even report it, which is certainly Not Good Enough. That said, iucode-tool v2.3, released a couple days ago, can do revision-based blacklisting of microcode[1], if you want to fine-comb the stuff you're going to ship to your users, etc. [1] iucode-tool is somewhat widely used *outside* of the Fedora/RedHat ecosystem, but not even packaged by Fedora, AFAIK. So, it won't be relevant to several people in the To/CC list ;-) -- Henrique Holschuh