Commit f29ad209 authored by Eric W. Biederman's avatar Eric W. Biederman

signal/arm64: Factor set_thread_esr out of __do_user_fault

This pepares for sending signals with something other than
arm64_force_sig_info.
Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Tested-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent 1628a7cc
...@@ -297,9 +297,9 @@ static void __do_kernel_fault(unsigned long addr, unsigned int esr, ...@@ -297,9 +297,9 @@ static void __do_kernel_fault(unsigned long addr, unsigned int esr,
die_kernel_fault(msg, addr, esr, regs); die_kernel_fault(msg, addr, esr, regs);
} }
static void __do_user_fault(struct siginfo *info, unsigned int esr) static void set_thread_esr(unsigned long address, unsigned int esr)
{ {
current->thread.fault_address = (unsigned long)info->si_addr; current->thread.fault_address = address;
/* /*
* If the faulting address is in the kernel, we must sanitize the ESR. * If the faulting address is in the kernel, we must sanitize the ESR.
...@@ -352,6 +352,11 @@ static void __do_user_fault(struct siginfo *info, unsigned int esr) ...@@ -352,6 +352,11 @@ static void __do_user_fault(struct siginfo *info, unsigned int esr)
} }
current->thread.fault_code = 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); arm64_force_sig_info(info, esr_to_fault_info(esr)->name);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment