Received: by 10.213.65.68 with SMTP id h4csp819089imn; Fri, 23 Mar 2018 17:42:08 -0700 (PDT) X-Google-Smtp-Source: AG47ELuuGu/51/ZBeitEobpsq7BGPbo35+wTVt3yZAhwCAQlLdUIJd8sqik4NKzlgMIKn50li3La X-Received: by 10.99.49.19 with SMTP id x19mr8574222pgx.250.1521852128297; Fri, 23 Mar 2018 17:42:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521852128; cv=none; d=google.com; s=arc-20160816; b=B7CwUOZ0Tyxfp/+aE2XvrWEo5VdLgtXZOqGex4lgVYuMmY3dgFJV78YGzupTupiomB p1J7+aNJKSnyM2d3xB8+/Qy1J68ulCj0El1Fs801qrNQYnREGq5LqE3dXlCLWrwWfRdU G9BlsHUX1Hop/8x9T90RidAwGBDnfXGfm5yp56uOg/pMJpJbQf4JubvgmDq9xtLym058 2r6TkSoJGBKHCkj5OCNyzp+14PiZKpYxLm40L4lGBJtDzmHIWOs4Dcg6ZQzOdALcUXEk j7uqG1HjXFygb3IZPSkB4b7bUmRUjeWTV2lljAX0K3Ngm2eyBH9Y3xZeDVtnWmMNSPCa dH7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:cc:references:to:subject:arc-authentication-results; bh=01bxaeOOqaPeA94ZvnCTP5xiTgHoPXnd01Jc8xNMUPk=; b=Xz8stnlJSGz5wjVsMb2J+zr5yvznpfitrCqt4Gb/4gYacnUzhCFrpZ4kLwgwtnr2oG jF+hoRfcku2Fe0MZ/SIZQ3e7MR6EuYQ8YFwjio/tvGFxsM2SzMPOYPiHCpgRT+5DRGoG q0M9WMQ4xCWA9T9CHqlGXJ6AahYUnXDblrwMs1sZ7K+Pw5OY3ea/osiplMUowEMqJFe4 /uNYqH6+4q9rY5zq32FP8Oi02/WbMLoGF5/e0RkllgNSOn/4IhJUA5jjfEL9TSV5E7Vj 4H3RUaKzOnXJaH5JXhffwNK3LzSCIESxO0dvjSf7gU1enhzJ2D/pBQ9xqf7wuIo0dM3r nOOA== 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 w1si6687385pgq.135.2018.03.23.17.41.52; Fri, 23 Mar 2018 17:42:08 -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 S1751981AbeCXAlA (ORCPT + 99 others); Fri, 23 Mar 2018 20:41:00 -0400 Received: from mga01.intel.com ([192.55.52.88]:55975 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751806AbeCXAk7 (ORCPT ); Fri, 23 Mar 2018 20:40:59 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Mar 2018 17:40:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,352,1517904000"; d="scan'208";a="36364722" Received: from jcoito-mobl.amr.corp.intel.com (HELO [10.254.71.143]) ([10.254.71.143]) by FMSMGA003.fm.intel.com with ESMTP; 23 Mar 2018 17:40:58 -0700 Subject: Re: [PATCH 00/11] Use global pages with PTI To: Linus Torvalds References: <20180323174447.55F35636@viggo.jf.intel.com> Cc: Linux Kernel Mailing List , linux-mm , Andrea Arcangeli , Andrew Lutomirski , Kees Cook , Hugh Dickins , =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= , the arch/x86 maintainers , namit@vmware.com From: Dave Hansen Message-ID: Date: Fri, 23 Mar 2018 17:40:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. I'll ask around, but I'm open to any ideas about what the heck might be causing this.