Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754804AbeAOIvB (ORCPT + 1 other); Mon, 15 Jan 2018 03:51:01 -0500 Received: from edison.jonmasters.org ([173.255.233.168]:42808 "EHLO edison.jonmasters.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753842AbeAOIu7 (ORCPT ); Mon, 15 Jan 2018 03:50:59 -0500 X-Greylist: delayed 1450 seconds by postgrey-1.27 at vger.kernel.org; Mon, 15 Jan 2018 03:50:59 EST To: Henrique de Moraes Holschuh , Andi Kleen References: <20180112184550.6573-1-andi@firstfloor.org> <1515784373.22302.492.camel@infradead.org> <20180112192126.su2evwfefdfeaa6g@two.firstfloor.org> <20180112220349.7dorb3lde4tffsjm@khazad-dum.debian.net> Cc: David Woodhouse , tglx@linutronix.de, x86@kernel.org, linux-kernel@vger.kernel.org, pjt@google.com, torvalds@linux-foundation.org, gregkh@linux-foundation.org, peterz@infradead.org, luto@amacapital.net, thomas.lendacky@amd.com, arjan.van.de.ven@intel.com From: Jon Masters Organization: World Organi{s,z}ation Of Broken Dreams Message-ID: <985f979e-0740-5d8a-d6b8-b023105aa021@jonmasters.org> Date: Mon, 15 Jan 2018 03:26:34 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <20180112220349.7dorb3lde4tffsjm@khazad-dum.debian.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 74.92.29.237 X-SA-Exim-Mail-From: jcm@jonmasters.org Subject: Re: Improve retpoline for Skylake X-SA-Exim-Version: 4.2.1 (built Sun, 08 Nov 2009 07:31:22 +0000) X-SA-Exim-Scanned: Yes (on edison.jonmasters.org) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/12/2018 05:03 PM, Henrique de Moraes Holschuh wrote: > On Fri, 12 Jan 2018, Andi Kleen wrote: >>> Skylake still loses if it takes an SMI, right? >> >> SMMs are usually rare, especially on servers, and are usually >> not very predictible, and even if you have > > FWIW, a data point: SMIs can be generated on demand by userspace on > thinkpad laptops, but they will be triggered from within a kernel > context. I very much doubt this is a rare pattern... Sure. Just touch some "legacy" hardware that the vendor emulates in a nasty SMI handler. It's definitely not acceptable to assume that SMIs can't be generated under the control of some malicious user code. Our numbers on Skylake weren't bad, and there seem to be all kinds of corner cases, so again, it seems as if IBRS is the safest choice. Jon.