From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756450AbeATQbz (ORCPT ); Sat, 20 Jan 2018 11:31:55 -0500 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:39985 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755247AbeATQbq (ORCPT ); Sat, 20 Jan 2018 11:31:46 -0500 Date: Sat, 20 Jan 2018 17:31:30 +0100 From: Willy Tarreau To: Ingo Molnar Cc: Nadav Amit , Dave Hansen , LKML , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , Linus Torvalds Subject: Re: [RFC] x86: Avoid CR3 load on compatibility mode with PTI Message-ID: <20180120163130.GA26410@1wt.eu> References: <20180114201306.3554-1-namit@vmware.com> <57a8fa6b-a1d1-d440-ce13-b1d06d265584@linux.intel.com> <3D823F02-89EF-48D9-913D-5E65391F6F9D@gmail.com> <20180116004128.us5uprkzrr5gf4li@gmail.com> <5D6CD440-B20F-4ABF-8B02-EE87205B661D@gmail.com> <20180120142627.jttjdsenwsedvle6@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180120142627.jttjdsenwsedvle6@gmail.com> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 20, 2018 at 03:26:27PM +0100, Ingo Molnar wrote: > > * Nadav Amit wrote: > > > > So we are trading a 5-15% slowdown (PTI) for another 5-15% slowdown, plus we > > > are losing the soft-SMEP feature on older CPUs that PTI enables, which is a > > > pretty powerful mitigation technique. > > > > This soft-SMEP can be kept by keeping PTI if SMEP is unsupported. Although we > > trade slowdowns, they are different ones, which allows the user to make his best > > decision. > > Indeed, not allowing PTI to be disabled if SMEP is unavailable might be a > solution. Well, I do not agree with this, for the simple reason that the SMEP-like protection provided by PTI was in fact a byproduct of the Meltdown mitigation, eventhough quite a valuable one. For me, disabling PTI means "I want to recover the performance I had on this workload before the PTI fixes because I value performance over security". By doing it per process we'll allow users to have both performance for a few processes and protection (including SMEP-like) for the rest of the system. Their only other choice will be to completely disable PTI, thus removing all protection and losing the SMEP emulation. Best regards, Willy