All of lore.kernel.org
 help / color / mirror / Atom feed
From: thetruthbeforeus@firemail.cc
To: undisclosed-recipients:;
Subject: Re: [RFC][PATCH 00/10] Use global pages with PTI - Truth about the white man.
Date: Sat, 24 Feb 2018 04:34:35 +0000	[thread overview]
Message-ID: <9eae50b5ba196051bf35911abd54c5ab@firemail.cc> (raw)
In-Reply-To: <CA+55aFzT4XcZ1i4c7Q_A0bsc0M9qh705h84HLnCCq2pNv2G=KQ@mail.gmail.com>

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
> <dave.hansen@linux.intel.com> 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

      reply	other threads:[~2018-02-24  4:34 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 20:36 [RFC][PATCH 00/10] Use global pages with PTI Dave Hansen
2018-02-22 20:36 ` [RFC][PATCH 01/10] x86/mm: factor out pageattr _PAGE_GLOBAL setting Dave Hansen
2018-02-22 20:36 ` [RFC][PATCH 02/10] x86/mm: undo double _PAGE_PSE clearing Dave Hansen
2018-02-22 20:36 ` [RFC][PATCH 03/10] x86/mm: introduce "default" kernel PTE mask Dave Hansen
2018-02-22 22:21   ` Nadav Amit
2018-02-22 22:26     ` Dave Hansen
2018-02-22 23:11       ` Tom Lendacky
2018-02-23 23:46         ` Dave Hansen
2018-02-22 20:36 ` [RFC][PATCH 04/10] x86/espfix: use kernel-default " Dave Hansen
2018-02-22 21:27   ` Nadav Amit
2018-02-22 21:30     ` Dave Hansen
2018-02-22 21:59       ` Andy Lutomirski
2018-02-22 22:05         ` Dave Hansen
2018-02-22 20:37 ` [RFC][PATCH 05/10] x86/mm: do not auto-massage page protections Dave Hansen
2018-02-22 21:46   ` Nadav Amit
2018-02-22 21:52     ` Dave Hansen
2018-02-22 20:37 ` [RFC][PATCH 06/10] x86/mm: remove extra filtering in pageattr code Dave Hansen
2018-02-22 20:37 ` [RFC][PATCH 07/10] x86/mm: comment _PAGE_GLOBAL mystery Dave Hansen
2018-02-22 20:37 ` [RFC][PATCH 08/10] x86/mm: do not forbid _PAGE_RW before init for __ro_after_init Dave Hansen
2018-02-22 20:53   ` Kees Cook
2018-02-22 20:37 ` [RFC][PATCH 09/10] x86/pti: enable global pages for shared areas Dave Hansen
2018-02-22 20:37 ` [RFC][PATCH 10/10] x86/pti: clear _PAGE_GLOBAL for kernel image Dave Hansen
2018-02-22 21:52 ` [RFC][PATCH 00/10] Use global pages with PTI Linus Torvalds
2018-02-24  1:49   ` Dave Hansen
2018-02-24  4:20     ` Linus Torvalds
2018-02-24  4:34       ` thetruthbeforeus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9eae50b5ba196051bf35911abd54c5ab@firemail.cc \
    --to=thetruthbeforeus@firemail.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.