Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp559138pxb; Mon, 25 Apr 2022 16:32:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmuSWjpNG8eMyMpK9V5n6G3iP0Yv0GvC9m2GdD5CidW0g65xcQolWsBqGy0p/rf6LzdWqw X-Received: by 2002:a17:90b:1c04:b0:1d9:aeb8:58c7 with SMTP id oc4-20020a17090b1c0400b001d9aeb858c7mr457398pjb.236.1650929546255; Mon, 25 Apr 2022 16:32:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650929546; cv=none; d=google.com; s=arc-20160816; b=c1w50mdVZuCOjGBh/QDCmsuGURZ7kpT5qw4LbNat1egsa2FHot3SgghpVYogRJJUyH QgW+QJtz+8zeq5X9OkVfhlDpAH0QTbF99vrKFEG5sIJohqJnTfZixELN1NGr53zr64OT h+1AiUcbV39MqRPBLEpfIlpk8CgsRJEOc9T/TIo3uGIMAfFfdujohE4/Bg4XuouPSgOk o1xkDXQ7mg1KKmHbF7GofA3bEbY9/Ibr5Qmu/qTdPLQY63TKbQSwu59zRel6N+CAha7v E8kNlVkK3f+MMc2vXpQGbUSK5/xG9zBys6USNerjqtKnSyVeth90lkzted6Lwaf1Wsll akWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=qDSAv76TkyAfJwUTMOz9uK+ekEfOD4SkGCFHfWwnOas=; b=Ncb8eFvaRr2fMxAS90IoT0W/w80Ct759PMSXvZ/BLNTtQQ+ab2bW+QPBZSwKqSkKpq YND1mBYpa9Hv32zHy70tRHfcSoL7sPBUzUCm48TaCs8wAflvSEFlfamzmFZ2wVJWaCX6 JXBroKAFy8vftmbwV5ni2zGyf/MnyYruY2ehgnPAQPMPKKUpDLqIxBCTyAjuh7ImtFem xdlKYkLh0/B+kN7OFu2UXziuqtUXtnCYkZTNkmTnMpS1YNsVJ0g5dnI0Z/WrXET+PdRT Olx9Nu8j9Ml3xcY+3syR7d1yjpyiyCaDW5rGsjddOeL/KnquO7kNX4epTca56xk6WYfe WJRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=xwNd34Bt; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e6-20020a636906000000b003816043f036si17912391pgc.555.2022.04.25.16.31.59; Mon, 25 Apr 2022 16:32:26 -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=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=xwNd34Bt; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232973AbiDYOdN (ORCPT + 99 others); Mon, 25 Apr 2022 10:33:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242404AbiDYOdM (ORCPT ); Mon, 25 Apr 2022 10:33:12 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A124934BB4; Mon, 25 Apr 2022 07:30:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=qDSAv76TkyAfJwUTMOz9uK+ekEfOD4SkGCFHfWwnOas=; b=xwNd34Btk/mXR+BaWCWgEQ7fKX MEqv2iqIQf/jn9tdFfCKrvt4mJ8CPtCm+c0vcNiOkaebz2Ghb++kRQ0+/jmFGHCyA0e4oZbGvOQa9 2WVwBpwV6NJ2KrqzZCb1z8w1cDZr5rMB0dwehWlS2EGEaSnYFMe4IhQ+AJ9NhZB/CFJo6+ceGEWpg zKgj3a96W0tGzGAeRKItX5vuua29e5hEseCfUPjfpMtXAqTa6jsj2AOm15qGKPmGjvZZg7Aqbe/jR 0zmHQk41QAOnTXXJFg8q2jGczFzS02HGf0/xcRzhSGqHTrBYhnwaZPcyrmkJDc4q1e9KpE5Dmb3zh +d0d7fQA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:58396) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nizj1-0007OB-Lx; Mon, 25 Apr 2022 15:30:03 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nizj0-0006cV-1D; Mon, 25 Apr 2022 15:30:02 +0100 Date: Mon, 25 Apr 2022 15:30:02 +0100 From: "Russell King (Oracle)" To: "Jason A. Donenfeld" Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, tglx@linutronix.de, arnd@arndb.de Subject: Re: [PATCH v6 10/17] arm: use fallback for random_get_entropy() instead of zero Message-ID: References: <20220423212623.1957011-1-Jason@zx2c4.com> <20220423212623.1957011-11-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220423212623.1957011-11-Jason@zx2c4.com> Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE 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, Apr 23, 2022 at 11:26:16PM +0200, Jason A. Donenfeld wrote: > In the event that random_get_entropy() can't access a cycle counter or > similar, falling back to returning 0 is really not the best we can do. > Instead, at least calling random_get_entropy_fallback() would be > preferable, because that always needs to return _something_, even > falling back to jiffies eventually. It's not as though > random_get_entropy_fallback() is super high precision or guaranteed to > be entropic, but basically anything that's not zero all the time is > better than returning zero all the time. > > Cc: Thomas Gleixner > Cc: Arnd Bergmann > Cc: Russell King Reviewed-by: Russell King (Oracle) Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!