From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B5000C00A8F for ; Tue, 24 Oct 2023 03:56:46 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=fi9DW5b/; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Tq0ACjKK; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4SDyt50tBRz3cRj for ; Tue, 24 Oct 2023 14:56:45 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=fi9DW5b/; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Tq0ACjKK; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=bhe@redhat.com; receiver=lists.ozlabs.org) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4SDys50xCBz2y1l for ; Tue, 24 Oct 2023 14:55:51 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698119748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kNDuXbYjtRLJzfaUrnn30bwHvtiVZ7rNQxf0BdBPcfY=; b=fi9DW5b/16qYTXyYR6M4Foh1E7ZidONMV/gyxc+MJGP/eEk+ZPCZVJ8XpxN/vlPodkZKwa tTTsuMz2WeEYA5rS5/ujKLzSPkcnpRtp5oWr+cInbLBhSLTxhxrUOF/Rdjr15UChC/JHYJ E1rgo9no9Wufh+kdL34K3bVOiU1Mzb0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698119749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kNDuXbYjtRLJzfaUrnn30bwHvtiVZ7rNQxf0BdBPcfY=; b=Tq0ACjKKpK7vk3imIdEpjZxQhd7+50/aF6MlUXytv69qvIBNYcbyhi4PgfTCpOA3PkxMLk gknrBNvjynquGJ33KU8BIoVuWyQ7uW1FZiZBTaNzRPWRQxACUgzOAAHbhhHMjBq22g0R/M h1Q8pFYkeq+67e2E5TdDpqdKXI/rCqo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-570-nUyCnobAM5ix9yYjgAujlg-1; Mon, 23 Oct 2023 23:55:32 -0400 X-MC-Unique: nUyCnobAM5ix9yYjgAujlg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D8E0680F8F5; Tue, 24 Oct 2023 03:55:30 +0000 (UTC) Received: from localhost (unknown [10.72.112.15]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F066D492BD9; Tue, 24 Oct 2023 03:55:28 +0000 (UTC) Date: Tue, 24 Oct 2023 11:55:26 +0800 From: Baoquan He To: Arnd Bergmann Subject: Re: [PATCH 2/2] kexec: select CRYPTO from KEXEC_FILE instead of depending on it Message-ID: References: <20231023110308.1202042-1-arnd@kernel.org> <20231023110308.1202042-2-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231023110308.1202042-2-arnd@kernel.org> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Peter Zijlstra \(Intel\)" , Dave Hansen , "H. Peter Anvin" , Alexander Gordeev , Eric DeVolder , Ard Biesheuvel , Costa Shulyupin , linux-s390@vger.kernel.org, Herbert Xu , x86@kernel.org, Ingo Molnar , Palmer Dabbelt , Christian Borntraeger , Vivek Goyal , Sven Schnelle , Albert Ou , Vasily Gorbik , Heiko Carstens , Nicholas Piggin , Borislav Petkov , Paul Walmsley , Thomas Gleixner , Hari Bathini , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Arnd Bergmann , linux-crypto@vger.kernel.org, Andrew Mort on , linuxppc-dev@lists.ozlabs.org, "David S . Miller" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 10/23/23 at 01:01pm, Arnd Bergmann wrote: > From: Arnd Bergmann > > 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 ~~~~~~~~~~~~~~ typo > 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. > > Fixes: 74ca317c26a3f ("kexec: create a new config option CONFIG_KEXEC_FILE for new syscall") > Cc: Herbert Xu > Cc: "David S. Miller" > Cc: linux-crypto@vger.kernel.org > Signed-off-by: Arnd Bergmann > --- > kernel/Kconfig.kexec | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) LGTM, Acked-by: Baoquan He > > diff --git a/kernel/Kconfig.kexec b/kernel/Kconfig.kexec > index bfc636d64ff2b..51f719af10e79 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.39.2 >