From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A2D91C280; Wed, 3 Jan 2024 17:15:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="wPbd/xjX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43C2BC433C8; Wed, 3 Jan 2024 17:15:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1704302128; bh=MCNhrfDI3RwODeRKbyfert7mVx3uSI64sAo9RHkzpHk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wPbd/xjX0L/eA3QW9weE6pq0DmfYsM2GFdB7ausyjjnDVHXMxHCLl2RoUCXfyfim5 K8d21RkZ1Ucf2QR4HOuRntkA/twCWFNCdGj/4mstR61r7nlSGGCjmDnXidP166Kl5Q OdS5KJ+cccWy1lZTIBKkALv7LfKyINi2egWC51QY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Arnd Bergmann , Eric DeVolder , Baoquan He , Herbert Xu , "David S. Miller" , Albert Ou , Alexander Gordeev , Ard Biesheuvel , Borislav Petkov , Christian Borntraeger , Christophe Leroy , Conor Dooley , Dave Hansen , Heiko Carstens , "H. Peter Anvin" , Ingo Molnar , Nicholas Piggin , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , Sven Schnelle , Thomas Gleixner , Vasily Gorbik , Andrew Morton , Sasha Levin Subject: [PATCH 6.6 25/49] kexec: select CRYPTO from KEXEC_FILE instead of depending on it Date: Wed, 3 Jan 2024 17:55:45 +0100 Message-ID: <20240103164838.839905793@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240103164834.970234661@linuxfoundation.org> References: <20240103164834.970234661@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann [ Upstream commit e63bde3d9417f8318d6dd0d0fafa35ebf307aabd ] 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 74ca317c26a3f ("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/20231023110308.1202042-2-arnd@kernel.org Fixes: 74ca317c26a3f ("kexec: create a new config option CONFIG_KEXEC_FILE for new syscall") Signed-off-by: Arnd Bergmann Reviewed-by: Eric DeVolder Tested-by: Eric DeVolder Acked-by: Baoquan He Cc: Herbert Xu Cc: "David S. Miller" Cc: Albert Ou Cc: Alexander Gordeev Cc: Ard Biesheuvel Cc: Borislav Petkov Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Conor Dooley Cc: Dave Hansen Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Sven Schnelle Cc: Thomas Gleixner Cc: Vasily Gorbik Signed-off-by: Andrew Morton Signed-off-by: Sasha Levin --- kernel/Kconfig.kexec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/Kconfig.kexec b/kernel/Kconfig.kexec index d3b8a2b1b5732..37e488d5b4fc0 100644 --- a/kernel/Kconfig.kexec +++ b/kernel/Kconfig.kexec @@ -36,7 +36,8 @@ config KEXEC config KEXEC_FILE bool "Enable kexec file based system call" depends on ARCH_SUPPORTS_KEXEC_FILE - depends on CRYPTO_SHA256=y || !ARCH_SUPPORTS_KEXEC_PURGATORY + select CRYPTO + select CRYPTO_SHA256 select KEXEC_CORE help This is new version of kexec system call. This system call is -- 2.43.0