lkml.org 
[lkml]   [2013]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: /dev/random changes for 3.13
From
On Wed, Nov 13, 2013 at 10:52 PM, Theodore Ts'o <tytso@mit.edu> wrote:
>
> There will be a merge conflict thanks to changes from the net tree.
> Here is the proposed resolution:

Ok, I finally got around to the random tree, but your proposed merge
resolution makes no sense, so I didn't end up applying it.

> - - r->entropy_total += nbits;
> if (!r->initialized && nbits > 0) {
> + r->entropy_total += nbits;

This part undoes your commit 6265e169cd31 ("random: push extra entropy
to the output pools"), and the "entropy_total" field will now never be
non-zero when "r->initialized" is set. So then the rest of your
commit, which looks like this:

+ /* If the input pool is getting full, send some
+ * entropy to the two output pools, flipping back and
+ * forth between them, until the output pools are 75%
+ * full.
+ */
+ if (entropy_bytes > random_write_wakeup_thresh &&
+ r->initialized &&
+ r->entropy_total >= 2*random_read_wakeup_thresh) {
+ static struct entropy_store *last = &blocking_pool;
+ struct entropy_store *other = &blocking_pool;

can never trigger (because "r->initialized && r->entropy_total >=
2*random_read_wakeup_thresh" is never true).

So your merge resolution diff makes no sense to me.

That said, the networking change seems to be simpler and largely
equivalent to that commit, so maybe you meant to basically castrate
that commit 6265e169cd31? Or maybe the diff you posted was incomplete
and just doesn't show the undone part (because "git diff --cc" will
not show parts that match the other branch).

So I think the correct resolution is to basically take the code that
the networking tree added, and undo the "If the input pool is getting
full.." part of commit 6265e169cd31.

Hmm?

Just verifying that we're on the same page before merging this..

Linus


\
 
 \ /
  Last update: 2013-11-15 23:41    [W:0.216 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site