From: Torsten Duwe <duwe@lst.de>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: "H. Peter Anvin" <hpa@linux.intel.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: [RESEND][PATCH] Fix add_timer_randomness throttling
Date: Mon, 23 Feb 2015 11:45:27 +0100 [thread overview]
Message-ID: <20150223104527.GA23345@lst.de> (raw)
In-Reply-To: <20150204140029.GA2949@lst.de>
[now with "PATCH" tag]
It looks to me that commit a283b5c459784f97 has one replacement too much:
in add_timer_randomness, entropy_count is compared to trickle_thresh,
which are _both_ scaled up by ENTROPY_SHIFT. I'd therefore revert that hunk.
Signed-off-by: Torsten Duwe <duwe@suse.de>
@@ -674,7 +697,7 @@ static void add_timer_randomness(struct timer_rand_state *state, unsigned num)
preempt_disable();
/* if over the trickle threshold, use only 1 in 4096 samples */
- if (ENTROPY_BITS(&input_pool) > trickle_thresh &&
+ if (input_pool.entropy_count > trickle_thresh &&
((__this_cpu_inc_return(trickle_count) - 1) & 0xfff))
goto out;
prev parent reply other threads:[~2015-02-23 10:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-04 14:00 Fix add_timer_randomness throttling Torsten Duwe
2015-02-23 10:45 ` Torsten Duwe [this message]
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=20150223104527.GA23345@lst.de \
--to=duwe@lst.de \
--cc=hpa@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.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).