crash_dump: retrieve dm crypt keys in kdump kernel
authorCoiby Xu <coxu@redhat.com>
Fri, 2 May 2025 01:12:39 +0000 (09:12 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 21 May 2025 17:48:21 +0000 (10:48 -0700)
commit62f17d9df6924cf805de5ae970470615c1c8d9f2
tree6b7d070672c3eeaf481b608271f240af6d3ff30c
parent9ebfa8dcaea77a8ef02d0f9478717a138b0ad828
crash_dump: retrieve dm crypt keys in kdump kernel

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.

Link: https://lkml.kernel.org/r/20250502011246.99238-6-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>
include/linux/crash_core.h
include/linux/crash_dump.h
kernel/crash_dump_dm_crypt.c