Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9828634ybl; Thu, 26 Dec 2019 06:06:25 -0800 (PST) X-Google-Smtp-Source: APXvYqzPK8D71es5kJ+6zJDmJ1wP7sVNHcNBCCJJEfA+kTOuxdmBtP/VfTkaytRWHYbcuNW86Nih X-Received: by 2002:a9d:6d8f:: with SMTP id x15mr42307245otp.322.1577369185032; Thu, 26 Dec 2019 06:06:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577369185; cv=none; d=google.com; s=arc-20160816; b=FYUWJ4cbIyfYJxZN6UYASTU8DRyp09KoywVFHl9J3OEgm6RsmTNgrULm+kaWeYD1L4 JJjGMRpHJeZUY4XYaIO7uuv0H9nPGroy80SsWipu1DFD2G2OwvDj/iFUf+aR97Qg3F5M /MG7ugobkReBJ6lyYF17EA/b3ACQEDVWLcHqj12FxzgQxTK7QuDnU1uN7kZaJZgyySIn 1Gwq5Hozze8b83dp94wR5arSh5ZdfXh4pldeBCc+uBe1f8HYWdZQggQnicuhgMPhCMoh bmh98YHFYts6m36mogKMMFH2C2JNZuRYCocaQ6uULChAFAmCRpjjJVT1+PFX2AfddE+U t/nw== 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; bh=jcfG1RWpmsPIwkncKiFkn/gATfjEX9s4j0gf6m+lHuE=; b=JxBoJf/2wSATKaaaXUZN/fIQokFbhEBj4vvsFQhVFxjwmvtAQ7ktfBCq3YPIQFY6nR JV/dyajWkeyNgLlLEtOCHeuL8LLQzEnDzlucnz21ZNGRXmmcvT5v68VO1PnTjWtnc9Pf mkrSgYQ2Igr8es4g6fjlZNSY0IeIQktQqcA5FQj6d0TWaW0HH0C4XnY8hqdV+fzo05xv v0Vs51+HbOF9JIeSPZaBMUvp3AVEycTyB+xxYXo+uI1gAwS9YY3LnX0U8bxvsl9hYo8C 7OPatjN6NMHd6Mtmu9NEZS/XUj3Y4QSLGw7h6kIZ/qE8P+6ej5IK2M41VuRoHkZaLhRK RyhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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 45si13423158oty.188.2019.12.26.06.05.56; Thu, 26 Dec 2019 06:06:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727170AbfLZOFe (ORCPT + 99 others); Thu, 26 Dec 2019 09:05:34 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:36057 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727146AbfLZOFd (ORCPT ); Thu, 26 Dec 2019 09:05:33 -0500 Received: from callcc.thunk.org (96-72-84-49-static.hfc.comcastbusiness.net [96.72.84.49] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id xBQE4NwC001450 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 26 Dec 2019 09:04:25 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id 7CE45420485; Thu, 26 Dec 2019 09:04:23 -0500 (EST) Date: Thu, 26 Dec 2019 09:04:23 -0500 From: "Theodore Y. Ts'o" To: Stephan Mueller Cc: Andy Lutomirski , Andy Lutomirski , LKML , Linux API , Kees Cook , "Jason A. Donenfeld" , "Ahmed S. Darwish" , Lennart Poettering , "Eric W. Biederman" , "Alexander E. Patrakov" , Michael Kerrisk , Willy Tarreau , Matthew Garrett , Ext4 Developers List , linux-man Subject: Re: [PATCH v3 0/8] Rework random blocking Message-ID: <20191226140423.GB3158@mit.edu> References: <9872655.prSdhymlXK@positron.chronox.de> <888017FA-06A1-42EF-9FC0-46629138DA9E@amacapital.net> <4820831.xlnk3tY4r2@tauon.chronox.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4820831.xlnk3tY4r2@tauon.chronox.de> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Dec 26, 2019 at 01:03:34PM +0100, Stephan Mueller wrote: > Agreed. I was just trying to outline that the removal of the blocking_pool is > a good thing. Even when we decide that random.c should receive a TRNG, we do > not need to re-add a blocking pool, but can easily use the existing ChaCha20 > DRNG (most likely with its own instance). Well, it depends on what you mean by "TRNG" --- the ChaCha20 DRNG only has a state of 256 bits. So if you want to only depend on "true entropy" you can't extract more than 256 bits without violating that assumption, at least if you're using a very strict definition of TRNG. By getting rid of the blocking pool, and making /dev/random work like getrandom with flags set to 0, we're effectively abandoning any kind of assertion that /dev/random is some kind of TRNG. This is not insane; this is what the *BSD's have always done. But once we do this, and /dev/random takes on the semantics of "block until the CRNG has been initialized, and then it won't block after that", if we change it so that it now has some different semantics, such as "one you extract a 256-bit key, the read from /dev/random will block until we can refill it, which might take seconds, minutes or hours", will be considered a regression, and we can't do that. Of course, we can hope that people will be using getrandom() and there will be very few new users of the /dev/random pathname. But nothing is ever guaranteed.. - Ted