Thread (92 messages) flat view 92 messages, 6 authors, 2017-07-13

Re: [RFC v5 00/38] powerpc: Memory Protection Keys

From: Michal Hocko <mhocko@kernel.org>
Date: 2017-07-12 07:39:54
Also in: linux-arch, linux-mm, lkml

On Wed 12-07-17 09:23:37, Michal Hocko wrote:
On Tue 11-07-17 12:32:57, Ram Pai wrote:
[...]
quoted
Ideally the MMU looks at the PTE for keys, in order to enforce
protection. This is the case with x86 and is the case with power9 Radix
page table. Hence the keys have to be programmed into the PTE.
But x86 doesn't update ptes for PKEYs, that would be just too expensive.
You could use standard mprotect to do the same...
OK, this seems to be a misunderstanding and confusion on my end.
do_mprotect_pkey does mprotect_fixup even for the pkey path which is
quite surprising to me. I guess my misunderstanding comes from
Documentation/x86/protection-keys.txt
"
Memory Protection Keys provides a mechanism for enforcing page-based
protections, but without requiring modification of the page tables
when an application changes protection domains.  It works by
dedicating 4 previously ignored bits in each page table entry to a
"protection key", giving 16 possible keys.
"

So please disregard my previous comments about page tables and sorry
about the confusion.
-- 
Michal Hocko
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help