On Thu, Jul 05, 2012 at 11:39:02PM +0200, Pawel Jakub Dawidek wrote:
> > sysctls are not all Giant locked.   KERN_ARND is marked MPSAFE, so it does 
> > not 
> > use Giant:
> 
> It doesn't really matter. Our in-kernel random generator has its own
> giant lock, so is basically single threaded. Compare results of those
> two on some SMP machine:
> 
>       # dd if=/dev/random of=/dev/null bs=1m count=1024
> 
>       # sh -c 'for i in `jot $(sysctl -n hw.ncpu)`; do dd if=/dev/random 
> of=/dev/null bs=1m count=128 & done'

It doesn't really matter for KERN_ARND because it is rarely reseeded and 
consume most of its time on internal arc4 permutations. That is why strong 
KERN_ARND seeding after boot is required (currently it is very weak and 
easily guessed as I already mention) - started right after boot 
applications all suffers from weak seeding up to the next rare KERN_ARND 
and arc4random() both reseeds..

-- 
http://ache.vniz.net/

Attachment: pgpSJkSo7cdy5.pgp
Description: PGP signature

Reply via email to