Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2613147ybe; Sat, 14 Sep 2019 19:38:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPz7FHUtDEf7PdD3FK9t0r8fU8htMO4z+7pDpkuzesmtRoQAgIDfkVrXWsa5sS+C1kObpf X-Received: by 2002:a50:d5c5:: with SMTP id g5mr52265180edj.57.1568515099983; Sat, 14 Sep 2019 19:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568515099; cv=none; d=google.com; s=arc-20160816; b=wjxe8apS+j1k04aPvYFNlkgQxX+QFNnGWApOAdoI4CgaA/5zJryZqGGdByPLoRwNv8 aoB7F0Z8bZzDpdzzBEBUK73hwNbcMICz3jzvgKZM9lulZBvCp87ZIqailQG3s25b0RA4 tVEhGl5yJCrmLz2T9feRzWKQAYY4YPgXpW+NAgvuFISbzmmCKQjCGpmblJ6vjdivf8Rx XJtbnbavZY97tC5H92UO4c6f8iIgUPGhbyyn1DLPV/wQa95AjmdVX7e5pmeqDUmyMFAo gqkANDHUbT9lCYZiySsYNqFSx97wjGT7+ny4Nq4Vp4O1KMeaJDb2cJ+IH8Q3UcjdLZjY TU9Q== 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=3jaz+3rRqlSOpgo+I/TmiFB0JMhsAKNvHZJnxSa0w8w=; b=sBG6HZvLZDM9zsltdzW8zcjbF7scGu/vRPjAoryhvQwelTEmBONRQjdJdpHSOyqZUt 896Nd2LbERpVbVG5k4nQDZ+/qtxkA/4OqwO847wEBpb+/GOvEVESjUrDRaFXrufnoh6X fhwCFzzVwvwmVVA6gVPkczYOfSQKrJQCPY0sZp6T4/55sz+A6mRYShtQHWHmk4oLELVD 7pwjJ96hALYhzjdsVLq+xgzy4Nca5dg/kwffvqx2u2Sd7h9RsJjxh3VUhVGsu+aAzzn0 Nx9bSNM+vPhRTfheXBL/5YQmRC4BxX3/YADAUQI1j443dz/Zd/0bmBTxHSumeXtVejvj my/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="aclPG/A9"; 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 os6si994ejb.224.2019.09.14.19.37.46; Sat, 14 Sep 2019 19:38:19 -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="aclPG/A9"; 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 S1727065AbfIOBLI (ORCPT + 99 others); Sat, 14 Sep 2019 21:11:08 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:45925 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726791AbfIOBLH (ORCPT ); Sat, 14 Sep 2019 21:11:07 -0400 Received: by mail-lj1-f196.google.com with SMTP id q64so19941090ljb.12 for ; Sat, 14 Sep 2019 18:11:06 -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=3jaz+3rRqlSOpgo+I/TmiFB0JMhsAKNvHZJnxSa0w8w=; b=aclPG/A9P+tr2kYHdAmA46ZRYIp9V55HAtxJ94L+Dt6Hj6i2u7wbW0zA9HKOGWcbp0 khpbUTOnGoyzVQkbyCgpLizTCdiIEBX01ILPyiV+YNXpsSVoexwBTdIg7DG4f+S8g98p 9YZ7Nu65nCfjMaunYW2V+DXGGHfxAuvV9aKm0= 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=3jaz+3rRqlSOpgo+I/TmiFB0JMhsAKNvHZJnxSa0w8w=; b=SIG0lDdxwdf7ullm0yWv1PrdUqI4ReDjIUeWynwCDh7Rfd9SDy0QNwjc2ufF+zdrYZ yKyVaUAj8RNQiI4pcvj5dUEnlOV5s9m1YuER+OBFFUuZjirYVh74avxKP3G9J2MOAk6I b3AbKe9tnWbk0PYI+hBihqaJeh2cWD5owPzOIDoErQot1eeuXSeSF6BZz3/eNkgMes0d EzMjAJwmAJFuMEPgFJyNUWd2+1cCGRAJFzO7abxOTutBrb3U2qNlsCZe9MQyJEVfJ5a+ gKdtd8FhjAlroWNKD8vYS5F9VxJj/utZ0fGrGhqIqSPv/dqbbHxnujbVcogfy8eGpkSO lfPg== X-Gm-Message-State: APjAAAWlP/ZbVcJvL2yBGrb0mJknS52nsKzFBSqDOMhnQ4sEJ7IK8SuT yf+eh8OZahsOYpdL66gY2zqYwCAbFNM= X-Received: by 2002:a2e:808c:: with SMTP id i12mr897345ljg.78.1568509865231; Sat, 14 Sep 2019 18:11:05 -0700 (PDT) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com. [209.85.208.171]) by smtp.gmail.com with ESMTPSA id i21sm7964891lfl.44.2019.09.14.18.11.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 14 Sep 2019 18:11:04 -0700 (PDT) Received: by mail-lj1-f171.google.com with SMTP id d5so30453304lja.10 for ; Sat, 14 Sep 2019 18:11:04 -0700 (PDT) X-Received: by 2002:a05:651c:1108:: with SMTP id d8mr26091372ljo.180.1568509863854; Sat, 14 Sep 2019 18:11:03 -0700 (PDT) MIME-Version: 1.0 References: <20190911173624.GI2740@mit.edu> <20190912034421.GA2085@darwi-home-pc> <20190912082530.GA27365@mit.edu> <20190914150206.GA2270@darwi-home-pc> <20190914211126.GA4355@darwi-home-pc> <20190914222432.GC19710@mit.edu> <20190915010037.GE19710@mit.edu> In-Reply-To: <20190915010037.GE19710@mit.edu> From: Linus Torvalds Date: Sat, 14 Sep 2019 18:10:47 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Linux 5.3-rc8 To: "Theodore Y. Ts'o" Cc: "Ahmed S. Darwish" , Andreas Dilger , Jan Kara , Ray Strode , William Jon McCann , "Alexander E. Patrakov" , zhangjs , linux-ext4@vger.kernel.org, Lennart Poettering , lkml 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 Sat, Sep 14, 2019 at 6:00 PM Theodore Y. Ts'o wrote: > > That makes me even more worried. It's probably going to be OK for > modern x86 systems, since "best we can do" will include RDRAND > (whether or not it's trusted). But on systems without something like > RDRAND --- e.g., ARM --- the "best we can do" could potentially be > Really Bad. Again, look back at the Mining Your P's and Q's paper > from factorable.net. Yes. And they had that problem *because* the blocking interface was useless, and they didn't use it, and *because* nobody warned them about it. In other words, the whole disaster was exactly because blocking is wrong, and because blocking to get "secure" data is unacceptable. And the random people DIDN'T LEARN A SINGLE LESSON from that thing. Seriously. getrandom() introduced the same broken model as /dev/random had - and that then caused people to use /dev/urandom instead. And now it has shown itself to be broken _again_. And you still argue against the only sane model. Scream loudly that you're doing something wrong so that people can fix their broken garbage, but don't let people block, which is _also_ broken garbage. Seriously. Blocking is wrong. Blocking has _always_ been wrong. It was why /dev/random was useless, and it is now why the new getrandom() system call is showing itself useless. > We could return 0 for success, and yet "the best we > can do" could be really terrible. Yes. Which is why we should warn. But we can't *block*. Because that just breaks people. Like shown in this whole discussion. Why is warning different? Because hopefully it tells the only person who can *do* something about it - the original maintainer or developer of the user space tools - that they are doing something wrong and need to fix their broken model. Blocking doesn't do that. Blocking only makes the system unusable. And yes, some security people think "unusable == secure", but honestly, those security people shouldn't do system design. They are the worst kind of "technically correct" incompetent. > > > For 5.3, can we please consider my proposal in [1]? > > It may be the safest thing to do, but at that point we might as well > > just revert the ext4 change entirely. I'd rather do that, than have > > random filesystems start making random decisions based on crazy user > > space behavior. > > All we're doing is omitting the plug; Yes. Which we'll do by reverting that change. I agree that it's the safe thing to do for 5.3. We are not adding crazy workarounds for "getrandom()" bugs in some low-level filesystem. Either we fix getrandom() or we revert the change. We don't do some mis-designed "let's work around bugs in getrandom() in the ext4 filesystem with ad-hoc behavioral changes". Linus