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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 31066C433F5 for ; Sat, 23 Apr 2022 10:02:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=s1HYyLqUeOQcKxBpDzLcrZMF6qSX0m7nTPPIyLxsc2k=; b=1aasv506ttnB0j CgSImdd232trblLDH5qzNBjR4lGSM4vKlOUvt4GwX3Fhx6MZ1naXPcH9oGPla5l2Mp967S+DaIvJg yAkR3Jz6/kWh52L2XSjdapasRG79BtsMO6owuh36Jz5Pf9TrDlGtwon9z+689nQdLX1HIqw60dtiL ibr/u9YdrfEbS2X7HsugulKwubR5z7ZZ3rbYGHeXKepH6Jsdxg3/AnBmxgtSDsHTNwTf3g3YXHprJ U/0EkabdKMHFtwJzUdJKixmUbslP3oKLRtE1Ysd5evFUGWHyfv2G1FW3BtM+xHnIgAVZynAIqLyZB f5VSyOFzI+pjMmSmzkTQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1niCZP-003zWv-BU; Sat, 23 Apr 2022 10:00:51 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1niCZM-003zVr-PQ; Sat, 23 Apr 2022 10:00:50 +0000 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 83D72B808CF; Sat, 23 Apr 2022 10:00:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09578C385A0; Sat, 23 Apr 2022 10:00:40 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="BrTNBu3U" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1650708039; 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=yzboIlk5vJyGJ9lIUicUoHDvMySNFYIAfwJpuAS8VE0=; b=BrTNBu3UPGd/snRKQaW6FCT2ETTW5AjxdyJ6d5OFslB53rAsjYQWfTknmHGingrsxLV4ix yB3Z33fq8ZEu9lWFNSAsBIXFWS69ptmi6XvOsvr/W2o6ZDyCsI3ruk6NWXUUVsrydwnSwy QbHGR2xD+RPJeLJSPg/mehva8mt8n/8= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 7d5a8aa6 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sat, 23 Apr 2022 10:00:38 +0000 (UTC) Date: Sat, 23 Apr 2022 12:00:33 +0200 From: "Jason A. Donenfeld" To: Sandy Harris Cc: LKML , Linux Crypto Mailing List , Thomas Gleixner , Arnd Bergmann , Theodore Ts'o , Dominik Brodowski , Russell King , Catalin Marinas , Will Deacon , Geert Uytterhoeven , Thomas Bogendoerfer , Paul Walmsley , Palmer Dabbelt , Albert Ou , "David S . Miller" , Richard Weinberger , Anton Ivanov , Johannes Berg , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Chris Zankel , Max Filippov , Stephen Boyd , Dinh Nguyen , linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, x86@kernel.org, linux-xtensa@linux-xtensa.org Subject: Re: [PATCH v5 11/11] random: insist on random_get_entropy() existing in order to simplify Message-ID: References: <20220419111650.1582274-1-Jason@zx2c4.com> <20220419111650.1582274-12-Jason@zx2c4.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220423_030048_989485_DEA23486 X-CRM114-Status: GOOD ( 16.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Sandy, On Sat, Apr 23, 2022 at 10:24:07AM +0800, Sandy Harris wrote: > On Sat, Apr 23, 2022 at 6:37 AM Jason A. Donenfeld wrote: > > > > All platforms are now guaranteed to provide some value for > > random_get_entropy(). In case some bug leads to this not being so, we > > print a warning, ... > > Would it make sense to test at compile time? If there is no hardware > RNG nor a cycle counter, then the kernel should be compiled with > the gcc latent entropy plugin. Generate a warning suggesting that, > or even an error insisting on it. Unfortunately, as a last ditch warning safeguard against bugs, I don't think that's something we can determine at build time. A lot of this machinery is dynamic. Fortunately a single check at init time brings with it zero appreciable overhead. Jason _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel