linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Daniel Borkmann <dborkman@redhat.com>,
	davem@davemloft.net, shemminger@networkplumber.org,
	fweimer@redhat.com, netdev@vger.kernel.org,
	Eric Dumazet <eric.dumazet@gmail.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH net-next 3/6] random32: add prandom_reseed_late() and call when nonblocking pool becomes initialized
Date: Tue, 12 Nov 2013 06:53:50 -0500	[thread overview]
Message-ID: <20131112115350.GA14077@thunk.org> (raw)
In-Reply-To: <20131112000307.GB14929@order.stressinduktion.org>

On Tue, Nov 12, 2013 at 01:03:07AM +0100, Hannes Frederic Sowa wrote:
>
> We are much too early to enumerate hardware, so it would be hard to
> integrate something like mac addresses etc.

Stupid question --- is there a reason why the minstrel code is
initialized so early when it is compiled into the kernel?  Can we
change it so it gets initialized later, after the devices are
initialized and we get the mac addresses?  

> Btw. do you see problems regarding get_random_int on architectures without
> hardware offloading?
> 
> We are initializing random_int_secret really late (after all the init
> calls) and I wonder if we should also use a two stage initialization
> there, so we have a more unpredictable MD5 hash at early boot.

Most of the users of get_random_int(), at least to date, have been for
things like ASLR.  A quick audit shows only one device driver user
that might be impacted: drivers/net/wireless/cw1200/wsm.c.

It's not a bad idea to do a two stage init just in case
get_random_int() gets used by other code --- although that brings up
something that I know is really needed, but which I haven't had time
to try to address yet: we really need to document all of the various
interfaces that various kernel routines can use to get random numbers,
and document what their performance and security characteristics are.
We have probably have a lot of code where the authors didn't realize
that some other interface would be a better match for their needs, or
the code is old enough that predates some of the newer interfaces.

    	    	       	    	     - Ted

  parent reply	other threads:[~2013-11-12 11:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1384160397.git.dborkman@redhat.com>
     [not found] ` <2ea03f60bb65429cbe5d74a6d356fde3eefcf06c.1384160397.git.dborkman@redhat.com>
     [not found]   ` <20131111134357.GC10104@thunk.org>
2013-11-12  0:03     ` [PATCH net-next 3/6] random32: add prandom_reseed_late() and call when nonblocking pool becomes initialized Hannes Frederic Sowa
2013-11-12  0:37       ` Karl Beldan
2013-11-12  8:36         ` Johannes Berg
2013-11-12 11:13           ` Karl Beldan
2013-11-12 13:09             ` Hannes Frederic Sowa
2013-11-12 11:53       ` Theodore Ts'o [this message]
2013-11-12 12:04         ` Johannes Berg
2013-11-12 13:16         ` Hannes Frederic Sowa
2013-11-12 13:46           ` [PATCH] random: seed random_int_secret at least poorly at core_initcall time Hannes Frederic Sowa
2013-11-14  2:54             ` Theodore Ts'o
2013-11-14  4:18               ` Hannes Frederic Sowa
2013-11-14  5:05                 ` Hannes Frederic Sowa
2013-11-15 18:42                 ` Kees Cook
2013-11-16  7:40                   ` Hannes Frederic Sowa
2013-11-15 18:33               ` Kees Cook
2013-11-15 18:45                 ` Dave Jones
2013-11-15 19:07                   ` Kees Cook
2013-11-15 21:05                 ` Theodore Ts'o

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=20131112115350.GA14077@thunk.org \
    --to=tytso@mit.edu \
    --cc=davem@davemloft.net \
    --cc=dborkman@redhat.com \
    --cc=eric.dumazet@gmail.com \
    --cc=fweimer@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@networkplumber.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).