[PATCH v4 0/2] x86/boot/KASLR: skip the specified crashkernel region

From: Pingfan Liu
Date: Mon Apr 08 2019 - 01:59:16 EST


crashkernel=x@y or or =range1:size1[,range2:size2,...]@offset option may
fail to reserve the required memory region if KASLR puts kernel into the
region. To avoid this uncertainty, asking KASLR to skip the required
region.
And the parsing routine can be re-used at this early boot stage.

Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
Cc: Baoquan He <bhe@xxxxxxxxxx>
Cc: Will Deacon <will.deacon@xxxxxxx>
Cc: Nicolas Pitre <nico@xxxxxxxxxx>
Cc: Vivek Goyal <vgoyal@xxxxxxxxxx>
Cc: Chao Fan <fanc.fnst@xxxxxxxxxxxxxx>
Cc: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>
Cc: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>
CC: Hari Bathini <hbathini@xxxxxxxxxxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
v3 -> v4:
reuse the parse_crashkernel_xx routines

Pingfan Liu (2):
kernel/crash_core: separate the parsing routines to
lib/parse_crashkernel.c
x86/boot/KASLR: skip the specified crashkernel region

arch/x86/boot/compressed/kaslr.c | 40 ++++++
kernel/crash_core.c | 273 ------------------------------------
lib/Makefile | 2 +
lib/parse_crashkernel.c | 289 +++++++++++++++++++++++++++++++++++++++
4 files changed, 331 insertions(+), 273 deletions(-)
create mode 100644 lib/parse_crashkernel.c

--
2.7.4