Received: by 10.223.176.46 with SMTP id f43csp994731wra; Sat, 20 Jan 2018 08:38:08 -0800 (PST) X-Google-Smtp-Source: AH8x2262yidACxnK0QjW9K8dRwh0iz1Utr4yN3eOWdNFaMwvmd7ie0ZIVOQ0Z16LK7Io+Gl0Pn4w X-Received: by 2002:a17:902:4283:: with SMTP id h3-v6mr1170203pld.175.1516466288016; Sat, 20 Jan 2018 08:38:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516466287; cv=none; d=google.com; s=arc-20160816; b=K3YCAAaxQ8fuuSOXD3Zi+hGsb19Hw56/sczoxYiSXVaVn7Nkw9sNDEpA6nxQ0/p+MN eWxl0ndT1cBUFXEjqfv9C2Owgcc2dVWRULC2uiXQl9p6oZDL1uciJCVu6b8KiNWkX7LN dD/xYscvl8u+bomdMjIb/Cb5PAFqwPSGzmyEZ9rjcG03+stxbN0MwPvKMmQwfHhpefjO RVkWMxx8AEG+0zA+0iXjgPPzdjRp6g62iXtZL42brElK+Did8v8gDhbRw6/E/VKMgB3F UUUMHwd+7Ye7/OU4fUIWXYYwJ0iwCikboD3E4vmP56VMXe0yQ3glYQ8RU+lmP7a1TKHx Sigw== 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:arc-authentication-results; bh=YUAHMDmH49TNBDq3CKNzoPTalCoInIDrIP3bCzALsVQ=; b=c574lIheZhLa126934IDiq4XSFB80VDUrvuuXbUKAVTrAncDbIMp+ztv7wTi8Jr7Bw MUah/OIk2zRAiypYksgdrcmtfgKteJlWmBz+k8d4AMzumjZSy9dGdfBA3PhACsUZf2QC RcBYF9HN2RJ1CHCKz0BtkpWQjrcShLB+i7LmltL9LIdDpYhHrdAjFxMzSXMq+9dJn7I4 K6+RhfVimEo5pcm1Vy+H5ZkgRNjcC+nMJeKt6F6zr2XOZzFsV/J3TbFTk+mLUOz9NHE4 2f6E6fIbLXxZKTrGI62+Ft3G9WVQFUUsaC4WW0iThwGRaoDs85aqaCKtpo18nfZreUJd kuMg== ARC-Authentication-Results: i=1; mx.google.com; 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 d62si10652418pga.576.2018.01.20.08.37.53; Sat, 20 Jan 2018 08:38:07 -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; 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 S1756434AbeATQbx (ORCPT + 99 others); Sat, 20 Jan 2018 11:31:53 -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 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id w0KGVU6A026424; Sat, 20 Jan 2018 17:31:30 +0100 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 Precedence: bulk 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