• Christophe Leroy's avatar
    powerpc/32s: Introduce _PAGE_READ and remove _PAGE_USER · bac4cffc
    Christophe Leroy authored
    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.e...
    bac4cffc
pgtable.h 18.1 KB