Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp1572908ybj; Fri, 20 Sep 2019 12:40:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzimG8QNdyE6CB86zYwpWyJ/IOaatET8mNWneXVfkyR3ac6597bHT3ba3ridibygxNtU45y X-Received: by 2002:a17:906:b298:: with SMTP id q24mr20821859ejz.168.1569008441675; Fri, 20 Sep 2019 12:40:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569008441; cv=none; d=google.com; s=arc-20160816; b=sK78c9jqGU/JmYfVO5lu0pbgdljwMjOia4Dnaz30WQhKFSHM113VpsZdjdKggZvNKi z4MuZFw+M/wGXayI9bDscoMpxakqag3g9xmVYXNGBwbFvKGWlLt84zSi6DIXZVJVnNEZ atFYgHedVGN7NN35BwZMQ7JbMY1sj8KIh3bV5a0Vyvo+T5TZp4u9j9KghYWU//NQ2Gbx q4pybVdKiIdWh741j9eASuScPgUgHCoXFaKmXmnHNWSdSPKyO1VEZ5w6gJhgGKJ9KU3z JM8I0oAOmO3lZLAJ8r5ydr7wrUFvIJUcOJCn39IAIOEfk/PROC5mrVcYMQqwbhJtT8PX NmUQ== 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=z/mbzmqBJe+HOobMbsMD+cs/sFjHpGGPxzDqvmNLoBE=; b=cLIUuzpiFUyEy9dVcCZwu7BlljUqQ3kvio2U8rMsWdikvjn30cnR1Uxkgn/+L0syvm u2vEslq0cPPeIGINwjXWFn4l9Mihl79p0xh0CHZTqQ2plBcJ6bG0LU7Z0aH+IG8MYOUt n+6LZPOQKkGQUvNvtFQHw6oWcnuxcUpmmpeU0qXBEvW4OJ9xyt2tOOnKSlsNUtrmOwY5 jr0MxXN8lENPQMKebNTCWBkXLUN0+bHYFd6qtTcsxMoT1i6AShEbV1tiUHaWOt1WSRdP xMD5qhNUYkOFxFEBiqMFUb3IK/8k81Ww1W0LRVS+vXHAM2G5iEbbQdN1oNUxQ4CkbSS9 40uA== 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 g22si2075216eda.27.2019.09.20.12.40.16; Fri, 20 Sep 2019 12:40:41 -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 S1726215AbfITNNR (ORCPT + 99 others); Fri, 20 Sep 2019 09:13:17 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:52448 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725842AbfITNNR (ORCPT ); Fri, 20 Sep 2019 09:13:17 -0400 Received: from callcc.thunk.org (guestnat-104-133-0-98.corp.google.com [104.133.0.98] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x8KDDAT5018281 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Sep 2019 09:13:10 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id D5A52420811; Fri, 20 Sep 2019 09:13:09 -0400 (EDT) Date: Fri, 20 Sep 2019 09:13:09 -0400 From: "Theodore Y. Ts'o" To: Linus Torvalds Cc: "Ahmed S. Darwish" , Lennart Poettering , "Eric W. Biederman" , "Alexander E. Patrakov" , Michael Kerrisk , lkml , linux-ext4@vger.kernel.org, linux-man@vger.kernel.org Subject: Re: [PATCH RFC v4 1/1] random: WARN on large getrandom() waits and introduce getrandom2() Message-ID: <20190920131309.GB16111@mit.edu> References: <20190914122500.GA1425@darwi-home-pc> <008f17bc-102b-e762-a17c-e2766d48f515@gmail.com> <20190915052242.GG19710@mit.edu> <20190918211503.GA1808@darwi-home-pc> <20190918211713.GA2225@darwi-home-pc> <20190919143427.GQ6762@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Sep 19, 2019 at 08:50:15AM -0700, Linus Torvalds wrote: > .. btw, instead of bad workarounds for a theoretical attack, here's > something that should add actual *practical* real value: use the time > of day (whether from an RTC device, or from ntp) to add noise to the > random pool. Actally, we used to seed the pool from the RTC device --- that was the case in the 3.4 kernel referenced by the Blackhat attack, and it didn't stop the researchers. In later kernels, we moved up when rand_initialized() got called to before time_init(), so init_std_data() was no longer seeding the pool from the RTC clock. That being said, adding calls to add_device_randomness() to do_settimeofday64() and timekeeping_inject_offset() is an obviously good thing to do. I'll prepare a separate patch for the random.git tree to do that. - Ted