From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753955AbaBLSwO (ORCPT ); Wed, 12 Feb 2014 13:52:14 -0500 Received: from mho-03-ewr.mailhop.org ([204.13.248.66]:18738 "EHLO mho-01-ewr.mailhop.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753216AbaBLSwL (ORCPT ); Wed, 12 Feb 2014 13:52:11 -0500 X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 108.39.110.144 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19z+qI5kPu/tjxTSoGoxNmlwddCe8CTarw= X-DKIM: OpenDKIM Filter v2.0.1 titan 3981B525D7F Date: Wed, 12 Feb 2014 13:51:56 -0500 From: Jason Cooper To: Jason Gunthorpe Cc: devicetree@vger.kernel.org, Laura Abbott , keescook@chromium.org, Arnd Bergmann , linux-kernel@vger.kernel.org, Rob Herring , Kumar Gala , Grant Likely , linux-arm-kernel@lists.infradead.org Subject: Re: [RFC/PATCH 0/3] Add devicetree scanning for randomness Message-ID: <20140212185156.GP27395@titan.lakedaemon.net> References: <1392168805-14200-1-git-send-email-lauraa@codeaurora.org> <201402121251.06280.arnd@arndb.de> <20140212174554.GM27395@titan.lakedaemon.net> <20140212182000.GJ5554@obsidianresearch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140212182000.GJ5554@obsidianresearch.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 12, 2014 at 11:20:00AM -0700, Jason Gunthorpe wrote: > On Wed, Feb 12, 2014 at 12:45:54PM -0500, Jason Cooper wrote: > > > The bootloader would then load this file into ram, and pass the > > address/size to the kernel either via dt, or commandline. kaslr (run in > > the decompressor) would consume some of this randomness, and then > > random.c would consume the rest in a non-crediting initialization. > > Sure is a neat idea, but I think in general it would probably be smart > to include the entire FDT blob in the early random pool, that way you > get MACs and other machine unique data too. Sure. > From there it is a small step to encourage bootloaders to include > boot-time-variable data in the DT like like 'boot time of day', 'cycle > counter', 'random blob', etc. I like it. > Then you just need the bootloader to dump the random-seed file into a > DT property. Yes, see my response to Arnd re the binding. I'm also interested in making it easier for devices already in the field. iow, without upgrading the bootloader. > Or have the bootloader fetch randomness from any HWRNG it has a driver > for. (eg a TPM) Depends on who you're protecting against. I'd prefer to have that called out as a separate blob in the DT so the kernel could decide whether to trust it explicitly, or mix it like random.c already does with RDRAND. thx, Jason. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Cooper Subject: Re: [RFC/PATCH 0/3] Add devicetree scanning for randomness Date: Wed, 12 Feb 2014 13:51:56 -0500 Message-ID: <20140212185156.GP27395@titan.lakedaemon.net> References: <1392168805-14200-1-git-send-email-lauraa@codeaurora.org> <201402121251.06280.arnd@arndb.de> <20140212174554.GM27395@titan.lakedaemon.net> <20140212182000.GJ5554@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20140212182000.GJ5554-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jason Gunthorpe Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Laura Abbott , keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org, Arnd Bergmann , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring , Kumar Gala , Grant Likely , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: devicetree@vger.kernel.org On Wed, Feb 12, 2014 at 11:20:00AM -0700, Jason Gunthorpe wrote: > On Wed, Feb 12, 2014 at 12:45:54PM -0500, Jason Cooper wrote: > > > The bootloader would then load this file into ram, and pass the > > address/size to the kernel either via dt, or commandline. kaslr (run in > > the decompressor) would consume some of this randomness, and then > > random.c would consume the rest in a non-crediting initialization. > > Sure is a neat idea, but I think in general it would probably be smart > to include the entire FDT blob in the early random pool, that way you > get MACs and other machine unique data too. Sure. > From there it is a small step to encourage bootloaders to include > boot-time-variable data in the DT like like 'boot time of day', 'cycle > counter', 'random blob', etc. I like it. > Then you just need the bootloader to dump the random-seed file into a > DT property. Yes, see my response to Arnd re the binding. I'm also interested in making it easier for devices already in the field. iow, without upgrading the bootloader. > Or have the bootloader fetch randomness from any HWRNG it has a driver > for. (eg a TPM) Depends on who you're protecting against. I'd prefer to have that called out as a separate blob in the DT so the kernel could decide whether to trust it explicitly, or mix it like random.c already does with RDRAND. thx, Jason. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: jason@lakedaemon.net (Jason Cooper) Date: Wed, 12 Feb 2014 13:51:56 -0500 Subject: [RFC/PATCH 0/3] Add devicetree scanning for randomness In-Reply-To: <20140212182000.GJ5554@obsidianresearch.com> References: <1392168805-14200-1-git-send-email-lauraa@codeaurora.org> <201402121251.06280.arnd@arndb.de> <20140212174554.GM27395@titan.lakedaemon.net> <20140212182000.GJ5554@obsidianresearch.com> Message-ID: <20140212185156.GP27395@titan.lakedaemon.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Feb 12, 2014 at 11:20:00AM -0700, Jason Gunthorpe wrote: > On Wed, Feb 12, 2014 at 12:45:54PM -0500, Jason Cooper wrote: > > > The bootloader would then load this file into ram, and pass the > > address/size to the kernel either via dt, or commandline. kaslr (run in > > the decompressor) would consume some of this randomness, and then > > random.c would consume the rest in a non-crediting initialization. > > Sure is a neat idea, but I think in general it would probably be smart > to include the entire FDT blob in the early random pool, that way you > get MACs and other machine unique data too. Sure. > From there it is a small step to encourage bootloaders to include > boot-time-variable data in the DT like like 'boot time of day', 'cycle > counter', 'random blob', etc. I like it. > Then you just need the bootloader to dump the random-seed file into a > DT property. Yes, see my response to Arnd re the binding. I'm also interested in making it easier for devices already in the field. iow, without upgrading the bootloader. > Or have the bootloader fetch randomness from any HWRNG it has a driver > for. (eg a TPM) Depends on who you're protecting against. I'd prefer to have that called out as a separate blob in the DT so the kernel could decide whether to trust it explicitly, or mix it like random.c already does with RDRAND. thx, Jason.