This is a note to let you know that I've just added the patch titled

    random: Add comment to random_initialize()

to the 3.4-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     random-add-comment-to-random_initialize.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From cbc96b7594b5691d61eba2db8b2ea723645be9ca Mon Sep 17 00:00:00 2001
From: Tony Luck <[email protected]>
Date: Mon, 23 Jul 2012 09:47:57 -0700
Subject: random: Add comment to random_initialize()

From: Tony Luck <[email protected]>

commit cbc96b7594b5691d61eba2db8b2ea723645be9ca upstream.

Many platforms have per-machine instance data (serial numbers,
asset tags, etc.) squirreled away in areas that are accessed
during early system bringup. Mixing this data into the random
pools has a very high value in providing better random data,
so we should allow (and even encourage) architecture code to
call add_device_randomness() from the setup_arch() paths.

However, this limits our options for internal structure of
the random driver since random_initialize() is not called
until long after setup_arch().

Add a big fat comment to rand_initialize() spelling out
this requirement.

Suggested-by: Theodore Ts'o <[email protected]>
Signed-off-by: Tony Luck <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/char/random.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1087,6 +1087,16 @@ static void init_std_data(struct entropy
        mix_pool_bytes(r, utsname(), sizeof(*(utsname())), NULL);
 }
 
+/*
+ * Note that setup_arch() may call add_device_randomness()
+ * long before we get here. This allows seeding of the pools
+ * with some platform dependent data very early in the boot
+ * process. But it limits our options here. We must use
+ * statically allocated structures that already have all
+ * initializations complete at compile time. We should also
+ * take care not to overwrite the precious per platform data
+ * we were given.
+ */
 static int rand_initialize(void)
 {
        init_std_data(&input_pool);


Patches currently in stable-queue which might be from [email protected] are

queue-3.4/random-add-comment-to-random_initialize.patch
queue-3.4/dmi-feed-dmi-table-to-dev-random-driver.patch
queue-3.4/redefine-atomic_init-and-atomic64_init-to-drop-the-casts.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to