crash_dump: store dm crypt keys in kdump reserved memory
authorCoiby Xu <coxu@redhat.com>
Fri, 2 May 2025 01:12:37 +0000 (09:12 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 21 May 2025 17:48:20 +0000 (10:48 -0700)
commit479e58549b0fa7e80f1e0b9e69e0a2a8e6711132
tree024bfec80c3d12a5cd11ac73503005d752d1ba31
parent180cf31af7c313790f1e0fba1c7aa42512144dd5
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>
include/linux/crash_core.h
include/linux/kexec.h
kernel/crash_dump_dm_crypt.c