f3fb4b072a
- kexec: add -a option to fall back to KEXEC_LOAD when KEXEC_FILE_LOAD is not supported (bsc#1080916, boo#1076839). * kexec-Return-ENOSYS-when-kexec-does-not-know-how-to-.patch * kexec-Fix-option-checks-to-take-KEXEC_FILE_LOAD-into.patch * kexec-Do-not-special-case-the-s-option.patch * kexec-Add-option-to-revert-s.patch * kexec-Add-option-to-fall-back-to-KEXEC_LOAD-when-KEX.patch * kexec-Document-s-c-and-a-options-in-the-man-page.patch - kexec/ppc64: leverage kexec_file_load support (bsc#1080916) * kexec-ppc64-leverage-kexec_file_load-support.patch Patches accepted upstream. OBS-URL: https://build.opensuse.org/request/show/593211 OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kexec-tools?expand=0&rev=95
54 lines
1.8 KiB
Diff
54 lines
1.8 KiB
Diff
From bf36a4623b5ef67b3ae9722972fc135c608df963 Mon Sep 17 00:00:00 2001
|
|
Message-Id: <bf36a4623b5ef67b3ae9722972fc135c608df963.1522755494.git.msuchanek@suse.de>
|
|
In-Reply-To: <e810acd57d9fc2d7ba3b0e95d470c20de9948462.1522755494.git.msuchanek@suse.de>
|
|
References: <e810acd57d9fc2d7ba3b0e95d470c20de9948462.1522755494.git.msuchanek@suse.de>
|
|
From: Michal Suchanek <msuchanek@suse.de>
|
|
Date: Fri, 16 Mar 2018 16:40:27 +0100
|
|
Subject: [PATCH v6 2/6] kexec: Fix option checks to take KEXEC_FILE_LOAD into
|
|
account
|
|
|
|
When kexec_file_load support was added some sanity checks were not updated.
|
|
|
|
Some options are set only in the kexec_load flags so cannot be supported
|
|
wiht kexec_file_load. On the other hand, reserved memory is needed for
|
|
kdump with both kexec_load and kexec_file_load.
|
|
|
|
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
|
|
---
|
|
Added in v5
|
|
---
|
|
kexec/kexec.c | 10 +++++++++-
|
|
1 file changed, 9 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/kexec/kexec.c b/kexec/kexec.c
|
|
index ab8cff7fe083..b793f31ea501 100644
|
|
--- a/kexec/kexec.c
|
|
+++ b/kexec/kexec.c
|
|
@@ -1415,7 +1415,9 @@ int main(int argc, char *argv[])
|
|
do_load_jump_back_helper = 0;
|
|
}
|
|
|
|
- if (do_load && (kexec_flags & KEXEC_ON_CRASH) &&
|
|
+ if (do_load &&
|
|
+ ((kexec_flags & KEXEC_ON_CRASH) ||
|
|
+ (kexec_file_flags & KEXEC_FILE_ON_CRASH)) &&
|
|
!is_crashkernel_mem_reserved()) {
|
|
die("Memory for crashkernel is not reserved\n"
|
|
"Please reserve memory by passing"
|
|
@@ -1447,6 +1449,12 @@ int main(int argc, char *argv[])
|
|
}
|
|
}
|
|
}
|
|
+ if (do_kexec_file_syscall) {
|
|
+ if (do_load_jump_back_helper)
|
|
+ die("--load-jump-back-helper not supported with kexec_file_load\n");
|
|
+ if (kexec_flags & KEXEC_PRESERVE_CONTEXT)
|
|
+ die("--load-preserve-context not supported with kexec_file_load\n");
|
|
+ }
|
|
|
|
if (do_reuse_initrd){
|
|
check_reuse_initrd();
|
|
--
|
|
2.13.6
|
|
|