Skip to contentSkip to conversation

crash_dump-store-dm-crypt-keys-in-kdump-reserved-memory.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message May 21, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: crash_dump: store dm crypt keys in kdump reserved memory
has been removed from the -mm tree. Its filename was
crash_dump-store-dm-crypt-keys-in-kdump-reserved-memory.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Coiby Xu <[email protected]>
Subject: crash_dump: store dm crypt keys in kdump reserved memory
Date: Fri, 2 May 2025 09:12:37 +0800

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".

Cc "Daniel P. Berrange" <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Dave Young <[email protected]>
Cc Jan Pazdziora <[email protected]>
Cc Liu Pingfan <[email protected]>
Cc Milan Broz <[email protected]>
Cc Ondrej Kozina <[email protected]>
Cc Vitaly Kuznetsov <[email protected]>

---

 include/linux/crash_core.h   |    6 +
 include/linux/kexec.h        |    4 
 kernel/crash_dump_dm_crypt.c |  133 +++++++++++++++++++++++++++++++++
 3 files changed, 142 insertions(+), 1 deletion(-)
include/linux/crash_core.h renamed from include/linux/crash_core.h~crash_dump-store-dm-crypt-keys-in-kdump-reserved-memory +5 -1
@@ -34,7 +34,11 @@ static inline void arch_kexec_protect_cr
 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) { }
include/linux/kexec.h renamed from include/linux/kexec.h~crash_dump-store-dm-crypt-keys-in-kdump-reserved-memory +4 -0
@@ -405,6 +405,10 @@ struct kimage {
 	void *elf_headers;
 	unsigned long elf_headers_sz;
 	unsigned long elf_load_addr;
+
+	/* dm crypt keys buffer */
+	unsigned long dm_crypt_keys_addr;
+	unsigned long dm_crypt_keys_sz;
 };
 
 /* kexec interface functions */
kernel/crash_dump_dm_crypt.c renamed from kernel/crash_dump_dm_crypt.c~crash_dump-store-dm-crypt-keys-in-kdump-reserved-memory +133 -0

153 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are