From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A164EC67839 for ; Fri, 14 Dec 2018 07:57:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A20620866 for ; Fri, 14 Dec 2018 07:57:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A20620866 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727934AbeLNH5J (ORCPT ); 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