Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3403806ybe; Sun, 15 Sep 2019 14:49:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqweeFeVgy0sfJGnbfrVnx/eHurSGq+kUZDSsYkp7R7DLBcD+m0IDGKdggFqO5QHLe23IDGG X-Received: by 2002:a17:906:1cc6:: with SMTP id i6mr10662526ejh.40.1568584164599; Sun, 15 Sep 2019 14:49:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568584164; cv=none; d=google.com; s=arc-20160816; b=WGnEX784QZn5oRQHS3Hn/FZRYX7pyL+nedIuBtNINqrNwXH6opLmHEowAx1oR85fEV R7OHAimQ+VzAgP1j5wqjVyQZpx7M0DYqCu/NHQcFJd8vdCXZJzEoz40KknYvDgX9n3qN jnoBNcpWQSCI6SqEIxRcr3u3e8QU3q7JErO8abH9HsiLXlYJklSkebjwpwxehzArkRQ/ ziHv25HQrvhEQXw+RztbOZ+558daa12HWBllzWltt6Q7ydPAZCDde7fP4kFhbohuQ0QB dBnOITtYZQW9pcCjKQ7cl5mkuKLDWOwbYeB6Eym+WjGtXfeRLljFf/5rLoNZjYRQMkck FL4g== 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=oP+K/Zty/5Eq3dLtmg1ohj585ZAG9DxfRL/uBO87TVA=; b=Gf3fxA92U2ltZuIqGPZ+N7JJkcPDbvxP2lxnuGQ9mxPV84Ne2nIEyWxL0TXW6EhxCB uz+7unu/4R69NpgRgZO1HPK9z+9aFtTpb+FF5x2kkPE9zCwtT5QoVM5MmTDRU83L8/bI s+IQy1ikwfidmAv0t9tatTEPIEBPek1pyHSWwPPK3BAV5mm3WuH33LmD51ZG/9piGGSU MBdeuF0gVYtIO4D8g0lFjspB66O+MdrOy1wKUpEq+hybLDuNjVxvgqDcHBqzzWMZFsQu dqVRJUD5l2f0I/c4UKQX2YrkFnvnPMszqbf0alJAieV+MNTDKhHMi+IYaZL034NMVH9l smOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=ZbdST7Em; 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 oz6si496598ejb.124.2019.09.15.14.48.58; Sun, 15 Sep 2019 14:49:24 -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=ZbdST7Em; 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 S1726738AbfIOTFQ (ORCPT + 99 others); Sun, 15 Sep 2019 15:05:16 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:34849 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726595AbfIOTFP (ORCPT ); Sun, 15 Sep 2019 15:05:15 -0400 Received: by mail-lj1-f196.google.com with SMTP id f1so207792ljc.2 for ; Sun, 15 Sep 2019 12:05:13 -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=oP+K/Zty/5Eq3dLtmg1ohj585ZAG9DxfRL/uBO87TVA=; b=ZbdST7EmT75LmzbCteN6qEe5ZYtv+VqtbPOMfDEfSB2Sl+0Wja2v4xXoUQnh9HZZJE 84kSoPHUTuc/TUM8RDZ6/cZRgEnsP0xfDBw0ai28cdu4bSFq45w/+JGJsbXvO54jsHCN f+JdY+GKJvAQvqPONNqYbX1ul8kh+5gunBRJ0= 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=oP+K/Zty/5Eq3dLtmg1ohj585ZAG9DxfRL/uBO87TVA=; b=m/gOgMRjoTplk2yXL685lJJsk6b7AMZc3K3vr188A2oKM0e72dpUk/LXd/ULomMLJB PDTjsuTGXsZCIwv3yQsjuFWnDHjIRCJq/NJN3hU/yHUYmd/W/+zB5m/AonAZy3l9dxd1 tCnxSEXOh/x9LUxZvqsxluHy29tZg1tGMRM2cisIFo2nKFYCZm2SiekE9wzcxbbOb0Si v8reR7GCpMHVefTlyHL0FoKj4wZcWUuJ5rLsxT7BnsvQRv59ICva1Xr0TLa0q5tn5yC8 tPSDNEH0has7y5w4SUXvv6Pqa2g0B6ewdopnALB+SVXwnKFjk1vr6GWkhU88Y61eSgak 6UXQ== X-Gm-Message-State: APjAAAV3b7UFlHJJnUOCHbZJ8T8+m8DZ7s3p6r88DcLY2CYRl28mh4I5 mQFC94t0WL++7QsYkJZi8MMg6UHi2Jo= X-Received: by 2002:a2e:8104:: with SMTP id d4mr32281729ljg.151.1568574311855; Sun, 15 Sep 2019 12:05:11 -0700 (PDT) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com. [209.85.208.170]) by smtp.gmail.com with ESMTPSA id 77sm7976748ljf.85.2019.09.15.12.05.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 15 Sep 2019 12:05:11 -0700 (PDT) Received: by mail-lj1-f170.google.com with SMTP id e17so31665015ljf.13 for ; Sun, 15 Sep 2019 12:05:11 -0700 (PDT) X-Received: by 2002:a05:651c:1108:: with SMTP id d8mr27700804ljo.180.1568573997850; Sun, 15 Sep 2019 11:59:57 -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> In-Reply-To: <20190915183240.GA23155@1wt.eu> From: Linus Torvalds Date: Sun, 15 Sep 2019 11:59:41 -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:32 AM Willy Tarreau wrote: > > I think that the exponential decay will either not be used or > be totally used, so in practice you'll always end up with 0 or > 30s depending on the entropy situation According to the systemd random-seed source snippet that Ahmed posted, it actually just tries once (well, first once non-blocking, then once blocking) and then falls back to reading urandom if it fails. So assuming there's just one of those "read much too early" cases, I think it actually matters. But while I tried to test this, on my F30 install, systemd seems to always just use urandom(). I can trigger the urandom read warning easily enough (turn of CPU rdrand trusting and increase the entropy requirement by a factor of ten, and turn of the ioctl to add entropy from user space), just not the getrandom() blocking case at all. So presumably that's because I have a systemd that doesn't use getrandom() at all, or perhaps uses the 'rdrand' instruction directly. Or maybe because Arch has some other oddity that just triggers the problem. > In addition, since you're leaving the door open to bikeshed around > the timeout valeue, I'd say that while 30s is usually not huge in a > desktop system's life, it actually is a lot in network environments > when it delays a switchover. Oh, absolutely. But in that situation you have a MIS person on call, and somebody who can fix it. It's not like switchovers happen in a vacuum. What we should care about is that updating a kernel _works_. No regressions. But if you have some five-nines setup with switchover, you'd better have some competent MIS people there too. You don't just switch kernels without testing ;) Linus