summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/8xx
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2020-11-16 17:09:31 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2020-12-09 06:59:46 +0100
commit1b03e71ff6f2bd10b45a0128ce76e0e42014a44c (patch)
treead45d97aa550f4d3afe6011bdee1cef1d1aee41d /arch/powerpc/platforms/8xx
parentpowerpc/32s: Make support for 603 and 604+ selectable (diff)
downloadlinux-1b03e71ff6f2bd10b45a0128ce76e0e42014a44c.tar.xz
linux-1b03e71ff6f2bd10b45a0128ce76e0e42014a44c.zip
powerpc/32s: Handle PROTFAULT in hash_page() also for CONFIG_PPC_KUAP
On hash 32 bits, handling minor protection faults like unsetting dirty flag is heavy if done from the normal page_fault processing, because it implies hash table software lookup for flushing the entry and then a DSI is taken anyway to add the entry back. When KUAP was implemented, as explained in commit a68c31fc01ef ("powerpc/32s: Implement Kernel Userspace Access Protection"), protection faults has been diverted from hash_page() because hash_page() was not able to identify a KUAP fault. Implement KUAP verification in hash_page(), by clearing write permission when the access is a kernel access and Ks is 1. This works regardless of the address because kernel segments always have Ks set to 0 while user segments have Ks set to 0 only when kernel write to userspace is granted. Then protection faults can be handled by hash_page() even for KUAP. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/8a4ffe4798e9ea32aaaccdf85e411bb1beed3500.1605542955.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/platforms/8xx')
0 files changed, 0 insertions, 0 deletions