All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Grant Likely <grant.likely@linaro.org>,
	Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	Jason Cooper <jason@lakedaemon.net>,
	devicetree@vger.kernel.org, Laura Abbott <lauraa@codeaurora.org>,
	keescook@chromium.org, linux-kernel@vger.kernel.org,
	Rob Herring <robh+dt@kernel.org>,
	Kumar Gala <galak@codeaurora.org>
Subject: Re: [RFC/PATCH 0/3] Add devicetree scanning for randomness
Date: Mon, 17 Feb 2014 17:13:07 +0100	[thread overview]
Message-ID: <1418981.0py7JxXCp8@wuerfel> (raw)
In-Reply-To: <20140217155419.682F7C401D4@trevor.secretlab.ca>

On Monday 17 February 2014 15:54:19 Grant Likely wrote:
> On Wed, 12 Feb 2014 11:20:00 -0700, Jason Gunthorpe <jgunthorpe@obsidianresearch.com> 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.
> 
> I applied a patch that did exactly that (109b623629), and then reverted
> it (b920ecc82) shortly thereafter because add_device_randomness() is
> a rather slow function and FDTs can get large. I'd like to see someone
> do a reasonable analysis on the cost of using an FDT for randomness
> before I reapply a patch doing something similar. An awful lot of the
> FDT data is not very random, but there are certainly portions of it that
> are appropriate for the random pool.

Could we use a faster hash function that scans the entire device tree and
then just feed the output of that into add_device_randomness? We probably
can't expect that there is a lot of entropy in the DT blob, so the
result wouldn't be all that different in terms of quality of the random
seed.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: devicetree@vger.kernel.org, Laura Abbott <lauraa@codeaurora.org>,
	Jason Cooper <jason@lakedaemon.net>,
	linux-kernel@vger.kernel.org,
	Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	Rob Herring <robh+dt@kernel.org>,
	Kumar Gala <galak@codeaurora.org>,
	Grant Likely <grant.likely@linaro.org>,
	keescook@chromium.org
Subject: Re: [RFC/PATCH 0/3] Add devicetree scanning for randomness
Date: Mon, 17 Feb 2014 17:13:07 +0100	[thread overview]
Message-ID: <1418981.0py7JxXCp8@wuerfel> (raw)
In-Reply-To: <20140217155419.682F7C401D4@trevor.secretlab.ca>

On Monday 17 February 2014 15:54:19 Grant Likely wrote:
> On Wed, 12 Feb 2014 11:20:00 -0700, Jason Gunthorpe <jgunthorpe@obsidianresearch.com> 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.
> 
> I applied a patch that did exactly that (109b623629), and then reverted
> it (b920ecc82) shortly thereafter because add_device_randomness() is
> a rather slow function and FDTs can get large. I'd like to see someone
> do a reasonable analysis on the cost of using an FDT for randomness
> before I reapply a patch doing something similar. An awful lot of the
> FDT data is not very random, but there are certainly portions of it that
> are appropriate for the random pool.

Could we use a faster hash function that scans the entire device tree and
then just feed the output of that into add_device_randomness? We probably
can't expect that there is a lot of entropy in the DT blob, so the
result wouldn't be all that different in terms of quality of the random
seed.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC/PATCH 0/3] Add devicetree scanning for randomness
Date: Mon, 17 Feb 2014 17:13:07 +0100	[thread overview]
Message-ID: <1418981.0py7JxXCp8@wuerfel> (raw)
In-Reply-To: <20140217155419.682F7C401D4@trevor.secretlab.ca>

On Monday 17 February 2014 15:54:19 Grant Likely wrote:
> On Wed, 12 Feb 2014 11:20:00 -0700, Jason Gunthorpe <jgunthorpe@obsidianresearch.com> 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.
> 
> I applied a patch that did exactly that (109b623629), and then reverted
> it (b920ecc82) shortly thereafter because add_device_randomness() is
> a rather slow function and FDTs can get large. I'd like to see someone
> do a reasonable analysis on the cost of using an FDT for randomness
> before I reapply a patch doing something similar. An awful lot of the
> FDT data is not very random, but there are certainly portions of it that
> are appropriate for the random pool.

Could we use a faster hash function that scans the entire device tree and
then just feed the output of that into add_device_randomness? We probably
can't expect that there is a lot of entropy in the DT blob, so the
result wouldn't be all that different in terms of quality of the random
seed.

	Arnd

  reply	other threads:[~2014-02-17 16:13 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12  1:33 [RFC/PATCH 0/3] Add devicetree scanning for randomness Laura Abbott
2014-02-12  1:33 ` Laura Abbott
     [not found] ` < 201402121251.06280.arnd@arndb.de>
2014-02-12  1:33 ` [RFC/PATCH 1/3] of: Add early randomness hooks Laura Abbott
2014-02-12  1:33   ` Laura Abbott
2014-02-12 16:47   ` Grant Likely
2014-02-12 16:47     ` Grant Likely
2014-02-12 16:47     ` Grant Likely
2014-02-12  1:33 ` [RFC/PATCH 2/3] arm: Add ARCH_WANT_OF_RANDOMNESS Laura Abbott
2014-02-12  1:33   ` Laura Abbott
2014-02-12 16:49   ` Grant Likely
2014-02-12 16:49     ` Grant Likely
2014-02-12 16:49     ` Grant Likely
2014-02-13  0:54     ` Laura Abbott
2014-02-13  0:54       ` Laura Abbott
2014-02-13  0:54       ` Laura Abbott
2014-02-12  1:33 ` [RFC/PATCH 3/3] init: Move stack canary initialization after setup_arch Laura Abbott
2014-02-12  1:33   ` Laura Abbott
2014-02-12 11:51 ` [RFC/PATCH 0/3] Add devicetree scanning for randomness Arnd Bergmann
2014-02-12 11:51   ` Arnd Bergmann
2014-02-12 11:51   ` Arnd Bergmann
2014-02-12 17:45   ` Jason Cooper
2014-02-12 17:45     ` Jason Cooper
2014-02-12 17:45     ` Jason Cooper
2014-02-12 18:13     ` Olof Johansson
2014-02-12 18:13       ` Olof Johansson
2014-02-12 18:13       ` Olof Johansson
2014-02-12 18:32       ` Jason Cooper
2014-02-12 18:32         ` Jason Cooper
2014-02-12 18:32         ` Jason Cooper
2014-02-12 18:17     ` Arnd Bergmann
2014-02-12 18:17       ` Arnd Bergmann
2014-02-12 18:17       ` Arnd Bergmann
2014-02-12 18:45       ` Jason Cooper
2014-02-12 18:45         ` Jason Cooper
2014-02-12 18:45         ` Jason Cooper
2014-02-12 19:12         ` Arnd Bergmann
2014-02-12 19:12           ` Arnd Bergmann
2014-02-12 19:43           ` Jason Cooper
2014-02-12 19:43             ` Jason Cooper
2014-02-12 23:55           ` Rob Herring
2014-02-12 23:55             ` Rob Herring
2014-02-12 23:55             ` Rob Herring
2014-02-12 18:20     ` Jason Gunthorpe
2014-02-12 18:20       ` Jason Gunthorpe
2014-02-12 18:20       ` Jason Gunthorpe
2014-02-12 18:51       ` Jason Cooper
2014-02-12 18:51         ` Jason Cooper
2014-02-12 18:51         ` Jason Cooper
2014-02-17 15:54       ` Grant Likely
2014-02-17 15:54         ` Grant Likely
2014-02-17 16:13         ` Arnd Bergmann [this message]
2014-02-17 16:13           ` Arnd Bergmann
2014-02-17 16:13           ` Arnd Bergmann
2014-02-17 18:23           ` Jason Cooper
2014-02-17 18:23             ` Jason Cooper
2014-02-17 21:07             ` Geert Uytterhoeven
2014-02-17 21:07               ` Geert Uytterhoeven
2014-02-17 21:07               ` Geert Uytterhoeven
2014-02-18 17:56               ` Jason Cooper
2014-02-18 17:56                 ` Jason Cooper
2014-02-18 17:56                 ` Jason Cooper
2014-02-18  9:39           ` Grant Likely
2014-02-18  9:39             ` Grant Likely
2014-02-18  9:39             ` Grant Likely
2014-02-18 18:19         ` Jason Gunthorpe
2014-02-18 18:19           ` Jason Gunthorpe
2014-02-12 21:35     ` Kees Cook
2014-02-12 21:35       ` Kees Cook
2014-02-12 21:35       ` Kees Cook
2014-02-13  0:06   ` Laura Abbott
2014-02-13  0:06     ` Laura Abbott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1418981.0py7JxXCp8@wuerfel \
    --to=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=jason@lakedaemon.net \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=keescook@chromium.org \
    --cc=lauraa@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.