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

Ira Weiny
2021-05-05T02:03:57Z

On Tue, May 04, 2021 at 05:30:23PM -0700, Rick Edgecombe wrote:
>
> This is based on V6 [1] of the core PKS infrastructure patches. PKS
> 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.

Before you send this out I've been thinking about this more and I think I would
prefer you not call this 'globally' setting the key. Because you don't really
want to be able to update the key globally like I originally suggested for
kmap(). What is required is to set a different default for the key which gets
used by all threads by 'default'.

What is really missing is how to get the default changed after it may have been
used by some threads... thus the 'global' nature... Perhaps I am picking nits
here but I think it may go over better with Thomas and the maintainers. Or
maybe not... :-)

Would it be too much trouble to call this a 'default' change? Because that is
really what you implement?

Ira