get_user_pages() and EXEC_ONLY mapping.

Aneesh Kumar K.V aneesh.kumar at
Sat Nov 11 01:49:23 AEDT 2023


Some architectures can now support EXEC_ONLY mappings and I am wondering
what get_user_pages() on those addresses should return. Earlier
PROT_EXEC implied PROT_READ and pte_access_permitted() returned true for
that. But arm64 does have this explicit comment that says

 * p??_access_permitted() is true for valid user mappings (PTE_USER
 * bit set, subject to the write permission check). For execute-only
 * mappings, like PROT_EXEC with EPAN (both PTE_USER and PTE_UXN bits
 * not set) must return false. PROT_NONE mappings do not have the
 * PTE_VALID bit set.

Is that correct? We should be able to get struct page for PROT_EXEC


More information about the Linuxppc-dev mailing list