OSDN Git Service

arm64: Make USER_DS an inclusive limit
[android-x86/kernel.git] / arch / arm64 / mm / fault.c
index 403fe9e..4df70c9 100644 (file)
@@ -332,7 +332,7 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
                mm_flags |= FAULT_FLAG_WRITE;
        }
 
-       if (is_permission_fault(esr) && (addr < USER_DS)) {
+       if (is_permission_fault(esr) && (addr < TASK_SIZE)) {
                /* regs->orig_addr_limit may be 0 if we entered from EL0 */
                if (regs->orig_addr_limit == KERNEL_DS)
                        die("Accessing user space memory with fs=KERNEL_DS", regs, esr);