linux/arch/powerpc/mm/book3s32
Christophe Leroy bac4cffc7c powerpc/32s: Introduce _PAGE_READ and remove _PAGE_USER
On 603 MMU, TLB missed are handled by SW and there are separated
DTLB and ITLB. It is therefore possible to implement execute-only
protection by not loading DTLB when read access is not permitted.

To do that, _PAGE_READ flag is needed but there is no bit available
for it in PTE. On the other hand the only real use of _PAGE_USER is
to implement PAGE_NONE by clearing _PAGE_USER.

As _PAGE_NONE can also be implemented by clearing _PAGE_READ, remove
_PAGE_USER and add _PAGE_READ. Then use the virtual address to know
whether user rights or kernel rights are to be used.

With that change, 603 MMU now honors execute-only protection.

For hash (604) MMU it is more tricky because hash table is common to
load/store and execute. Nevertheless it is still possible to check
whether _PAGE_READ is set before loading hash table for a load/store
access. At least it can't be read unless it is executed first.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/b7702dd5a041ec59055ed2880f4952e94c087a2e.1695659959.git.christophe.leroy@csgroup.eu
2023-10-19 17:12:47 +11:00
..
hash_low.S powerpc/32s: Introduce _PAGE_READ and remove _PAGE_USER 2023-10-19 17:12:47 +11:00
kuap.c powerpc/kuap: Simplify KUAP lock/unlock on BOOK3S/32 2023-08-02 22:22:18 +10:00
Makefile powerpc/kuep: Remove 'nosmep' boot time parameter except for book3s/64 2021-12-09 22:41:18 +11:00
mmu_context.c powerpc/kuap: Fold kuep_is_disabled() into its only user 2023-08-02 22:22:17 +10:00
mmu.c powerpc/32s: Add _PAGE_WRITE to supplement _PAGE_RW 2023-10-19 17:12:47 +11:00
nohash_low.S powerpc/32s: Move _tlbie() and _tlbia() in a new file 2020-12-09 16:46:55 +11:00
tlb.c powerpc: remove mmap linked list walks 2022-09-26 19:46:19 -07:00