Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp91120imm; Thu, 4 Oct 2018 18:46:31 -0700 (PDT) X-Google-Smtp-Source: ACcGV607zk2Ae7tiCalVzs/Ppkns/UTHHlkMlBFoAazdJk+9lYy03DfZcqhEMRb9lO7IEjoIOFAn X-Received: by 2002:a17:902:b484:: with SMTP id y4-v6mr9135463plr.262.1538703991470; Thu, 04 Oct 2018 18:46:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538703991; cv=none; d=google.com; s=arc-20160816; b=kdr5WfrmuoT0zDFcsv6pzUpKKn4mGWi8XnUeieoF6K9Uxop7IvpveZjNaOHeO23XIR 2luZb/CdCpAVOp0YLpVST7k41SWD1Evb7S/H+xLnnUb0bRXtXByQMPGfQP3s8ArgFi0w 5NDf52+4DF2wG317OiE3iii8fy++qQoZ7+1PolXLZ7imfLSnGAu0EKy17ZbehBCLGOuD VTIIGjbMMC9d+BFXkvIFK89+NDQyAxo0DjEdh8mxL9H2Rig4BW/A1n3fw8tdLQCqzEKj 2jl4nUzyNdZpP3zZB+11xoh3qduRSh70alh1DyOYoQIU8gkx3CpZ1LSzrWLrG+Wby2WV QraA== 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=HgKSEEQ5IA8zrLmJQ3K/k7s0GrUwLuKe/fLokXDAc20=; b=veyrlzyL7ATh4+q9BcDEOj9lPdbrhqcf3bbiaCW0nUMUqk+qFwzJmObo9m11BQ+ZnL 56Y3+KxPfigUJdm859ko4922NCsJxvZiVb3tS94R49pTveIs/uKHu+ghZ+/SBxAeRmDw vC1PJrOnN8APodn637PYWvEA0eHjRxg1VWVD6TFJqxwxrSpq1Z9sxydYYboxPjl/PqST Hh8bJMqiLrRPDBFKWmfPb9N4xXnDcyyXdXZxpCKFA/ufymkc4hOa0BSun5JudZdUY4EX 7Yig3tCuyPUnIoE7XWmRZI0jkNN+ni+lLvO6o2tC9Tf9v8biu2Pwe4ChE6kCVfYhqzjM ZvLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=aW2rvpmV; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4-v6si6703907plo.254.2018.10.04.18.46.15; Thu, 04 Oct 2018 18:46:31 -0700 (PDT) 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; dkim=pass header.i=@chromium.org header.s=google header.b=aW2rvpmV; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726885AbeJEIme (ORCPT + 99 others); Fri, 5 Oct 2018 04:42:34 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:40224 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726286AbeJEImd (ORCPT ); Fri, 5 Oct 2018 04:42:33 -0400 Received: by mail-oi1-f196.google.com with SMTP id j68-v6so9150459oib.7 for ; Thu, 04 Oct 2018 18:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HgKSEEQ5IA8zrLmJQ3K/k7s0GrUwLuKe/fLokXDAc20=; b=aW2rvpmVDD4kB18R27lPuRpVE4Th2SQrr6rXJjsE6V2/q+O+STKtfUapOkkeDqi81U DFFLFDfKANml5cAm4kv+PMT4gOPoaP0EPEmOP57CXOLaGzaHwQyAnTnZqWlkZRIRo9Xz GnfMQ7K/bnOQFkpoxCDFDjKs3iy2oT9Rp063A= 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=HgKSEEQ5IA8zrLmJQ3K/k7s0GrUwLuKe/fLokXDAc20=; b=SgHynWLv0U1YO79eFMV+LDsdWDrh0C2jZ4tl6uEgjm6v2MSlgFuoPINqDU/o49CNsu iww+Bf5kgbAUtsuW1CEODstgdjNIWhptoxku/+pDqh4Btp9WUQfKi1Pexn0oTmtwkx23 3rusWe0LJZl1iZOJvw/TycfXXXTZfnILz6ytYfJ/gnQW3rV2jjjW2SmFOKTzEUV0dffY 9fMe8C37/5/eGJfxdp4mjiyka+nCWjeQ+ZLQJo0lH4Y9R9PKjIii5V9rJudUY78eY5me WrUI+A0VQ3uctgvGAj8Aq6zuzKWMKiqEk/sj/HGB/PcZBJC2vZOdMY9wZ02PG99EKRO+ 0+ng== X-Gm-Message-State: ABuFfoiVFulRwMTYqZx4KedISfCPS7Mq6qdyS3Zjaf5EGIFl+UZvIdpg gVJ/SIv9Ay1GfUJ9lkXMz5MpGIv9o4p+PYIt0j+7dw== X-Received: by 2002:aca:c54f:: with SMTP id v76-v6mr4019147oif.276.1538703968224; Thu, 04 Oct 2018 18:46:08 -0700 (PDT) MIME-Version: 1.0 References: <20180926032455.224600-1-louiscollard@chromium.org> <20180926103521.GB4885@linux.intel.com> In-Reply-To: <20180926103521.GB4885@linux.intel.com> From: Louis Collard Date: Fri, 5 Oct 2018 09:45:57 +0800 Message-ID: Subject: Re: [PATCH] Allow hwrng to initialize crng. To: Jarkko Sakkinen Cc: linux-integrity@vger.kernel.org, Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Andrey Pronin , Jason Gunthorpe , "David R. Bild" , PrasannaKumar Muralidharan , Herbert Xu , Michael Buesch , Arvind Yadav , Gary R Hook Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 26, 2018 at 6:35 PM Jarkko Sakkinen wrote: > > On Wed, Sep 26, 2018 at 11:24:55AM +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/ > > > > Signed-off-by: Louis Collard > > Acked-by: Jarkko Sakkinen > > /Jarkko Thanks! Adding a few people I think I should have included previously - I'm new to this process so apologies for any missteps; please let me know if there is anything else I can / should be doing!