Re: get_user_pages() and EXEC_ONLY mapping.

2023-11-10 Thread Catalin Marinas
On Fri, Nov 10, 2023 at 08:19:23PM +0530, Aneesh Kumar K.V wrote: > 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

Re: get_user_pages() and EXEC_ONLY mapping.

2023-11-10 Thread Jason Gunthorpe
On Fri, Nov 10, 2023 at 08:27:19PM +0530, Aneesh Kumar K V wrote: > On 11/10/23 8:23 PM, Jason Gunthorpe wrote: > > On Fri, Nov 10, 2023 at 08:19:23PM +0530, Aneesh Kumar K.V wrote: > >> > >> Hello, > >> > >> Some architectures can now support EXEC_ONLY mappings and I am wondering > >> what

Re: get_user_pages() and EXEC_ONLY mapping.

2023-11-10 Thread Aneesh Kumar K V
On 11/10/23 8:23 PM, Jason Gunthorpe wrote: > On Fri, Nov 10, 2023 at 08:19:23PM +0530, Aneesh Kumar K.V wrote: >> >> Hello, >> >> Some architectures can now support EXEC_ONLY mappings and I am wondering >> what get_user_pages() on those addresses should return. > > -EPERM > >> Earlier

Re: get_user_pages() and EXEC_ONLY mapping.

2023-11-10 Thread Jason Gunthorpe
On Fri, Nov 10, 2023 at 08:19:23PM +0530, Aneesh Kumar K.V wrote: > > Hello, > > Some architectures can now support EXEC_ONLY mappings and I am wondering > what get_user_pages() on those addresses should return. -EPERM > Earlier PROT_EXEC implied PROT_READ and pte_access_permitted() >

get_user_pages() and EXEC_ONLY mapping.

2023-11-10 Thread Aneesh Kumar K.V
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 /* *