]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
arm64: kdump: protect crash dump kernel memory
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Tue, 28 Mar 2017 06:51:24 +0000 (15:51 +0900)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 23 Jun 2017 15:46:42 +0000 (10:46 -0500)
commitbcce52faf131040411802de714aa24d976c05066
treef9f676711e03c391a89b1caa9bbb2abe1e893b28
parentdeb884e0def1303d5bbaa3aad3e8ffce0b06f2f7
arm64: kdump: protect crash dump kernel memory

BugLink: https://bugs.launchpad.net/bugs/1694859
arch_kexec_protect_crashkres() and arch_kexec_unprotect_crashkres()
are meant to be called by kexec_load() in order to protect the memory
allocated for crash dump kernel once the image is loaded.

The protection is implemented by unmapping the relevant segments in crash
dump kernel memory, rather than making it read-only as other archs do,
to prevent coherency issues due to potential cache aliasing (with
mismatched attributes).

Page-level mappings are consistently used here so that we can change
the attributes of segments in page granularity as well as shrink the region
also in page granularity through /sys/kernel/kexec_crash_size, putting
the freed memory back to buddy system.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(backported from commit 98d2e1539b84abddce4b3c2ca8733f6aeacdee47)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/arm64/kernel/machine_kexec.c
arch/arm64/mm/mmu.c