Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1140055rda; Mon, 23 Oct 2023 04:04:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGS3Uvq//PjP4Lxl3dbvEZ7XywvhBvVxCMqMN7eCV5wyknzTmz+hX61jIzOQR0skTV9HgNP X-Received: by 2002:a05:6359:5ea2:b0:168:e8ef:2415 with SMTP id px34-20020a0563595ea200b00168e8ef2415mr397474rwb.8.1698059058959; Mon, 23 Oct 2023 04:04:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698059058; cv=none; d=google.com; s=arc-20160816; b=UvaEJaNFjwnw+qOZeEAtOCTN124K3d5ysRq99XboTol1D+RA/BCWfxGLBtGrVy31uC 1DdVnuf7wV7mM1zkgZd0xmeWMpD5TleeGL10d9DbV4w0/XxAlrN7mNJTkQroolBAfvti E+2t3iYKK3XsPm62Hehuecjyo6/ekGe5gwuHZ+MOPsnI63gC44UsgxyO/qXVs94xaF51 aizjUVY0PkzTg1oOLlZMGAFeahuWgnXhEXGrkYDGXMWd+f5rRV4EnrGyme5mjO76xTE6 43xnbdBtEvBkGy3QHUArldVGGQmUCa/erdbS8G9KTp4dZ6cnYfz5zGBXj2pMw9f1UpmU ASyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sFvKFfmZSQ6s6J8Vab9NUovI8SzEa78IoArxK9k2aq0=; fh=zsASctSDkFXimIUSFfJuY0L/Wn/rcKQtdV0EUFPx5Ng=; b=Ssl+ibQ+aEYlo1PGH2KHgLJPlGMDptY9pTPTK0WPW1AaJzZ5eeQpklPDl1Rh+GQ/fB tXROyc5BLgNqqq679E3TUNXilXWcrSCZXPT9qu29M85916BUxqr9NzfzEJmQmHZfHz8e ibUG1dOaFsyo6VCyk7hHWRXSGlDDqPo8jpFbqWaggg5Sb8IyMZmtf1bqgsW4kQx0aLtM ZBGfzR4zMT0fxX76uf6k8VDW4NpHxDG4cyQ+Nh7V8TBr2+zfXf5ED0he80btnps4p6KK GAWhkb7wZHTKNAwaZvww3ZDgv0Tqh/Qx+17JhjD4Lu8AQmLtg7BbYLraeqiiwB++Xt3p YfBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aEz1JEDv; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id p23-20020a639517000000b005b43f17562fsi6272623pgd.266.2023.10.23.04.04.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 04:04:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aEz1JEDv; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 0878F80A0DFA; Mon, 23 Oct 2023 04:04:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233188AbjJWLEA (ORCPT + 99 others); Mon, 23 Oct 2023 07:04:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233272AbjJWLD6 (ORCPT ); Mon, 23 Oct 2023 07:03:58 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF25810C9; Mon, 23 Oct 2023 04:03:47 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FC50C433C8; Mon, 23 Oct 2023 11:03:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698059027; bh=pklDVZYAxLKOZK+8gcGmc6nJte6jXDPhoa1mHNgJuzE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aEz1JEDvjQaJCvm0F9LQymLd21rjf1S1DqR5Gi9cmP+YNr+w2pL7fjquHFqDs6IB+ d6cIIZ47jqQn1L8WagjScNybKckrd+FXFcqqKLFzXoQKgvtNnlv3vFGsXSLXNWWsk4 1bze2g38+kbHgBpuKxTulVPCd6rCF+NqMOrHc9myfAulikmaV7aShzYjrS3rYdT/gm gRMygzsnhkITq2leWaFOOORjdlTXknzCn/JSvrc9kpRkHpW68zf0YnqL5NGAFHWnGi lShoLPhiqVdbc6rtTEaWPlIocDVMUjtmb4ga3rhwU9g2gHeUXGkKOZK1oWGjSzmemf BbtYjDfrwkmkg== From: Arnd Bergmann To: Vivek Goyal , Andrew Morton Cc: Herbert Xu , "David S . Miller" , linux-crypto@vger.kernel.org, Arnd Bergmann , Nicholas Piggin , Christophe Leroy , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Eric DeVolder , "Peter Zijlstra (Intel)" , Ard Biesheuvel , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, Hari Bathini , Baoquan He , Costa Shulyupin Subject: [PATCH 2/2] kexec: select CRYPTO from KEXEC_FILE instead of depending on it Date: Mon, 23 Oct 2023 13:01:55 +0200 Message-Id: <20231023110308.1202042-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231023110308.1202042-1-arnd@kernel.org> References: <20231023110308.1202042-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 23 Oct 2023 04:04:13 -0700 (PDT) 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 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(-) 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