From: Karl Beldan <karl.beldan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Hannes Frederic Sowa
<hannes-tFNcAqjVMyqKXQKiL6tip0B+6BGkLq7r@public.gmane.org>
Cc: Theodore Ts'o <tytso-3s7WtUTddSA@public.gmane.org>,
Daniel Borkmann
<dborkman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
shemminger-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org,
fweimer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Eric Dumazet
<eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 01:37:09 +0100 [thread overview]
Message-ID: <20131112003709.GA11824@gobelin> (raw)
In-Reply-To: <20131112000307.GB14929-5j1vdhnGyZutBveJljeh2VPnkB77EeZ12LY78lusg7I@public.gmane.org>
On Tue, Nov 12, 2013 at 01:03:07AM +0100, Hannes Frederic Sowa wrote:
> On Mon, Nov 11, 2013 at 08:43:57AM -0500, Theodore Ts'o wrote:
> > On Mon, Nov 11, 2013 at 12:20:34PM +0100, Daniel Borkmann wrote:
> > > From: Hannes Frederic Sowa <hannes-tFNcAqjVMyqKXQKiL6tip0B+6BGkLq7r@public.gmane.org>
> > >
> > > The Tausworthe PRNG is initialized at late_initcall time. At that time the
> > > entropy pool serving get_random_bytes is not filled sufficiently. This
> > > patch adds an additional reseeding step as soon as the nonblocking pool
> > > gets marked as initialized.
> > >
> > > On some machines it might be possible that late_initcall gets called after
> > > the pool has been initialized. In this situation we won't reseed again.
> > >
> > > (A call to prandom_seed_late blocks later invocations of early reseed
> > > attempts.)
> > >
> > > Joint work with Daniel Borkmann.
> >
> > Acked-by: "Theodore Ts'o" <tytso-3s7WtUTddSA@public.gmane.org>
> >
> > I wasn't cc'ed on the full series (I didn't see the 0/3 or the 4/6
> > messages) but there are two other things that you might want to
> > consider.
> >
> > 1) I'm pretty sure, but it would be good to get netdev confirmation,
> > that the call to get_random_bytes() in
> > net/mac80211/rc80211_minstrel.c's init_sample_table() can be replaced
> > by calls to prandom_u32().
>
> Would make sense. I added wireless-devel to confirm.
>
> [...]
> [ 0.673260] random: rc80211_minstrel_ht_init+0x47/0xaa get_random_bytes called with 3 bits of entropy available
> [ 0.674024] random: rc80211_minstrel_ht_init+0x47/0xaa get_random_bytes called with 3 bits of entropy available
> [ 0.675012] random: rc80211_minstrel_ht_init+0x47/0xaa get_random_bytes called with 3 bits of entropy available
> [ 0.676032] random: rc80211_minstrel_ht_init+0x47/0xaa get_random_bytes called with 3 bits of entropy available
> [ 0.677020] random: rc80211_minstrel_ht_init+0x47/0xaa get_random_bytes called with 3 bits of entropy available
> [ 0.678011] random: rc80211_minstrel_ht_init+0x47/0xaa get_random_bytes called with 3 bits of entropy available
> [ 0.679011] random: rc80211_minstrel_ht_init+0x47/0xaa get_random_bytes called with 3 bits of entropy available
> [...]
>
> In total 80 calls to get_random_bytes.
>
It is already 8 times what rc80211_minstrel_ht_init uses.
If you could apply on top of:
http://marc.info/?l=linux-wireless&m=138392850030987&w=2
although Johannes has not yet agreed/applied this.
Karl
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-11-12 0:37 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-11 11:20 [PATCH net-next 0/6] prandom fixes/improvements Daniel Borkmann
2013-11-11 11:20 ` [PATCH net-next 1/6] random32: fix off-by-one in seeding requirement Daniel Borkmann
2013-11-11 11:20 ` [PATCH net-next 2/6] random32: add periodic reseeding Daniel Borkmann
2013-11-11 11:20 ` [PATCH net-next 3/6] random32: add prandom_reseed_late() and call when nonblocking pool becomes initialized Daniel Borkmann
2013-11-11 13:43 ` Theodore Ts'o
2013-11-12 0:03 ` Hannes Frederic Sowa
[not found] ` <20131112000307.GB14929-5j1vdhnGyZutBveJljeh2VPnkB77EeZ12LY78lusg7I@public.gmane.org>
2013-11-12 0:37 ` Karl Beldan [this message]
2013-11-12 8:36 ` Johannes Berg
[not found] ` <1384245375.14301.1.camel-8Nb76shvtaUJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2013-11-12 11:13 ` Karl Beldan
2013-11-12 13:09 ` Hannes Frederic Sowa
2013-11-12 11:53 ` Theodore Ts'o
2013-11-12 12:04 ` Johannes Berg
[not found] ` <20131112115350.GA14077-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
2013-11-12 13:16 ` Hannes Frederic Sowa
[not found] ` <20131112131627.GD14929-5j1vdhnGyZutBveJljeh2VPnkB77EeZ12LY78lusg7I@public.gmane.org>
2013-11-12 13:46 ` [PATCH] random: seed random_int_secret at least poorly at core_initcall time Hannes Frederic Sowa
[not found] ` <20131112134603.GE14929-5j1vdhnGyZutBveJljeh2VPnkB77EeZ12LY78lusg7I@public.gmane.org>
2013-11-14 2:54 ` Theodore Ts'o
2013-11-14 4:18 ` Hannes Frederic Sowa
[not found] ` <20131114041829.GA26901-5j1vdhnGyZutBveJljeh2VPnkB77EeZ12LY78lusg7I@public.gmane.org>
2013-11-14 5:05 ` Hannes Frederic Sowa
2013-11-15 18:42 ` Kees Cook
[not found] ` <CAGXu5jJJtjvAqROzsekOd9Y5wbiw=G9ToNryOfP8auhQRrYORw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-16 7:40 ` Hannes Frederic Sowa
[not found] ` <20131114025448.GB31602-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
2013-11-15 18:33 ` Kees Cook
[not found] ` <CAGXu5j+ySEdQBXKkspYC=svfekBja2Z_2tcWSAOEbvyiMLf=aA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-15 18:45 ` Dave Jones
2013-11-15 19:07 ` Kees Cook
2013-11-15 21:05 ` Theodore Ts'o
2013-11-11 11:20 ` [PATCH net-next 4/6] random32: move rnd_state to linux/random.h Daniel Borkmann
2013-11-11 11:20 ` [PATCH net-next 5/6] random32: upgrade taus88 generator to taus113 from errata paper Daniel Borkmann
2013-11-11 11:20 ` [PATCH net-next 6/6] random32: add test cases for taus113 implementation Daniel Borkmann
2013-11-11 19:33 ` [PATCH net-next 0/6] prandom fixes/improvements David Miller
2013-11-11 19:44 ` Hannes Frederic Sowa
2013-11-11 20:00 ` David Miller
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=20131112003709.GA11824@gobelin \
--to=karl.beldan-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=dborkman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=fweimer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=hannes-tFNcAqjVMyqKXQKiL6tip0B+6BGkLq7r@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=shemminger-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org \
--cc=tytso-3s7WtUTddSA@public.gmane.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).