Delivered-To: jekarlson@gmail.com Received: by 10.140.18.164 with SMTP id 33csp1366422qgf; Fri, 23 Feb 2018 20:36:24 -0800 (PST) X-Google-Smtp-Source: AH8x2245yBTA07jQK03M74VjEH9GPczzCu6crCy19bpWp+Q9oetmyMl/WcVQvDfmB3R0wa/lh+4g X-Received: by 10.99.179.8 with SMTP id i8mr3115669pgf.337.1519446984477; Fri, 23 Feb 2018 20:36:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519446984; cv=none; d=google.com; s=arc-20160816; b=LVdojYa+1PCwtiO7zoF5lRe2iMOA5zGY4gtx10zUJyBEysryqhuE+5P4nLtFtH0Ipy XCLmTdvMNBjwQGQ4zN3WOLM3FzqsOWImslgn4o8D0v4ikSwc+tQ7+9zEoMpSUxfI2C3i OUMuGJob7PBqUiFa2/NRPQwFtGqrGwZNEHgGzvUXpw7W8APwP1YE8FjexlfLKFa/C3mv 81l+fW91pa6GXiaL22hBtkST3aNAYp8qo3x5Vh+neyR9ZGgA7NhWLcQPk946jo4OIX9m u+mGJRCsOAeSuZA42C/mzfM5LSdHKri2H8NbtzuPJN8I+6Gs523HOPJOoYEaljbwwOiv 8ghA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:to:from:date:content-transfer-encoding :dkim-signature:mime-version:arc-authentication-results; bh=yZriKHbxLuSN6Wb6XCN+imGJdfM2VS9OGqlYWYFT0L0=; b=M99pgWMCWHz4ureTVwXKFl31NAQyrA8xyBbvqbRdDU7N9gleuFs3Vq0PHOFERvWGJv oht9NEhuE8ah1ROgWltFNUKQcz+JvcQI6RsLY5IpXQfeO+pZwPGPUSf61o4U+dgFMOIT Cn5rpd/Q20p/b+xKLZn/LLcUiNgRL4V3toxfdlwZQVc/2azbzUbgcMePs1AjwRVI8mTv KehXZO+uht5g45EGcfzfWr/AfE6CldN/HEAneDHx5zBuCwN7y84o3yzT0TEmEBuq7rLH Y6ga4U8e1QP2YqYuCFHXqAWaFWktakaoiutLzPMG9+aD+7MO1Os0Pb8LL05r9Qr4P9yJ uYOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@firemail.cc header.s=mail header.b=HpRbyplr; 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 v22si2968292pfd.22.2018.02.23.20.36.10; Fri, 23 Feb 2018 20:36:24 -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; dkim=pass header.i=@firemail.cc header.s=mail header.b=HpRbyplr; 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 S1752253AbeBXEel (ORCPT + 99 others); Fri, 23 Feb 2018 23:34:41 -0500 Received: from cock.li ([185.100.85.212]:33598 "EHLO cock.li" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751840AbeBXEek (ORCPT ); Fri, 23 Feb 2018 23:34:40 -0500 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on cock.li X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,NO_RECEIVED,NO_RELAYS shortcircuit=_SCTYPE_ autolearn=disabled version=3.4.1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=firemail.cc; s=mail; t=1519446878; bh=apqo3yDs4kze3sflOsov2ZD4QYRN4wGc7g+HfYMGtgw=; h=Date:From:To:Subject:In-Reply-To:References:From; b=HpRbyplr5+rjX/7WcZMDZWlDAmamYVJPDs2FPY7D9vTIabYl0u9SSGyW37Vr/n19B x7i63j5/+6UULKDahuqm/4KmSVOv/rp/q/CMybfTYA0GP3hJAuxQkoaGjjm+yfhZs8 m1/KKFUwlwNQftYm4l2bfF5vCLxg5BD5iBR2YWNQoLccrONb6eFKS1uj8ZEtIyW3GP xzq4NBisr4SZRJ/sJehU93ZmTkNXNxtGbabypAz8G2BtonZIkcaBb5qGpi9SraPEeY 4qQ0ZkQ2l0nsQ6roTafpX81QLdHG2WjIjU8daL5ai2FHocyD7PIw0oA2DsE7lEFnBf 64euhzHT7GgWA== Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 24 Feb 2018 04:34:35 +0000 From: thetruthbeforeus@firemail.cc To: undisclosed-recipients:; Subject: Re: [RFC][PATCH 00/10] Use global pages with PTI - Truth about the white man. In-Reply-To: References: <20180222203651.B776810C@viggo.jf.intel.com> <7e81fb89-5908-7d31-9225-defc48dbfa41@linux.intel.com> Message-ID: <9eae50b5ba196051bf35911abd54c5ab@firemail.cc> X-Sender: thetruthbeforeus@firemail.cc User-Agent: Roundcube Webmail/1.3.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus, this talk about the memory map bullshit is interesting and all, with that binary encoding and shit. But I want you to take a moment and reflect. I want you to reflect on truth. Ask yourself. "Am I a white man" and then listen to those who... who see you ALL for what you are and couldn't be. Take a listen: http://www.liveleak.com/view?i=017_1519418755 Or are you too ... well lets just let that one slide. On 2018-02-24 04:20, Linus Torvalds wrote: > On Fri, Feb 23, 2018 at 5:49 PM, Dave Hansen > wrote: >> On 02/22/2018 01:52 PM, Linus Torvalds wrote: >>> Side note - and this may be crazy talk - I wonder if it might make >>> sense to have a mode where we allow executable read-only kernel pages >>> to be marked global too (but only in the kernel mapping). >> >> We did that accidentally, somewhere. It causes machine checks on K8's >> iirc, which is fun (52994c256df fixed it). So, we'd need to make sure >> we avoid it there, or just make it global in the user mapping too. > > They'd be missing _entirely_ in the user maps, which should be fine. > The problem that commit 52994c256df3 fixed was that they actually > existed in the user maps, just with different data, and then you can > have a ITLB and a DTLB entry for the same address that don't match > (because one has been loaded from the kernel mapping and the other > from the user one). > > But when the address isn't mapped at all in the user map, that should > be fine - because there's no associated TLB entry to get mixed up > about. > > It's no different from clearing a page from the page table before then > flushing the TLB entry later - which is the normal (and required) > behavior for unmapping a page. For a while it exists in the TLB > without existing in the page tables. > >> Just for fun, I tried a 4-core Skylake system with KPTI and nopcid and >> compiled a random kernel 10 times. I did three configs: no global, >> all >> kernel text global + cpu_entry_area, and only cpu_entry_area + entry >> text. The delta percentages are from the Baseline. The deltas are >> measurable, but the largest bang for our buck is obviously the entry >> text. >> >> User Time Kernel Time Clock Elapsed >> Baseline (33 GLB PTEs) 907.6 81.6 264.7 >> Entry (28 GLB PTEs) 910.9 (+0.4%) 84.0 (+2.9%) 265.2 (+0.2%) >> No global( 0 GLB PTEs) 914.2 (+0.7%) 89.2 (+9.3%) 267.8 (+1.2%) > > That's actually noticeable. Maybe not so much in the final elapsed > time itself, but almost 3% for just the kernel side sounds meaningful. > > Of course, that's with nopcid, so it's a fairly small special case, but > still. > >> It's a single line of code to go from the "33" to "28" configuration, >> so >> it's totally doable. But, it means having and parsing another boot >> option that confuses people and then I have to go write actual >> documentation, which I detest. :) > > Heh. > > Ok, maybe the complexity isn't in the code, but in the concept. > > Linus