Re: [PATCH] [3/4] /dev/random: Use separate entropy store for/dev/urandom

From: Balint Marton
Date: Sat Aug 28 2004 - 05:36:51 EST


Hi,

After using this patch, an already resolved bug returned (Tested with
2.6.9-rc1-bk3). For the old bug, see this thread (get_random_bytes returns
the same on every boot):
http://marc.theaimsgroup.com/?l=linux-kernel&m=109053711812560&w=2

Now the situation is almost the same, except we read from the urandom pool
this time. The urandom pool is only cleared, and not initialized, and
because there is nothing in the primary pool, the reseeding is not
successful. The solution is also the same, initialize not just the primary
and secondary, but also the urandom pool:

--- linux-2.6.9-rc1-bk3/drivers/char/random.c.or 2004-08-28 10:12:28.000000000 +0200
+++ linux-2.6.9-rc1-bk3/drivers/char/random.c 2004-08-28 11:43:21.134293136 +0200
@@ -1548,6 +1548,7 @@
clear_entropy_store(urandom_state);
init_std_data(random_state);
init_std_data(sec_random_state);
+ init_std_data(urandom_state);
#ifdef CONFIG_SYSCTL
sysctl_init_random(random_state);
#endif

bye,
Cus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/