Skip to content

Commit e63bde3

Browse files
arndbakpm00
authored andcommitted
kexec: select CRYPTO from KEXEC_FILE instead of depending on it
All other users of crypto code use 'select' instead of 'depends on', so do the same thing with KEXEC_FILE for consistency. In practice this makes very little difference as kernels with kexec support are very likely to also include some other feature that already selects both crypto and crypto_sha256, but being consistent here helps for usability as well as to avoid potential circular dependencies. This reverts the dependency back to what it was originally before commit 74ca317 ("kexec: create a new config option CONFIG_KEXEC_FILE for new syscall"), which changed changed it with the comment "This should be safer as "select" is not recursive", but that appears to have been done in error, as "select" is indeed recursive, and there are no other dependencies that prevent CRYPTO_SHA256 from being selected here. Link: https://lkml.kernel.org/r/[email protected] Fixes: 74ca317 ("kexec: create a new config option CONFIG_KEXEC_FILE for new syscall") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Eric DeVolder <[email protected]> Tested-by: Eric DeVolder <[email protected]> Acked-by: Baoquan He <[email protected]> Cc: Herbert Xu <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Albert Ou <[email protected]> Cc: Alexander Gordeev <[email protected]> Cc: Ard Biesheuvel <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: Conor Dooley <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Nicholas Piggin <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Paul Walmsley <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sven Schnelle <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vasily Gorbik <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent c1ad12e commit e63bde3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/Kconfig.kexec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ config KEXEC
3636
config KEXEC_FILE
3737
bool "Enable kexec file based system call"
3838
depends on ARCH_SUPPORTS_KEXEC_FILE
39-
depends on CRYPTO_SHA256=y || !ARCH_SUPPORTS_KEXEC_PURGATORY
39+
select CRYPTO
40+
select CRYPTO_SHA256
4041
select KEXEC_CORE
4142
help
4243
This is new version of kexec system call. This system call is

0 commit comments

Comments
 (0)