UPSTREAM: arm64: User die() instead of panic() in do_page_fault()
authorCatalin Marinas <catalin.marinas@arm.com>
Fri, 19 Feb 2016 14:28:58 +0000 (14:28 +0000)
committerJeff Vander Stoep <jeffv@google.com>
Thu, 22 Sep 2016 20:38:22 +0000 (13:38 -0700)
The former gives better error reporting on unhandled permission faults
(introduced by the UAO patches).

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Bug: 30369029
Patchset: kaslr-arm64-4.4

(cherry picked from commit 70c8abc28762d04e36c92e07eee2ce6ab41049cb)
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Change-Id: Ia419eccf1554a32fa4131ac15b277d4d2d4eb508

arch/arm64/mm/fault.c

index a8eafeceb08a5ac5cb7b16965896dfcd4ca4b933..44e56de23f792d1fed3b127791b83415df118085 100644 (file)
@@ -235,10 +235,10 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
 
        if (permission_fault(esr) && (addr < USER_DS)) {
                if (get_fs() == KERNEL_DS)
-                       panic("Accessing user space memory with fs=KERNEL_DS");
+                       die("Accessing user space memory with fs=KERNEL_DS", regs, esr);
 
                if (!search_exception_tables(regs->pc))
-                       panic("Accessing user space memory outside uaccess.h routines");
+                       die("Accessing user space memory outside uaccess.h routines", regs, esr);
        }
 
        /*