Received: by 10.192.165.156 with SMTP id m28csp321498imm; Thu, 12 Apr 2018 23:06:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx493KkeckTbtJOefKxDdKsy0bMC5qC8blR5WidcgOfQVL0ID087Rgc4psHn5m5IF1VvsgVSU X-Received: by 2002:a17:902:6505:: with SMTP id b5-v6mr997299plk.147.1523599588985; Thu, 12 Apr 2018 23:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523599588; cv=none; d=google.com; s=arc-20160816; b=veuowB0wBS6EvC+gSWzMTC3MgpB59bUpYMLeeEksxAsjx1qpr8u9Enw8ilk6felgxj Rnrh+4/nVlYU3jrLTS00qrqFDfu/OAfNp8gHak/Fk4u8Vv+1jckZDOF9S7qXIPYnsGqU M1UEydsmecEgX0z1n8gbYY+xFTrC+E5Vaqywfez7cl+jIgVt6IZKuOhHgkQjneax8ZKw 6K8uzBrYTXyMo+EMOGWwL1aXlnTGPvFqVjGqN0iQWwtwDI32qdIzkCckF5BesZLh4X2Q pAE1Jihe6jqK3OiXVCeteL/+omUUsIgGwsLSF3rb0PzIGAbdtswulBrqAfRGkSDLMlRe 4DHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=D4P7uxaJfL/Q0lFnnx4QCm5w5bw4Y6kecyrYW+RHTFs=; b=eceFAgkTXUG6vsIgMWKHPGivpuphDvtXkezJt3txAaTTv9B47A+MyRAxlmbxSz+t58 xVjwbXMy8wC5hNdZP0qcqSBUAvXjLUjTaDUTXafde+h/8LUEVs3jFT7HMLd5ZIBgFtge V5huBKNRSiB5k6Q8y2AI8HZNTaTk9gtvZwEf2E7D1NczjKn7G5+bmEz6KJP9FnSyiH1r yGQgAJi/tYZ91RIzHw2AlPTK5I3M5alj4GD2qMfbA3H7BsSOHC+yH7tnUyqUr2KuTBI/ 9yXSGJ3WuXf+gEt+hMZnytfPJzH85r9XqJkRsTEMMgJCE9ulj76dZ2/ZW4XuoEig/L1T AerA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@chronox.de header.s=strato-dkim-0002 header.b=ZQ/M7efx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x33-v6si5028633plb.356.2018.04.12.23.06.15; Thu, 12 Apr 2018 23:06:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@chronox.de header.s=strato-dkim-0002 header.b=ZQ/M7efx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753308AbeDMFii (ORCPT + 99 others); Fri, 13 Apr 2018 01:38:38 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.217]:14251 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752996AbeDMFig (ORCPT ); Fri, 13 Apr 2018 01:38:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1523597913; s=strato-dkim-0002; d=chronox.de; h=Content-Type:Content-Transfer-Encoding:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:X-RZG-CLASS-ID:X-RZG-AUTH:From: Subject:Sender; bh=D4P7uxaJfL/Q0lFnnx4QCm5w5bw4Y6kecyrYW+RHTFs=; b=ZQ/M7efxOvmN2d1cZMnhv+RXHOGj6rJeLCcrMFHzhVfIbroBqF/dp8BGI/3S4cksDF db/Xt/+cCu+N2FKSvQTglAbgO//lkNketlVAE8xcV3s0DHUSesQyIgCJlRFeNlOJcFH/ F+1jPHix/cUIVSF63M2iHrSmLgZOEAFn2GEu/a7uyzT1OKypPmUMin437cdbnhObvoT9 o+arFiRd1q/EK4kle4S0Be6EZKraYZzw1PBWQULXzKCXs+E8p+Hor0vbwV1XXqCm0Sak PDewo9uF4AfHgJYh/ncxUll34nsZlzSMeSN+Lo/ZbbT1eUzv+RablHxvO87MK0D0TLb7 nqjA== X-RZG-AUTH: :P2ERcEykfu11Y98lp/T7+hdri+uKZK8TKWEqNyiHySGSa9k9zW4DNhHoQE+naq7U2oCocl772u2XiabRKKbHM1HYja5N/pDsB6V17g== X-RZG-CLASS-ID: mo00 Received: from tauon.chronox.de by smtp.strato.de (RZmta 43.2 AUTH) with ESMTPSA id 30838au3D5cUFbf (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Fri, 13 Apr 2018 07:38:30 +0200 (CEST) From: Stephan Mueller To: Theodore Ts'o Cc: linux-crypto@vger.kernel.org, Linux Kernel Developers List , stable@kernel.org Subject: Re: [PATCH 1/5] random: fix crng_ready() test Date: Fri, 13 Apr 2018 07:38:30 +0200 Message-ID: <1699469.KmO53oa8XU@tauon.chronox.de> In-Reply-To: <20180413013046.404-1-tytso@mit.edu> References: <20180413013046.404-1-tytso@mit.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Freitag, 13. April 2018, 03:30:42 CEST schrieb Theodore Ts'o: Hi Theodore, > The crng_init variable has three states: > > 0: The CRNG is not initialized at all > 1: The CRNG has a small amount of entropy, hopefully good enough for > early-boot, non-cryptographical use cases > 2: The CRNG is fully initialized and we are sure it is safe for > cryptographic use cases. > > The crng_ready() function should only return true once we are in the > last state. > Do I see that correctly that getrandom(2) will now unblock after the input_pool has obtained 128 bits of entropy? Similarly for get_random_bytes_wait. As this seems to be the only real use case for crng_ready (apart from logging), what is the purpose of crng_init == 1? Ciao Stephan