Re: [PATCH RFC 0/9] PKS write protected page tables

Edgecombe, Rick P
2021-05-05T19:51:20Z

On Tue, 2021-05-04 at 23:25 -0700, Kees Cook wrote:
> > infrastructure follow-on’s are planned to enable keys to be set to
> > the same
> > permissions globally. Since this usage needs a key to be set globally
> > read-only by default, a small temporary solution is hacked up in
> > patch 8. Long
> > term, PKS protected page tables would use a better and more generic
> > solution
> > to achieve this.
> >
> > [1]
> > https://lore.kernel.org/lkml/20210401225833.566238-1-ira.weiny@intel.com/
>
> Ah, neat!
>
> > [2]
> > https://lore.kernel.org/lkml/20210405203711.1095940-1-rick.p.edgecombe@intel.com/
>
> Ooh. What does this do for performance? It sounds like less TLB
> pressure, IIUC?

Yea, less TLB pressure, faster page table walks in theory. There was
some testing that showed having all 4k pages was bad for performance:
https://lore.kernel.org/linux-mm/213b4567-46ce-f116-9cdf-bbd0c884eb3c@linux.intel.com/

I'm not sure exactly how much breakage is needed before problems start
to show up, but there was also someone posting that large amounts of
tracing was noticeable for their workload.