All of lore.kernel.org
 help / color / mirror / Atom feed
* get_user_pages() and EXEC_ONLY mapping.
@ 2023-11-10 14:49 Aneesh Kumar K.V
  2023-11-10 14:53   ` Jason Gunthorpe
  2023-11-10 17:17   ` Catalin Marinas
  0 siblings, 2 replies; 8+ messages in thread
From: Aneesh Kumar K.V @ 2023-11-10 14:49 UTC (permalink / raw)
  To: Catalin Marinas, Jason Gunthorpe, David Hildenbrand, akpm,
	Christophe Leroy
  Cc: linux-mm, linuxppc-dev


Hello,

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
mappings?

-aneesh

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-11-10 17:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-10 14:49 get_user_pages() and EXEC_ONLY mapping Aneesh Kumar K.V
2023-11-10 14:53 ` Jason Gunthorpe
2023-11-10 14:53   ` Jason Gunthorpe
2023-11-10 14:57   ` Aneesh Kumar K V
2023-11-10 15:06     ` Jason Gunthorpe
2023-11-10 15:06       ` Jason Gunthorpe
2023-11-10 17:17 ` Catalin Marinas
2023-11-10 17:17   ` Catalin Marinas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.