From 6b688207198e8d33095b3533f57d48904cd7dba9 Mon Sep 17 00:00:00 2001 From: Prasad Sodagudi Date: Mon, 6 Mar 2017 12:08:11 -0800 Subject: [PATCH] arm64: Remove orig_addr_limit check in do_page_fault Remove the orig_addr_limit check against KERNEL_DS in do_page_fault handler for permissions faults. This check is part of UAO and PAN features and these features are disabled by default. Change-Id: I5de760b983edcf14d1c0bee2a53dc091ceca31da Signed-off-by: Prasad Sodagudi --- arch/arm64/mm/fault.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index c3efb77d1229..a2b67feb623b 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c @@ -334,10 +334,6 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr, } if (addr < USER_DS && is_permission_fault(esr, regs)) { - /* 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); - if (is_el1_instruction_abort(esr)) die("Attempting to execute userspace memory", regs, esr);