Commit 17adaeae authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'powerpc-6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:

 - Fix false detection of read faults, introduced by execute-only
   support

 - Fix a build failure when GENERIC_ALLOCATOR is not selected

Thanks to Russell Currey, Randy Dunlap, Michal Suchánek, Nathan Lynch,
and Benjamin Gray.

* tag 'powerpc-6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/mm: Fix false detection of read faults
  powerpc/pseries: RTAS work area requires GENERIC_ALLOCATOR
parents 2c50b0ca f2c7e356
...@@ -271,11 +271,16 @@ static bool access_error(bool is_write, bool is_exec, struct vm_area_struct *vma ...@@ -271,11 +271,16 @@ static bool access_error(bool is_write, bool is_exec, struct vm_area_struct *vma
} }
/* /*
* Check for a read fault. This could be caused by a read on an * VM_READ, VM_WRITE and VM_EXEC all imply read permissions, as
* inaccessible page (i.e. PROT_NONE), or a Radix MMU execute-only page. * defined in protection_map[]. Read faults can only be caused by
* a PROT_NONE mapping, or with a PROT_EXEC-only mapping on Radix.
*/ */
if (unlikely(!(vma->vm_flags & VM_READ))) if (unlikely(!vma_is_accessible(vma)))
return true; return true;
if (unlikely(radix_enabled() && ((vma->vm_flags & VM_ACCESS_FLAGS) == VM_EXEC)))
return true;
/* /*
* We should ideally do the vma pkey access check here. But in the * We should ideally do the vma pkey access check here. But in the
* fault path, handle_mm_fault() also does the same check. To avoid * fault path, handle_mm_fault() also does the same check. To avoid
......
...@@ -7,6 +7,7 @@ config PPC_PSERIES ...@@ -7,6 +7,7 @@ config PPC_PSERIES
select OF_DYNAMIC select OF_DYNAMIC
select FORCE_PCI select FORCE_PCI
select PCI_MSI select PCI_MSI
select GENERIC_ALLOCATOR
select PPC_XICS select PPC_XICS
select PPC_XIVE_SPAPR select PPC_XIVE_SPAPR
select PPC_ICP_NATIVE select PPC_ICP_NATIVE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment