[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kernel/3711: arc4random in kernel init causes uninitialised use of timeout_add and panic w/ DIAGNOSTIC



I ported a driver from netbsd that did this; is there a more acceptable way
to obtain random() data in methods called from pci attach ?


regards,
 
Matthew Gream

London W2 4PS
+44 77 6969 0248
matthew.gream@pobox.com
http://matthewgream.net


-----Original Message-----
From: Ted Unangst [mailto:tedu@zeitbombe.org] 
Sent: 13 March 2004 19:39
To: Matthew
Cc: bugs@cvs.openbsd.org
Subject: Re: kernel/3711: arc4random in kernel init causes uninitialised use
of timeout_add and panic w/ DIAGNOSTIC

On Sat, 13 Mar 2004, Matthew wrote:

>         Using arc4random before randomattach, e.g. from a PCI attach,
results in arc4maybeinit being 
> 	called with arc4random_initialized not set, resulting in timeout_add
on uninitialised 
> 	arc4_timeout, which panics in DIAGNOSTIC. Found in 3.3, but still
present in HEAD.
> >How-To-Repeat:
>         choose good pci_attach and use arc4random from dev/rndvar.h &
dev/rnd.c
>         build DIAGNOSTIC kernel
>         reboot and get nice panic from kern_timeout.c:163.

why are you doing this?


--
desire is not an occupation