[lkml]   [2018]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 00/35 v5] PTI support for x32
On Mon, Apr 16, 2018 at 09:13:22AM -0700, Linus Torvalds wrote:
> See for example commit 8c06c7740d19 ("x86/pti: Leave kernel text
> global for !PCID") and in particular the performance numbers (that's
> an Atom microserver, but it was chosen due to lack of PCID).

Okay, I checked this on 32 bit and after some small changes I got
identical mappings with GLB set in all page-tables. The changes were:

* Don't change permission bits in pti_clone_kernel_text().
Changing them does not make a difference on 64 bit as
everything cloned in this function is RO anyway. On 32 bit
some areas are mapped RW, so it does make a difference there.

Having different permissions between kernel and user
page-table does also not make sense, because a permission
mismatch in the TLB will cause a re-walk, which is as fast as
not mapping it at all.

* Mapping kernel-text to user-space on 32 bit too. Since there
is no PCID this should improve performance. I have not
measured that yet, but will do so before posting the next

I do some more testing and performance measurements and will send
version 6 of my patches beginning of next week when v4.17-rc2 is out.



 \ /
  Last update: 2018-04-18 09:36    [W:0.068 / U:2.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site