Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3583096imw; Mon, 11 Jul 2022 11:22:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1stQGTyyJpgpj2yzSdZs7OpPeXhlYM7UcyUtDCVWDg7gUG78xwXtRSMrZvMxeBISrY6LOz0 X-Received: by 2002:a63:1459:0:b0:411:b06f:646f with SMTP id 25-20020a631459000000b00411b06f646fmr17050332pgu.338.1657563760853; Mon, 11 Jul 2022 11:22:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657563760; cv=none; d=google.com; s=arc-20160816; b=lS6+WEkjV4lSTGRGD4ZlUEzSDz6XhehXP7p4VxZ28AwkKdE3W5iAHx0GVsl2C7vWZ0 smWVOa7zsiM7LSLCveXJu5E8PwL57GKWiRVc+RiCJ/xcjd6OU3u8jlxKxjEmGCFfb7R6 35yLnqWAaYNqr0ik0Ze2CcIM3QyMDao3hv06gXcssyirTOusLJusjBQfCikh/805WHmi hQEyz7pWFAesm80UG5o5F0q/614p9rtx0JMQ/mCljwRbCkJMZ3fqfwhCFkgYtCfw2GCk vxL6xjBh+Eibgj+JBp5jzv6kbf/HBdoZJyeL4gHJVEL5FC98YtzAoy7siE9oI2WOEC93 A4eg== 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:subject:cc:to:from:date :dkim-signature; bh=Avv78fDcOuDTwsU4/e5jc/G/40KDfz76mvcViKS/FlE=; b=t2p9iCn8xBdr0yGMaUWMroDhEI4562vZlcq0Z86HbYZHsUvZR9fIdtXj4VOuJCRlh+ v0XNBzN9DjDbPo7d8pD1yfrq7kXkhFAKFWuOmbNnDdTo9IVK4BNA6KDVqp1uCX7Pj/N2 ZfRuid0Vkd7mtTZGD+XuelMGTqZ8gTs3XijwXF/7+hT+Mbwgo+B2OYe6G3h1gATEi/na yWJjEercFpZ9nKaE4eg7iqERZ5cH/gmgsrQIQrLmLkL+1BZg39iARsUQGiJAOn/JogrH VsrEfdySE7uD08KOcaQ4EB0JTUe95g2QPmblLfs30L7//+VG7km54c2yJUeonkkqgqXR 0ioQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bPHJ6Hpy; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mq9-20020a17090b380900b001f027dd6560si10899265pjb.61.2022.07.11.11.22.22; Mon, 11 Jul 2022 11:22:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bPHJ6Hpy; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231235AbiGKSEH (ORCPT + 99 others); Mon, 11 Jul 2022 14:04:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231514AbiGKSEF (ORCPT ); Mon, 11 Jul 2022 14:04:05 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DE9B1EADF; Mon, 11 Jul 2022 11:04:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 19F96B80E4A; Mon, 11 Jul 2022 18:03:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A79CC341C8; Mon, 11 Jul 2022 18:03:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657562637; bh=mCBd8b09ydPs61XWBzNZW3Jvis9MI3ZBw0K33RhQuQc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bPHJ6HpySPrM18KQCSn1D2BSyAWr1t8nXDVWvcVJeMqTUhh2A4ji8ah3hE/BbuFNJ 5EiJ/oYRDSYqkDgdBs/GBIRgf6ukxQjAF/Zd3zvzpkXj+mJ2a5qg4k+sBur4rgcFgD 5iyur9y6k1itXK6qdtWdr9onEG+9ZJXd9hb55VWDu54Xz/U+ImoPDKAqRfNq45khQk Qugx1B33faTd3h0e1ILPv+fX64KbhWJHQkq7Jvw+DOGGsZu9N9dtnVvJRyUf8GnuFV wmoS7LJ4hnCbMJe3zfDR6DFAE1Upr/ahAz8Zzwa6x6NsnvaPqfv7/k9Do0KrdPOPay AtkMxtKCKoieQ== Date: Mon, 11 Jul 2022 11:03:48 -0700 From: Jakub Kicinski To: Eric Biggers Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, "Jason A . Donenfeld " , bpf@vger.kernel.org Subject: Re: [PATCH 2/2] crypto: make the sha1 library optional Message-ID: <20220711110348.4c951fff@kernel.org> In-Reply-To: <20220709211849.210850-3-ebiggers@kernel.org> References: <20220709211849.210850-1-ebiggers@kernel.org> <20220709211849.210850-3-ebiggers@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Sat, 9 Jul 2022 14:18:49 -0700 Eric Biggers wrote: > Since the Linux RNG no longer uses sha1_transform(), the SHA-1 library > is no longer needed unconditionally. Make it possible to build the > Linux kernel without the SHA-1 library by putting it behind a kconfig > option, and selecting this new option from the kconfig options that gate > the remaining users: CRYPTO_SHA1 for crypto/sha1_generic.c, BPF for > kernel/bpf/core.c, and IPV6 for net/ipv6/addrconf.c. > > Unfortunately, since BPF is selected by NET, for now this can only make > a difference for kernels built without networking support. > diff --git a/init/Kconfig b/init/Kconfig > index c984afc489dead..d8d0b4bdfe4195 100644 > --- a/init/Kconfig > +++ b/init/Kconfig > @@ -1472,6 +1472,7 @@ config HAVE_PCSPKR_PLATFORM > # interpreter that classic socket filters depend on > config BPF > bool > + select CRYPTO_LIB_SHA1 > Let's give it an explicit CC: bpf@ > diff --git a/net/ipv6/Kconfig b/net/ipv6/Kconfig > index bf2e5e5fe14273..658bfed1df8b17 100644 > --- a/net/ipv6/Kconfig > +++ b/net/ipv6/Kconfig > @@ -7,6 +7,7 @@ > menuconfig IPV6 > tristate "The IPv6 protocol" > default y > + select CRYPTO_LIB_SHA1 > help > Support for IP version 6 (IPv6). FWIW: Acked-by: Jakub Kicinski