From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932536AbcHIQ5T (ORCPT ); Tue, 9 Aug 2016 12:57:19 -0400 Received: from pmta2.delivery5.ore.mailhop.org ([54.186.218.12]:63063 "EHLO pmta2.delivery5.ore.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752586AbcHIQ5Q (ORCPT ); Tue, 9 Aug 2016 12:57:16 -0400 X-MHO-User: 83e4bbbc-5e52-11e6-8929-8ded99d5e9d7 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 74.99.77.15 X-Mail-Handler: DuoCircle Outbound SMTP X-DKIM: OpenDKIM Filter v2.6.8 io EA1E68006F Date: Tue, 9 Aug 2016 16:57:10 +0000 From: Jason Cooper To: Herbert Xu Cc: Keith Packard , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] hwrng: core - Allow for multiple simultaneous active hwrng devices Message-ID: <20160809165710.GC2013@io.lakedaemon.net> References: <1469477255-26824-1-git-send-email-keithp@keithp.com> <20160809095058.GA6618@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160809095058.GA6618@gondor.apana.org.au> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Keith, Herbert, On Tue, Aug 09, 2016 at 05:50:58PM +0800, Herbert Xu wrote: > On Mon, Jul 25, 2016 at 01:07:35PM -0700, Keith Packard wrote: > > Instead of having only one hwrng feeding /dev/random at a time, maintain > > a list of devices and cycle between them when filling the entropy pool. > > > > Signed-off-by: Keith Packard > > So you're cycling RNGs even for user-space reads? That could be > problematic because not all hardware RNGs carry the maximum amount > of entropy. It would be rather annoying to be cycling between > RNGs of different qualities. > > Perhaps only cycle for the kernel hwrngd? Perhaps a /dev/hwrng[0-9] per rng? That would lend itself nicely to a sysfs interface for per device quality, rate, and enabled attributes. e.g. /sys/class/hw_random/hwrng0/{device/,quality,rate,enabled} /dev/hwrng could pull from the one with the highest quality, or user specified for backwards compatibility. thx, Jason.