]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
crashdump: add CONFIG_KEYS dependency
authorArnd Bergmann <arnd@arndb.de>
Fri, 20 Jun 2025 11:21:22 +0000 (13:21 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 25 Jun 2025 22:55:04 +0000 (15:55 -0700)
The dm_crypt code fails to build without CONFIG_KEYS:

kernel/crash_dump_dm_crypt.c: In function 'restore_dm_crypt_keys_to_thread_keyring':
kernel/crash_dump_dm_crypt.c:105:9: error: unknown type name 'key_ref_t'; did you mean 'key_ref_put'?

There is a mix of 'select KEYS' and 'depends on KEYS' in Kconfig,
so there is no single obvious solution here, but generally using 'depends on'
makes more sense and is less likely to cause dependency loops.

Link: https://lkml.kernel.org/r/20250620112140.3396316-1-arnd@kernel.org
Fixes: 62f17d9df692 ("crash_dump: retrieve dm crypt keys in kdump kernel")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Alexander Graf <graf@amazon.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Coiby Xu <coxu@redhat.com>
Cc: Dave Vasilevsky <dave@vasilevsky.ca>
Cc: Eric Biggers <ebiggers@google.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/Kconfig.kexec

index e64ce21f9a805b2a3e7c98078ce7d04eb5e4e368..2ee603a98813e22f015b1c2b99ba793adcfbca93 100644 (file)
@@ -134,6 +134,7 @@ config CRASH_DM_CRYPT
        depends on KEXEC_FILE
        depends on CRASH_DUMP
        depends on DM_CRYPT
+       depends on KEYS
        help
          With this option enabled, user space can intereact with
          /sys/kernel/config/crash_dm_crypt_keys to make the dm crypt keys