Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5039066ybe; Tue, 17 Sep 2019 01:18:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzzZ+KGzl6Yp6ZEqUu139ztxN1imuubiKUMuprAp6oefORRwAfangjxr3/lunz6O3JAqPwA X-Received: by 2002:a17:906:4a5a:: with SMTP id a26mr3656775ejv.154.1568708332834; Tue, 17 Sep 2019 01:18:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568708332; cv=none; d=google.com; s=arc-20160816; b=g63S4YR54w9SHKf8q7Rnapkunf9cP1wJVua7dfTYyo05SR/HZjQGYyCTnQ2OCoSFXb JBJUdjIs3yaJ7W49CocfmWhSJrzLygeTsvIeaBu3stdjx0pkMtk4Uve0n3O6pi5fF3FN vcDL+96lrUDtE9Vnwh6xCik5wJ0evGHBGYZxWbr3yN8BHfVGhC1z3IFWaq1Yr6K9EPDA JdI7Md3m04j0jr3zzhYqtpb0ZZdtbzmdpNby88tnN96svKjQsSKbjNwEosd0ic37hTXV 7ORvT63RISpIiky8oooSmo7EGBXvyF8xEALRK15lAE+5wHvSkBZghqHQ2PT79Y+2lBjF I8aw== 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:dkim-signature; bh=X2q8aSnUy4dy03z0yGFvq5cDtugo9Mv7XGnsBb9G3Bk=; b=JtsQdDB10yo8+p5tPVwHbYyOpS4IaDoQoTDbdtACOYSQ6iloFH3ZxnI1nfbD3zZ4bF gnthL0werIIHgLwxNvaLsgRAt/W9x9T9dVo2uijvHLpSPqN4Nbd+GlVDDpnbf0ZgtmZP a+CtTXUE4nbxp+wyfxWIGUFUX38OGa2gbYhJ8Daqh9/cWvTuFU58OIGTpFE4KENK1a7S G5aS17raJEzTB4k26h/Ex94ICl9RNSEi0eJyh1UqXjAvBJMXdsrvO4bTUXbDMgkNCADo oO9KXPeJ5AHP6wlcPmNhGzJWpYOe6DSLQZmAwvrGIDHaf1EA+6vVVfdsPTy18GOlqmad 0xQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@codon.org.uk header.s=63138784 header.b=iAa4MiEK; 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 j14si850180edt.298.2019.09.17.01.18.28; Tue, 17 Sep 2019 01:18:52 -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=fail header.i=@codon.org.uk header.s=63138784 header.b=iAa4MiEK; 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 S1726648AbfIPXey (ORCPT + 99 others); Mon, 16 Sep 2019 19:34:54 -0400 Received: from cavan.codon.org.uk ([93.93.128.6]:47379 "EHLO cavan.codon.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbfIPXey (ORCPT ); Mon, 16 Sep 2019 19:34:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codon.org.uk; s=63138784; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=X2q8aSnUy4dy03z0yGFvq5cDtugo9Mv7XGnsBb9G3Bk=; b=iAa4MiEKt/pSuLtIM34u8C1sW HHlf+AHi/l5j+B4Z4Z0k+p3U6eMDp91kvCPlrGAlvN7/2pFnerYmrpTlrds1l4uKuu4UD2RIXJv9u YW2hP7Ilkey8R69WYU4zMpfFKhHUbErDI/SRqn/q7IpqEli9w4dM4vCXhqDIFc0jB4wfQ=; Received: from mjg59 by cavan.codon.org.uk with local (Exim 4.89) (envelope-from ) id 1iA00g-0001fo-3D; Tue, 17 Sep 2019 00:02:18 +0100 Date: Tue, 17 Sep 2019 00:02:18 +0100 From: Matthew Garrett To: Linus Torvalds Cc: "Theodore Y. Ts'o" , Willy Tarreau , Vito Caputo , "Ahmed S. Darwish" , Lennart Poettering , Andreas Dilger , Jan Kara , Ray Strode , William Jon McCann , "Alexander E. Patrakov" , zhangjs , linux-ext4@vger.kernel.org, lkml Subject: Re: Linux 5.3-rc8 Message-ID: <20190916230217.vmgvsm6o2o4uq5j7@srcf.ucam.org> References: <20190916014050.GA7002@darwi-home-pc> <20190916014833.cbetw4sqm3lq4x6m@shells.gnugeneration.com> <20190916024904.GA22035@mit.edu> <20190916042952.GB23719@1wt.eu> <20190916061252.GA24002@1wt.eu> <20190916172117.GB15263@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: mjg59@cavan.codon.org.uk X-SA-Exim-Scanned: No (on cavan.codon.org.uk); SAEximRunCond expanded to false Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Sep 16, 2019 at 10:44:31AM -0700, Linus Torvalds wrote: > - admit that the current situation actually causes problems, and has > _existing_ bugs. > > - throw it out the window, with the timeout and big BIG warning when > the problem cases trigger The semantics many people want for secure key generation is urandom, but with a guarantee that it's seeded. getrandom()'s default behaviour at present provides that, and as a result it's used for a bunch of key generation. Changing the default (even with kernel warnings) seems like it risks people generating keys from an unseeded prng, and that seems like a bad thing? It's definitely unfortunate that getrandom() doesn't have a GRND_URANDOM flag that would make it useful for the "I want some vaguely random numbers but I don't care that much and I don't necessarily have access to /dev/urandom" case, but at the moment we have no way of distinguishing between applications that are making this call because they want the semantics of urandom but need it to be seeded (which is one of the usecases getrandom() was introduced for in the first place) and applications that are making this call because it was convenient and the kernel usually ended up generating enough entropy in the first place. Given the ambiguity, I don't see an easy way to solve for the latter without breaking the former - and that could have some *very* bad outcomes. -- Matthew Garrett | mjg59@srcf.ucam.org