summaryrefslogtreecommitdiffstats
path: root/arch/arm64/mm/fault.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2018-09-22 10:05:41 +0200
committerEric W. Biederman <ebiederm@xmission.com>2018-09-27 21:54:18 +0200
commiteffb093ad28b69230aad222650ec954a21c06ede (patch)
treeff768f010d47809075e525d73a22ec299e6bd4ef /arch/arm64/mm/fault.c
parentaefab2b4c01ee67f2b60e400e46bad63d29c2603 (diff)
downloadlinux-effb093ad28b69230aad222650ec954a21c06ede.tar.gz
linux-effb093ad28b69230aad222650ec954a21c06ede.tar.bz2
linux-effb093ad28b69230aad222650ec954a21c06ede.zip
signal/arm64: Expand __do_user_fault and remove it
Not all of the signals passed to __do_user_fault can be handled the same way so expand the now tiny __do_user_fault in it's callers and remove it. Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Tested-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch/arm64/mm/fault.c')
-rw-r--r--arch/arm64/mm/fault.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index 14d6ff895139..7df3d8b561c2 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -354,12 +354,6 @@ static void set_thread_esr(unsigned long address, unsigned int esr)
current->thread.fault_code = esr;
}
-static void __do_user_fault(struct siginfo *info, unsigned int esr)
-{
- set_thread_esr((unsigned long)info->si_addr, esr);
- arm64_force_sig_info(info, esr_to_fault_info(esr)->name);
-}
-
static void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *regs)
{
/*
@@ -375,7 +369,8 @@ static void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *re
si.si_code = inf->code;
si.si_addr = (void __user *)addr;
- __do_user_fault(&si, esr);
+ set_thread_esr(addr, esr);
+ arm64_force_sig_info(&si, inf->name);
} else {
__do_kernel_fault(addr, esr, regs);
}
@@ -576,7 +571,8 @@ retry:
si.si_signo = SIGBUS;
si.si_code = BUS_ADRERR;
si.si_addr = (void __user *)addr;
- __do_user_fault(&si, esr);
+ set_thread_esr(addr, esr);
+ arm64_force_sig_info(&si, esr_to_fault_info(esr)->name);
} else if (fault & (VM_FAULT_HWPOISON_LARGE | VM_FAULT_HWPOISON)) {
unsigned int lsb;
@@ -589,7 +585,8 @@ retry:
si.si_code = BUS_MCEERR_AR;
si.si_addr = (void __user *)addr;
si.si_addr_lsb = lsb;
- __do_user_fault(&si, esr);
+ set_thread_esr(addr, esr);
+ arm64_force_sig_info(&si, esr_to_fault_info(esr)->name);
} else {
/*
* Something tried to access memory that isn't in our memory
@@ -600,7 +597,8 @@ retry:
si.si_code = fault == VM_FAULT_BADACCESS ?
SEGV_ACCERR : SEGV_MAPERR;
si.si_addr = (void __user *)addr;
- __do_user_fault(&si, esr);
+ set_thread_esr(addr, esr);
+ arm64_force_sig_info(&si, esr_to_fault_info(esr)->name);
}
return 0;