Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2753781ybe; Sat, 14 Sep 2019 23:34:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJhOL6fgdAuqrTc4iJZm3v/IhTVfwp96Z8KLAj+a1KMGbcg1R85+AJEnOIvNkcwJyiNjcc X-Received: by 2002:a17:906:c08:: with SMTP id s8mr46541015ejf.66.1568529263262; Sat, 14 Sep 2019 23:34:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568529263; cv=none; d=google.com; s=arc-20160816; b=cZ3Jgwm//jQyM7kWXZqUyTEK15/7+bOdq952gjhyGZ6HyT72UKjUIvGCitEKLJD8H9 x1YuNu4VnMwmlmTpStuWhZDhlS4XiOUNQmIH+hKH42iFOI66aTZhOQGWgQqypNFTHAyg ovi9GfExhrSC5GWztFg41OMrEGr18c7H5UDwP7igjmDexqRsOMy0EDsrt5+u54o1ETWS eTRm0KqDeA9kgLZ74b698OiAVrESRDFGy5Ssr/fsD1juXWvK6NoTrmsQBZXP5R+ZDDZ7 uVlR0xKP/DpE62hux9QL5T1xF8JLvtARvyjJl6gMSy0IoX6jpb2If5S7pYd7BJ9rXvsB y/Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=22+06mQG7pFZoCXcV2Zl9BiLzoIUkuWnqmOtUORKVM0=; b=F2KdCi0WpIGZTG5DM3dG4Baq6moG9KkS0gxEGUJKUckPmv831D1ylFcWUKmauVqzPS 14Y6aL/3KfKzF45/UOGRrVmITAeqsngY7WlZ1AFqYgq3ridqrB7QSCrXnGSsj9aBH5lx Q6Mtju2ptDRnAnRlI9wS1BSl0dxOwgctAYXVesUZ5NXsYDW2EDZzkgPHPVfwmZ3iBn7q aL20Lhidgsi+7NoAFuz8IdXOXr8mjX5L/XcHepsl7sfjv8KleVIT4fjwZ3QyCOaKQLoM noOlfOL7559xfayvNW7db5Pev01zBVMYJUbAew/6uhlC1zWu4B5Ysum/gCZMTInmkSlf Z2zA== 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 v17si564242ejq.5.2019.09.14.23.33.52; Sat, 14 Sep 2019 23:34:23 -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; 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 S1725907AbfIOGdv (ORCPT + 99 others); Sun, 15 Sep 2019 02:33:51 -0400 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:45048 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725904AbfIOGdv (ORCPT ); Sun, 15 Sep 2019 02:33:51 -0400 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id x8F6XNJP021550; Sun, 15 Sep 2019 08:33:23 +0200 Date: Sun, 15 Sep 2019 08:33:23 +0200 From: Willy Tarreau To: "Theodore Y. Ts'o" Cc: Linus Torvalds , "Ahmed S. Darwish" , Andreas Dilger , Jan Kara , Ray Strode , William Jon McCann , "Alexander E. Patrakov" , zhangjs , linux-ext4@vger.kernel.org, Lennart Poettering , lkml Subject: Re: Linux 5.3-rc8 Message-ID: <20190915063323.GA20811@1wt.eu> References: <20190912082530.GA27365@mit.edu> <20190914150206.GA2270@darwi-home-pc> <20190914211126.GA4355@darwi-home-pc> <20190914222432.GC19710@mit.edu> <20190915010037.GE19710@mit.edu> <20190915020521.GF19710@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190915020521.GF19710@mit.edu> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Sat, Sep 14, 2019 at 10:05:21PM -0400, Theodore Y. Ts'o wrote: > I'd be willing to let it take at least 2 minutes, since that's slow > enough to be annoying. It's an eternity, and prevents a backup system from being turned on in time to replace a dead system. In fact the main problem with this is that it destroys uptime on already configured systems for the sake of making sure a private SSH key is produce correctly. It turns out that if we instead give the info to this tool that the produced random is not strong, this only tool that requires good entropy will be able to ask the user to type something to add real entropy. But making the system wait forever will not bring any extra entropy because the services cannot start, it will not even receive network traffic and will not be able to collect entropy. Sorry Ted, but I've been hit by this already. It's a real problem to see a system not finish to boot after a crash when you know your systems have only 5 minutes of total downtime allowed per year (5 nines). And when the SSH keys, like the rest of the config, were supposed to be either synchronized from the network or pre-populated in a system image, nobody finds this a valid justification for an extended downtime. > Except the developer could (and *has) just ignored the warning, which > is what happened with /dev/urandom when it was accessed too early. That's why it's nice to have getrandom() return the error : it will for once allow the developer of the program to care depending on the program. Those proposing to choose the pieces to present in Tetris will not care, those trying to generate an SSH key will care and will have solid and well known fallbacks. And the rare ones who need good randoms and ignore the error will be the ones *responsible* for this, it will not be the kernel anymore giving bad random. BTW I was thinking that EAGAIN was semantically better than EINVAL to indicate that the same call should be done with blocking. Just my two cents, Willy