From accc9fe1cf3a1377b4b6d17c3f8c3b85fc4a735e Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 28 Dec 2013 03:12:56 +0000 Subject: [PATCH] We can initialize the srandom/random system earlier from arc4random, and do not need microtime. --- sys/kern/init_main.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index eb6415b145f..c26b9d4acef 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.193 2013/12/28 03:04:20 deraadt Exp $ */ +/* $OpenBSD: init_main.c,v 1.194 2013/12/28 03:12:56 deraadt Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -192,7 +192,6 @@ main(void *framep) struct proc *p; struct process *pr; struct pdevinit *pdev; - struct timeval rtv; quad_t lim; int s, i; extern struct pdevinit pdevinit[]; @@ -347,8 +346,6 @@ main(void *framep) workq_init(); taskq_init(); - random_start(); - /* Initialize the interface/address trees */ ifinit(); @@ -535,9 +532,6 @@ main(void *framep) if (kthread_create(uvm_aiodone_daemon, NULL, NULL, "aiodoned")) panic("fork aiodoned"); - microtime(&rtv); - srandom((u_int32_t)(rtv.tv_sec ^ rtv.tv_usec) ^ arc4random()); - #if defined(MULTIPROCESSOR) /* Boot the secondary processors. */ cpu_boot_secondary_processors(); -- 2.20.1