summaryrefslogtreecommitdiff
path: root/include/linux/crash_core.h
diff options
context:
space:
mode:
authorCoiby Xu <coxu@redhat.com>2025-05-02 09:12:37 +0800
committerAndrew Morton <akpm@linux-foundation.org>2025-05-21 10:48:20 -0700
commit479e58549b0fa7e80f1e0b9e69e0a2a8e6711132 (patch)
tree024bfec80c3d12a5cd11ac73503005d752d1ba31 /include/linux/crash_core.h
parent180cf31af7c313790f1e0fba1c7aa42512144dd5 (diff)
downloadlinux-next-479e58549b0fa7e80f1e0b9e69e0a2a8e6711132.tar.gz
linux-next-479e58549b0fa7e80f1e0b9e69e0a2a8e6711132.zip
crash_dump: store dm crypt keys in kdump reserved memory
When the kdump kernel image and initrd are loaded, the dm crypts keys will be read from keyring and then stored in kdump reserved memory. Assume a key won't exceed 256 bytes thus MAX_KEY_SIZE=256 according to "cryptsetup benchmark". Link: https://lkml.kernel.org/r/20250502011246.99238-4-coxu@redhat.com Signed-off-by: Coiby Xu <coxu@redhat.com> Acked-by: Baoquan He <bhe@redhat.com> Cc: "Daniel P. Berrange" <berrange@redhat.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Dave Young <dyoung@redhat.com> Cc: Jan Pazdziora <jpazdziora@redhat.com> Cc: Liu Pingfan <kernelfans@gmail.com> Cc: Milan Broz <gmazyland@gmail.com> Cc: Ondrej Kozina <okozina@redhat.com> Cc: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/crash_core.h')
-rw-r--r--include/linux/crash_core.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/crash_core.h b/include/linux/crash_core.h
index 44305336314e..2e6782239034 100644
--- a/include/linux/crash_core.h
+++ b/include/linux/crash_core.h
@@ -34,7 +34,11 @@ static inline void arch_kexec_protect_crashkres(void) { }
static inline void arch_kexec_unprotect_crashkres(void) { }
#endif
-
+#ifdef CONFIG_CRASH_DM_CRYPT
+int crash_load_dm_crypt_keys(struct kimage *image);
+#else
+static inline int crash_load_dm_crypt_keys(struct kimage *image) {return 0; }
+#endif
#ifndef arch_crash_handle_hotplug_event
static inline void arch_crash_handle_hotplug_event(struct kimage *image, void *arg) { }