]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
powerpc/mm: Update PROTFAULT handling in the page fault path
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Mon, 30 Jan 2017 16:12:59 +0000 (21:42 +0530)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 24 Feb 2017 14:18:13 +0000 (08:18 -0600)
commitaffde1e9429c01360bf41c360583f5c469006962
tree29bdcd1da5612f1689a9c99c8e0e12cb536bd4db
parentee7aaaa4ceafe0fdac492e3cc907807b40955986
powerpc/mm: Update PROTFAULT handling in the page fault path

BugLink: http://bugs.launchpad.net/bugs/1667116
With radix, we can get page fault with DSISR_PROTFAULT value set in case of
PROT_NONE or autonuma mapping. The PROT_NONE case in handled by the vma check
where we consider the access bad. For autonuma we should fall through and fixup
the access mask correctly.

Without this patch we trigger the WARN_ON() on radix. This code moves that
WARN_ON() within a radix_enabled() check. I also moved the WARN_ON() outside
the if condition making it apply for all type of faults (exec/write/read). It
is also conditionalized for book3s, because BOOK3E can also get a PROTFAULT to
handle the D/I cache sync.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from linux-next commit 18061c17c8ecdbdbf1e7d1695ec44e7388b4f601)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/powerpc/mm/copro_fault.c
arch/powerpc/mm/fault.c