Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3404986ybe; Sun, 15 Sep 2019 14:51:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2Lv0IE17fgyK/+TUvIiGPQG7oJWWpHIuvmwamdE4spBYt07yMpl/h9dqUYKFwU1Aru3fb X-Received: by 2002:aa7:c5c2:: with SMTP id h2mr11558405eds.260.1568584300153; Sun, 15 Sep 2019 14:51:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568584300; cv=none; d=google.com; s=arc-20160816; b=hjnPdd+1UPDKTquZhTrdaiSknv9t9JwrrX8E/T5bFBqM2yORJe/2xf/m6FTCn3M7uK GauZXJxa4rxG7Nj+GDi3Eqn7mC7IG+1q6RzPpRc7lnJv9YLtKuWJUuIfvkWDWf92BT1S 0omsHaVsdjusGpbnWPp9jJjbbt1qEfdNHXSzTi1u+EWy/X6b5Rkgu9pRhY6Hi4tnK+cG joJZGR1Jhvx70wQ8kqbY5QTU+lWXiNEzdfvDNWvglCttO8VEGL2Kw6ctNY4cmnyGaRsR MdpoQYsvqb9Vc9uQK25f76LA4NWNTST5gcCNKo0VXatSSJ79DdeemkouCrCpIr8YjPwF dJeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=FC6oplaM/uLQVrJ7puxoeIhZgwICvODF/vPEHCG2N4M=; b=Eo0nqPUWZzOEgwmpdgriYBp6O1ZvH20KDk+bAsaqecXfv/hDdndMswLT7JJtXO/QaP H3uzOPgB7ne938APu9XgbkCVt4NITti3PKePzRfmkDVxj59e01XqGrm/JuujMALtyUMW F1sYBvMVXbkOzhlGdxERElYwTJlBhu+qJ8DgHa5Wo8CjUOFrBbJXcJTtKjer6yTtRoJN uw938hedju0wBPmQA5vsrHTNp8OzbW7N89jNY01kzPv7OnljeQB5YrZOgbrtxgcJYmBl Ln4DUkKAtwygG2xRgrCusggkED/Y9aJ9HCWJ9yXiDxQUHTS92jFskbQgLBBgkVhX/HMH ZUwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=H8aeNSjU; 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 a2si20796466edc.321.2019.09.15.14.51.15; Sun, 15 Sep 2019 14:51:40 -0700 (PDT) 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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=H8aeNSjU; 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 S1726502AbfIOTIy (ORCPT + 99 others); Sun, 15 Sep 2019 15:08:54 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:38003 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726582AbfIOTIy (ORCPT ); Sun, 15 Sep 2019 15:08:54 -0400 Received: by mail-lf1-f65.google.com with SMTP id u28so4964311lfc.5 for ; Sun, 15 Sep 2019 12:08:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FC6oplaM/uLQVrJ7puxoeIhZgwICvODF/vPEHCG2N4M=; b=H8aeNSjUbHEYQw38GMjoyn9XHob6uka2vY7wVgLQDsFuRYIpWKHEOXFjfKOwAOpbRD fzQz/sjksOMUjfFHHoJbP1NELmEJRgPUZ9+WAFmXZDAleQmykxS+ss+2fYrhKaZhhX4/ bT/VS5+fpR8ZyOIIW2ZolBDrjqNHyHlJCVzr0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FC6oplaM/uLQVrJ7puxoeIhZgwICvODF/vPEHCG2N4M=; b=cBxSnoZDxoFgTKYjny04ceFK6/V3e1PLPZKKrh1y5YxIDEitLLb2zCzGD7QP568dZa 7KtkeqMcnQW4dbQiHUvp2TjEUefLqac2EXflcRrZZ2kFU9iScFe2VJsp2nsEepKfymtk HNLEYBkH8u7ApxnYQjT1KlCmbtE/Luski1NYnxMVjtwGrBb2kZPRcYwEUSopNeCj4ZAg r0ws79nZie/V6EZhskUhTo4Yx93fDGqkeWJLDYgcP2yzUpWO54AoFrgye2MkxgprCdFa fqwQaGjDMEmeUpgrbjs9rKrt4pWpH7l2SKc4SZ8p8wOC3REnR7paYrWVZClZCeRvqgSj k2oA== X-Gm-Message-State: APjAAAXfVnAG+5YwZMsL6nZQ6SpK+Zb/7L2jHB+3VRGsU80Wp8rDZ83G yvwrqYR85yFjaZUuSqVSsmXTJLuTWfs= X-Received: by 2002:a19:488f:: with SMTP id v137mr35422951lfa.26.1568574532587; Sun, 15 Sep 2019 12:08:52 -0700 (PDT) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com. [209.85.167.42]) by smtp.gmail.com with ESMTPSA id 81sm8046545lje.70.2019.09.15.12.08.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 15 Sep 2019 12:08:51 -0700 (PDT) Received: by mail-lf1-f42.google.com with SMTP id x80so25766058lff.3 for ; Sun, 15 Sep 2019 12:08:49 -0700 (PDT) X-Received: by 2002:a19:7d55:: with SMTP id y82mr36322038lfc.106.1568574529013; Sun, 15 Sep 2019 12:08:49 -0700 (PDT) MIME-Version: 1.0 References: <20190911173624.GI2740@mit.edu> <20190912034421.GA2085@darwi-home-pc> <20190912082530.GA27365@mit.edu> <20190914122500.GA1425@darwi-home-pc> <008f17bc-102b-e762-a17c-e2766d48f515@gmail.com> <20190915052242.GG19710@mit.edu> <20190915183240.GA23155@1wt.eu> <20190915183659.GA23179@1wt.eu> In-Reply-To: <20190915183659.GA23179@1wt.eu> From: Linus Torvalds Date: Sun, 15 Sep 2019 12:08:31 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RFC v2] random: optionally block in getrandom(2) when the CRNG is uninitialized To: Willy Tarreau Cc: "Theodore Y. Ts'o" , "Alexander E. Patrakov" , "Ahmed S. Darwish" , Michael Kerrisk , Andreas Dilger , Jan Kara , Ray Strode , William Jon McCann , zhangjs , linux-ext4@vger.kernel.org, lkml , Lennart Poettering Content-Type: text/plain; charset="UTF-8" Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Sun, Sep 15, 2019 at 11:37 AM Willy Tarreau wrote: > > I also wanted to ask, are we going to enforce the same strategy on > /dev/urandom ? Right now the strategy for /dev/urandom is "print a one-line warning, then do the read". I don't see why we should change that. The whole point of urandom has been that it doesn't block, and doesn't use up entropy. It's the _blocking_ behavior that has always been problematic. It's why almost nobody uses /dev/random in practice. getrandom() looks like /dev/urandom in not using up entropy, but had that blocking behavior of /dev/random that was problematic. And exactly the same way it was problematic for /dev/random users, it has now shown itself to be problematic for getrandom(). My suggested patch left the /dev/random blocking behavior, because hopefully people *know* about the problems there. And hopefully people understand that getrandom(GRND_RANDOM) has all the same issues. If you want that behavior, you can still use GRND_RANDOM or /dev/random, but they are simply not acceptable for boot-time schenarios. Never have been, ... exactly the way the "block forever" wasn't acceptable for getrandom(). Linus