[PATCH 0/3] arm64: kdump: Restore the write protection for the crashkernel memory region
thunder.leizhen at huaweicloud.com
thunder.leizhen at huaweicloud.com
Fri Jul 21 01:17:23 PDT 2023
From: Zhen Lei <thunder.leizhen at huawei.com>
Unlike in the past, the low memory allocation direction of the crashkernel is
changed from top-down to bottom-up. As long as the DMA zone has sufficient
continuous free memory, the allocated crashkernel low memory must meet the
requirements. The allocation direction of crashkernel high memory remains
unchanged, that is, top-down. As long as the high memory(above DMA zone) has
sufficient continuous free memory, the allocated crashkernel high memory must
meet the requirements. In this way, with the restoration of the original
page-level mapping and the implementation of the arch_kexec_protect_crashkres()
function, write protection for the crashkernel memory region can be supported.
Of course, if the high memory or low memory cannot meet the initial requirements,
that is, fall back is required. In this case, write protection is not supported
because the newly allocated memory is not page-level mapped.
Because the original retry process is eliminated, the new process looks clearer
and is a simple sequential flow.
Zhen Lei (3):
arm64: kdump: Allocate crash low memory in the bottom-up direction
arm64: kdump: use page-level mapping for crashkernel region
arm64: kdump: add support access protection for crashkernel region
arch/arm64/include/asm/kexec.h | 8 ++
arch/arm64/kernel/machine_kexec.c | 26 ++++
arch/arm64/mm/init.c | 216 +++++++++++++++++++++++-------
arch/arm64/mm/mmu.c | 21 +++
4 files changed, 219 insertions(+), 52 deletions(-)
--
2.25.1
More information about the kexec
mailing list