Received: by 10.213.65.68 with SMTP id h4csp665306imn; Tue, 27 Mar 2018 06:37:48 -0700 (PDT) X-Google-Smtp-Source: AG47ELtfkbenxc6NjftBYRkQoRLkcExbeRniR4OuTdKkyIX1WRy2XqL7C4jUp8lL3fuMdPwzlDGH X-Received: by 10.98.14.215 with SMTP id 84mr32313404pfo.168.1522157868633; Tue, 27 Mar 2018 06:37:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522157868; cv=none; d=google.com; s=arc-20160816; b=nmnR+WfMD/moAVtgy84xFTE83J+beQFRiUeGbGL2jb/T4+jqgatWfQJTEMvc5s+CLJ M+fag2J8utTVZqpRgTrOK+M4i7w4rQO8lZP+ck7iaYkk/mnYWTlSCZtus69lSVJR0DZS vq3LMSt/cfw1v6xRrMoknKafdsBG6a6bbnMih7IOQGqViRB0lRgxLOpZfF64gWTqGxYP vuQV111KnKaColDiDgJrRIFvVkwTyPXwe675OpeR2Mn3k4SW1qFw54HXQXTT5aI6aPsv +sJPZICPEBPyUM2jQf62Q2cUjqM7E9eSjdEnHSDFP9q0Y7QOiFmYl3qauxdPmjSb5bve rmNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=+1937ECvnOgSrmp6I892uyV17Y8IJQLa+i9DAf7wU3Y=; b=a0FQvFIYDIikNQh5l7Ae9BjcjqsFpATYtQAIRJuMaNH1jfC0roV7IXDPZ2WdxTr7zn bZXKK5yvLbxOgarqwPROCq6IVQKUXH6IhIPOvR/wOpMm1xKH4XY5a2f0Lzl6o9x2USGN r0Q07bwedV1FJu/2OF54KimGRj5dBReduEBkXG798ZnVaUzUCK1lndd3OUNRYErq3Grd 7kz4H0L2WjfdWLU9C/6h0SQa9GTylnBzbOQmTi3qTid3q3CoguK6RPunB8Q0Nu1ISOhU HNLyWLlyabswiU6dJnfWhLnEJyXd/zzsyW8TU4+Nq3ZFE6JvFK9KYGgUh7CR9kblJO+h TiuQ== 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 u2si921670pgc.321.2018.03.27.06.37.33; Tue, 27 Mar 2018 06:37:48 -0700 (PDT) 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 S1752748AbeC0NgS (ORCPT + 99 others); Tue, 27 Mar 2018 09:36:18 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:47996 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752279AbeC0NgQ (ORCPT ); Tue, 27 Mar 2018 09:36:16 -0400 Received: from hsi-kbw-5-158-153-52.hsi19.kabel-badenwuerttemberg.de ([5.158.153.52] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1f0olo-0000b2-1M; Tue, 27 Mar 2018 15:36:12 +0200 Date: Tue, 27 Mar 2018 15:36:10 +0200 (CEST) From: Thomas Gleixner To: Dave Hansen cc: Linus Torvalds , Linux Kernel Mailing List , linux-mm , Andrea Arcangeli , Andrew Lutomirski , Kees Cook , Hugh Dickins , =?ISO-8859-15?Q?J=FCrgen_Gro=DF?= , the arch/x86 maintainers , namit@vmware.com Subject: Re: [PATCH 00/11] Use global pages with PTI In-Reply-To: Message-ID: References: <20180323174447.55F35636@viggo.jf.intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 23 Mar 2018, Dave Hansen wrote: > On 03/23/2018 11:26 AM, Linus Torvalds wrote: > > On Fri, Mar 23, 2018 at 10:44 AM, Dave Hansen > > wrote: > >> > >> This adds one major change from the last version of the patch set > >> (present in the last patch). It makes all kernel text global for non- > >> PCID systems. This keeps kernel data protected always, but means that > >> it will be easier to find kernel gadgets via meltdown on old systems > >> without PCIDs. This heuristic is, I think, a reasonable one and it > >> keeps us from having to create any new pti=foo options > > > > Sounds sane. > > > > The patches look reasonable, but I hate seeing a patch series like > > this where the only ostensible reason is performance, and there are no > > performance numbers anywhere.. > > Well, rats. This somehow makes things slower with PCIDs on. I thought > I reversed the numbers, but I actually do a "grep -c GLB > /sys/kernel/debug/page_tables/kernel" and record that in my logs right > next to the output of time(1), so it's awfully hard to screw up. > > This is time doing a modestly-sized kernel compile on a 4-core Skylake > desktop. > > User Time Kernel Time Clock Elapsed > Baseline ( 0 GLB PTEs) 803.79 67.77 237.30 > w/series (28 GLB PTEs) 807.70 (+0.7%) 68.07 (+0.7%) 238.07 (+0.3%) > > Without PCIDs, it behaves the way I would expect. What's the performance benefit on !PCID systems? And I mean systems which actually do not have PCID, not a PCID system with 'nopcid' on the command line. Thanks, tglx