Skip to contentSkip to conversation

crash_dump-retrieve-dm-crypt-keys-in-kdump-kernel.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: retrieve dm crypt keys in kdump kernel
has been removed from the -mm tree. Its filename was
crash_dump-retrieve-dm-crypt-keys-in-kdump-kernel.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: retrieve dm crypt keys in kdump kernel
Date: Fri, 2 May 2025 09:12:39 +0800

Crash kernel will retrieve the dm crypt keys based on the dmcryptkeys command line parameter. When user space writes the key description to /sys/kernel/config/crash_dm_crypt_key/restore, the crash kernel will save the encryption keys to the user keyring. Then user space e.g. cryptsetup's --volume-key-keyring API can use it to unlock the encrypted device.

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   |    1 
 include/linux/crash_dump.h   |    2 
 kernel/crash_dump_dm_crypt.c |  133 +++++++++++++++++++++++++++++++++
 3 files changed, 136 insertions(+)
include/linux/crash_core.h renamed from include/linux/crash_core.h~crash_dump-retrieve-dm-crypt-keys-in-kdump-kernel +1 -0
@@ -36,6 +36,7 @@ static inline void arch_kexec_unprotect_
 
 #ifdef CONFIG_CRASH_DM_CRYPT
 int crash_load_dm_crypt_keys(struct kimage *image);
+ssize_t dm_crypt_keys_read(char *buf, size_t count, u64 *ppos);
 #else
 static inline int crash_load_dm_crypt_keys(struct kimage *image) {return 0; }
 #endif
include/linux/crash_dump.h renamed from include/linux/crash_dump.h~crash_dump-retrieve-dm-crypt-keys-in-kdump-kernel +2 -0
@@ -15,6 +15,8 @@
 extern unsigned long long elfcorehdr_addr;
 extern unsigned long long elfcorehdr_size;
 
+extern unsigned long long dm_crypt_keys_addr;
+
 #ifdef CONFIG_CRASH_DUMP
 extern int elfcorehdr_alloc(unsigned long long *addr, unsigned long long *size);
 extern void elfcorehdr_free(unsigned long long addr);
kernel/crash_dump_dm_crypt.c renamed from kernel/crash_dump_dm_crypt.c~crash_dump-retrieve-dm-crypt-keys-in-kdump-kernel +133 -0

163 lines not on this page · raw message

_

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