Revert "arm64: mm: kfence: only handle translation faults"
This reverts commit e6318a7e19 which is
commit 0bb1fbffc631064db567ccaeb9ed6b6df6342b66 upstream.
It is not needed for Android systems and breaks the ABI. If someone
really wants this, it can be brought back in an ABI-safe way.
Bug: 161946584
Change-Id: I7db68749ba5432c33a8cf8471c9d3489dfd95d4b
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -367,11 +367,6 @@ static bool is_el1_mte_sync_tag_check_fault(unsigned long esr)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool is_translation_fault(unsigned long esr)
|
||||
{
|
||||
return (esr & ESR_ELx_FSC_TYPE) == ESR_ELx_FSC_FAULT;
|
||||
}
|
||||
|
||||
static void __do_kernel_fault(unsigned long addr, unsigned long esr,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
@@ -406,8 +401,7 @@ static void __do_kernel_fault(unsigned long addr, unsigned long esr,
|
||||
} else if (is_pkvm_stage2_abort(esr)) {
|
||||
msg = "access to hypervisor-protected memory";
|
||||
} else {
|
||||
if (is_translation_fault(esr) &&
|
||||
kfence_handle_page_fault(addr, esr & ESR_ELx_WNR, regs))
|
||||
if (kfence_handle_page_fault(addr, esr & ESR_ELx_WNR, regs))
|
||||
return;
|
||||
|
||||
msg = "paging request";
|
||||
|
||||
Reference in New Issue
Block a user