diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2023-09-25 21:31:48 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-10-19 09:12:47 +0300 |
commit | bac4cffc7c4a009cf0d16f1785a275e0a7715e8d (patch) | |
tree | 4d93ecddaecbcf81540ca1c913095ec53ecffcfa /scripts/gdb/linux/modules.py | |
parent | 46ebef51fd92f52ba7dca21d3c4332e4127de515 (diff) | |
download | linux-bac4cffc7c4a009cf0d16f1785a275e0a7715e8d.tar.xz |
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
Diffstat (limited to 'scripts/gdb/linux/modules.py')
0 files changed, 0 insertions, 0 deletions