Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5648293ybe; Tue, 17 Sep 2019 11:14:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzdHc1Lq/6A7RInbvALjBEnAECuRWHtHeKrC0BKCuucz1VSba5hkUnU+etLAIzoaWrUloSx X-Received: by 2002:a17:906:1304:: with SMTP id w4mr5886722ejb.6.1568744099451; Tue, 17 Sep 2019 11:14:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568744099; cv=none; d=google.com; s=arc-20160816; b=Qn4X50ZofeRvpMl55prg3FT0GSH3DXRhUqCOcc26wZOA5usmH+1yE/I3YXhcOjFDd1 PU2MfYYSys04KEVX2F3LeMrpLhwHNM0D+I/4q/eurmTcH5+M1ns5XEIO8X0GCDeN2B3X rGxzB3u5nnBwwZHZQTHVTdrA2MBXkFhPQ5Itv6PY05YL0tqnZCzbSejkG+Cr6YdoFQ0A Gj1jL39sJEdYQ+J4RH8qaNsde+Tpdb6FcaanVNZlIkkjJvFNZ5sKX7y2labV5q3C0RZt KzdqNGtrypRaI1FBoYxjPdnxQRSnwR2xcmQXjnTxPL7i6i1beBrqIXM5akxbLZ1uz9AN GG6A== 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=6+tSfNjye2dC9Hnr1VodxWKM4W2u/EiGpq2g+k0G+WQ=; b=GLRRiYY1EWtcbEnyV3SLSTtQKIO1s/ZJH022BO4tbYcfXWgs4CJx/O0wIh/1h182yd 4t6px1nnYlzciTRm29e1nVW6LDR/jQHvZqer60tB3TF1Ru+qACIf4mK8aHvnNRQliNu2 D9couN4q8cq3no6kLHhlkZsSaKaDbpMTqm+Y4wleZk3oRQT7rUl537J+uyrJ8p9vQNWQ g9xXoQVH9+aU1rV6wBG+WUA6XgUS1C1ZMMbH5xK1txfhc/mstQUPeCanhKL52cKmzzgz BKq1+9BqzfVadWcO1nPSSZpCcxANy5udd63BD0whiNbGN0QbYvmxHsfDirwGlVgcaCPH usGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 h19si1743427edv.393.2019.09.17.11.14.24; Tue, 17 Sep 2019 11:14:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729495AbfIQPg7 (ORCPT + 99 others); Tue, 17 Sep 2019 11:36:59 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:33671 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728367AbfIQPg7 (ORCPT ); Tue, 17 Sep 2019 11:36:59 -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 x8HFaKmh023483 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Sep 2019 11:36:24 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 44B56420811; Tue, 17 Sep 2019 11:36:20 -0400 (EDT) Date: Tue, 17 Sep 2019 11:36:20 -0400 From: "Theodore Y. Ts'o" To: Laurent Vivier Cc: linux-kernel@vger.kernel.org, Amit Shah , linux-crypto@vger.kernel.org, Matt Mackall , Herbert Xu Subject: Re: [PATCH] hw_random: don't wait on add_early_randomness() Message-ID: <20190917153620.GG6762@mit.edu> References: <20190917095450.11625-1-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190917095450.11625-1-lvivier@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Sep 17, 2019 at 11:54:50AM +0200, Laurent Vivier wrote: > add_early_randomness() is called by hwrng_register() when the > hardware is added. If this hardware and its module are present > at boot, and if there is no data available the boot hangs until > data are available and can't be interrupted. > > To avoid that, call rng_get_data() in non-blocking mode (wait=0) > from add_early_randomness(). > > Signed-off-by: Laurent Vivier Looks good, you can add: Reviewed-by: Theodore Ts'o