From: "Theodore Ts'o" <tytso@mit.edu>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: "H. Peter Anvin" <hpa@linux.intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
greg@kroah.com, w@1wt.eu, ewust@umich.edu, zakir@umich.edu,
mpm@selenic.com, nadiah@cs.ucsd.edu, jhalderm@umich.edu,
tglx@linutronix.de, davem@davemloft.net, mingo@kernel.org,
DJ Johnston <dj.johnston@intel.com>,
stable@vger.kernel.org
Subject: Re: [PATCH RFC] random: Account for entropy loss due to overwrites
Date: Tue, 16 Oct 2012 00:08:48 -0400 [thread overview]
Message-ID: <20121016040848.GE17446@thunk.org> (raw)
In-Reply-To: <50675038.9000108@zytor.com>
On Sat, Sep 29, 2012 at 12:47:04PM -0700, H. Peter Anvin wrote:
> >-static struct poolinfo {
> >+static const struct poolinfo {
> >+ int poolshift; /* log2(POOLBITS) */
> > int poolwords;
> > int tap1, tap2, tap3, tap4, tap5;
Poolshift is duplicated information; it's just log2(poolwords) + 5
(since POOLBITS is poolwords*32).
Granted you don't want to recalculate it every single time you need to
use it, but perhaps it would be better to add poolshift to struct
entropy_store, and set it in init_std_data()?
- Ted
next prev parent reply other threads:[~2012-10-16 4:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-13 17:26 [PATCH RFC] random: Account for entropy loss due to overwrites H. Peter Anvin
2012-08-15 19:30 ` Matt Mackall
2012-08-15 20:37 ` H. Peter Anvin
2012-09-29 19:47 ` H. Peter Anvin
2012-10-16 4:08 ` Theodore Ts'o [this message]
2012-10-16 4:45 ` H. Peter Anvin
2012-10-16 15:53 ` Theodore Ts'o
2012-10-16 16:10 ` H. Peter Anvin
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=20121016040848.GE17446@thunk.org \
--to=tytso@mit.edu \
--cc=davem@davemloft.net \
--cc=dj.johnston@intel.com \
--cc=ewust@umich.edu \
--cc=greg@kroah.com \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jhalderm@umich.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mpm@selenic.com \
--cc=nadiah@cs.ucsd.edu \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=w@1wt.eu \
--cc=zakir@umich.edu \
/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).