linux-um archives
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] [PATCH 4/4] UML - Use get_random_bytes after random pool is seeded
Date: Mon, 04 Dec 2006 18:12:23 -0500	[thread overview]
Message-ID: <200612042312.kB4NCNiN024571@ccure.user-mode-linux.org> (raw)

When the UML network driver generates random MACs for its devices, it was
possible for a number of UMLs to get the same MACs because the ethernet 
initialization was done before the random pool was properly seeded.

This patch moves the initialization later so that it gets better randomness.

Signed-off-by: Jeff Dike <jdike@addtoit.com>

Index: linux-2.6.18-mm/arch/um/drivers/daemon_kern.c
===================================================================
--- linux-2.6.18-mm.orig/arch/um/drivers/daemon_kern.c	2006-11-24 14:29:57.000000000 -0500
+++ linux-2.6.18-mm/arch/um/drivers/daemon_kern.c	2006-12-04 12:08:52.000000000 -0500
@@ -98,4 +98,4 @@ static int register_daemon(void)
 	return 0;
 }
 
-__initcall(register_daemon);
+late_initcall(register_daemon);
Index: linux-2.6.18-mm/arch/um/drivers/mcast_kern.c
===================================================================
--- linux-2.6.18-mm.orig/arch/um/drivers/mcast_kern.c	2006-11-24 14:29:57.000000000 -0500
+++ linux-2.6.18-mm/arch/um/drivers/mcast_kern.c	2006-12-04 12:08:52.000000000 -0500
@@ -127,4 +127,4 @@ static int register_mcast(void)
 	return 0;
 }
 
-__initcall(register_mcast);
+late_initcall(register_mcast);
Index: linux-2.6.18-mm/arch/um/drivers/pcap_kern.c
===================================================================
--- linux-2.6.18-mm.orig/arch/um/drivers/pcap_kern.c	2006-11-24 14:29:57.000000000 -0500
+++ linux-2.6.18-mm/arch/um/drivers/pcap_kern.c	2006-12-04 12:08:52.000000000 -0500
@@ -109,4 +109,4 @@ static int register_pcap(void)
 	return 0;
 }
 
-__initcall(register_pcap);
+late_initcall(register_pcap);
Index: linux-2.6.18-mm/arch/um/drivers/slip_kern.c
===================================================================
--- linux-2.6.18-mm.orig/arch/um/drivers/slip_kern.c	2006-11-27 18:55:16.000000000 -0500
+++ linux-2.6.18-mm/arch/um/drivers/slip_kern.c	2006-12-04 12:08:52.000000000 -0500
@@ -95,4 +95,4 @@ static int register_slip(void)
 	return 0;
 }
 
-__initcall(register_slip);
+late_initcall(register_slip);
Index: linux-2.6.18-mm/arch/um/drivers/slirp_kern.c
===================================================================
--- linux-2.6.18-mm.orig/arch/um/drivers/slirp_kern.c	2006-11-27 18:55:16.000000000 -0500
+++ linux-2.6.18-mm/arch/um/drivers/slirp_kern.c	2006-12-04 12:08:52.000000000 -0500
@@ -119,4 +119,4 @@ static int register_slirp(void)
 	return 0;
 }
 
-__initcall(register_slirp);
+late_initcall(register_slirp);
Index: linux-2.6.18-mm/arch/um/os-Linux/drivers/ethertap_kern.c
===================================================================
--- linux-2.6.18-mm.orig/arch/um/os-Linux/drivers/ethertap_kern.c	2006-11-27 18:55:16.000000000 -0500
+++ linux-2.6.18-mm/arch/um/os-Linux/drivers/ethertap_kern.c	2006-12-04 12:08:52.000000000 -0500
@@ -105,4 +105,4 @@ static int register_ethertap(void)
 	return 0;
 }
 
-__initcall(register_ethertap);
+late_initcall(register_ethertap);
Index: linux-2.6.18-mm/arch/um/os-Linux/drivers/tuntap_kern.c
===================================================================
--- linux-2.6.18-mm.orig/arch/um/os-Linux/drivers/tuntap_kern.c	2006-11-27 18:55:16.000000000 -0500
+++ linux-2.6.18-mm/arch/um/os-Linux/drivers/tuntap_kern.c	2006-12-04 12:08:52.000000000 -0500
@@ -90,4 +90,4 @@ static int register_tuntap(void)
 	return 0;
 }
 
-__initcall(register_tuntap);
+late_initcall(register_tuntap);


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

                 reply	other threads:[~2006-12-04 23:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200612042312.kB4NCNiN024571@ccure.user-mode-linux.org \
    --to=jdike@addtoit.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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