[PATCH v5 8/9] crash_dump: Disallow configfs/crash_dm_crypt_key/reuse if crash hotplug supported
Randy Dunlap
rdunlap at infradead.org
Tue Sep 8 22:46:03 PDT 2026
On 9/8/26 5:36 PM, Coiby Xu wrote:
> If crash hotplug is supported, dm-crypt keys saved to reserved memory
> will be taken care of automatically. Thus it doesn't make sense to use
> configfs/crash_dm_crypt_key/reuse. Not reserving
> image->dm_crypt_keys_addr makes it implicitly to disallow using this
> API. Currently x86_64 and ppc64le have implemented crash hotplug
> feature.
>
> Also update the doc accordingly. Note two doc issues are fixed as well.
>
> Fixes: 9ebfa8dcaea7 ("crash_dump: reuse saved dm crypt keys for CPU/memory hot-plugging")
> Reviewed-by: Sourabh Jain <sourabhjain at linux.ibm.com>
> Signed-off-by: Coiby Xu <coiby.xu at gmail.com>
> ---
> Documentation/admin-guide/kdump/kdump.rst | 16 ++++++++++------
> kernel/crash_dump_dm_crypt.c | 12 ++++++++----
> 2 files changed, 18 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/admin-guide/kdump/kdump.rst b/Documentation/admin-guide/kdump/kdump.rst
> index 7587caadbae1..0bf2eb100a05 100644
> --- a/Documentation/admin-guide/kdump/kdump.rst
> +++ b/Documentation/admin-guide/kdump/kdump.rst
> @@ -577,9 +577,10 @@ with /sys/kernel/config/crash_dm_crypt_keys for setup,
>
> 1. Tell the first kernel what logon keys are needed to unlock the disk volumes,
> # Add key #1
> - mkdir /sys/kernel/config/crash_dm_crypt_keys/7d26b7b4-e342-4d2d-b660-7426b0996720
> + VOL1_UUID=7d26b7b4-e342-4d2d-b660-7426b0996720
> + mkdir /sys/kernel/config/crash_dm_crypt_keys/$VOL1_UUID
> # Add key #1's description
> - echo cryptsetup:7d26b7b4-e342-4d2d-b660-7426b0996720 > /sys/kernel/config/crash_dm_crypt_keys/description
> + echo cryptsetup:$VOL1_UUID > /sys/kernel/config/crash_dm_crypt_keys/$VOL1_UUID/description
>
> # how many keys do we have now?
> cat /sys/kernel/config/crash_dm_crypt_keys/count
> @@ -591,15 +592,18 @@ with /sys/kernel/config/crash_dm_crypt_keys for setup,
> cat /sys/kernel/config/crash_dm_crypt_keys/count
> 2
>
> - # To support CPU/memory hot-plugging, reuse keys already saved to reserved
> - # memory
> - echo true > /sys/kernel/config/crash_dm_crypt_key/reuse
> -
> 2. Load the dump-capture kernel
>
> 3. After the dump-capture kerne get booted, restore the keys to user keyring
kernel is booted,
> echo yes > /sys/kernel/crash_dm_crypt_keys/restore
>
> +For CPU/memory hot-plugging, you can reuse keys already saved to reserved
> +memory before reloading the kdump image,
> + echo true > /sys/kernel/config/crash_dm_crypt_keys/reuse
> +
> +Note if crash hotplug is supported, this API is totally unnecessary thus will
> +be disabled automatically.
> +
> Contact
> =======
>
--
~Randy
More information about the linux-arm-kernel
mailing list