Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1781601imu; Thu, 13 Dec 2018 23:59:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/V4InMM/BLGZPPGLkd6NQCTZ8WkazK10/YtWs1ii1DsJGrYgtSfBpl4AL1U+MU4pY+fzmZl X-Received: by 2002:a63:66c6:: with SMTP id a189mr1831706pgc.167.1544774377006; Thu, 13 Dec 2018 23:59:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544774376; cv=none; d=google.com; s=arc-20160816; b=pSjcZQrPQgXKjCsKIiuBIlw+ImGPeA1bxQ5ohSjjWM0k/ra+WqYSHIWXyb0IK5Kmc7 QseaaePsCSNqxhpCWJYXHXLWMlX/wEInVN8c+SLcVDAyqL58STQjjyvGJqSdU2BttyY9 ypZ5RbmiPYLSIAWT/J7sYV/nPikBulOtoE85UhxJx7fSxH4pyijgOv2Ab08SCSbr3SkK DkZKUwelEtt5Y6d4/3GfDNSmtpIFqFBSjZI+WkxRpDaoS7nOE3uIt9o/SdqP3FeWpik0 +bFfyh43uxugFcp2cymRM+pe3TlDWBQCL0Xxp+ZAxnUFYf5788M7/2G2tG5CoswzUnGI +BaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=D4Dniu6FowQoS16LsTpFTaccWCbOvlzMdS8kE9pe0Hw=; b=W0HYPmqlf4YPgujsKUFefgXjoXnQKSmLfpgqPPp76iAAYRG5OiFnNR2cDbzvdwfYkN BW59ItKYD/wJlOhbiYLHp6lnbwQwu4zBryeXE56dhCw3CJ3IsUgY6I1TasmQJYkf1Xe7 1m++/zJ2FoMHH+oeTsfA9E92idyD9trBU9M05yE/JrSQ+o2as9L8to3lwHCt1k7vMVsk DaWokAUHLIw5Kt9CXY9zW/nqA0uE0uouD4rmf35BJcMmYdBWPmlOnO2iVbYb/wE52u+T PJCQ2o/t8Y8IgGchuUctPCmcqfkeJm/jd6mlP5ZFkOwtFrHXIdBlS/Veumld0kYv1BXt yYpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a12si70269pgk.291.2018.12.13.23.59.21; Thu, 13 Dec 2018 23:59:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727856AbeLNH5J (ORCPT + 99 others); Fri, 14 Dec 2018 02:57:09 -0500 Received: from mga14.intel.com ([192.55.52.115]:33492 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726533AbeLNH5I (ORCPT ); Fri, 14 Dec 2018 02:57:08 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2018 23:57:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,352,1539673200"; d="scan'208";a="110325141" Received: from hekner-mobl.ger.corp.intel.com (HELO localhost) ([10.249.254.170]) by orsmga003.jf.intel.com with ESMTP; 13 Dec 2018 23:57:01 -0800 Date: Fri, 14 Dec 2018 09:56:56 +0200 From: Jarkko Sakkinen To: Louis Collard Cc: linux-crypto@vger.kernel.org, Matt Mackall , Herbert Xu , Arnd Bergmann , Greg Kroah-Hartman , Gary R Hook , Michael Buesch , PrasannaKumar Muralidharan , "Michael S . Tsirkin" , linux-kernel@vger.kernel.org, apronin@chromium.org, linux@mniewoehner.de, david.bild@xaptum.com, tytso@mit.edu Subject: Re: [PATCH v2] Allow hwrng to initialize crng. Message-ID: <20181214075656.GA1721@linux.intel.com> References: <20181213091848.81327-1-louiscollard@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181213091848.81327-1-louiscollard@chromium.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 13, 2018 at 05:18:48PM +0800, Louis Collard wrote: > Some systems, for example embedded systems, do not generate > enough entropy on boot through interrupts, and boot may be blocked for > several minutes waiting for a call to getrandom to complete. > > Currently, random data is read from a hwrng when it is registered, > and is loaded into primary_crng. This data is treated in the same > way as data that is device-specific but otherwise unchanging, and > so primary_crng cannot become initialized with the data from the > hwrng. > > This change causes the data initially read from the hwrng to be > treated the same as subsequent data that is read from the hwrng if > it's quality score is non-zero. > > The implications of this are: > > The data read from hwrng can cause primary_crng to become > initialized, therefore avoiding problems of getrandom blocking > on boot. > > Calls to getrandom (with GRND_RANDOM) may be using entropy > exclusively (or in practise, almost exclusively) from the hwrng. > > Regarding the latter point; this behavior is the same as if a > user specified a quality score of 1 (bit of entropy per 1024 bits) > so hopefully this is not too scary a change to make. > > This change is the result of the discussion here: > https://patchwork.kernel.org/patch/10453893/ Please remove these two lines. > Signed-off-by: Louis Collard > Acked-by: Jarkko Sakkinen > --- The change log seems to be missing before diffstat, after dashes. /Jarkko