Source-Changes-D archive

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

Re: CVS commit: src/lib/libc



On Mon, Jun 23, 2014 at 07:46:15PM +0000, Taylor R Campbell wrote:
>    Date: Mon, 23 Jun 2014 17:42:24 +0000
>    From: David Holland <dholland-sourcechanges%netbsd.org@localhost>
> 
>    On Mon, Jun 23, 2014 at 02:14:10PM +0000, Taylor R Campbell wrote:
>     > Add `remove arc4random' to mythical libc major bump todo list.
> 
>    I'm not saying I disagree, but what's new code supposed to use
>    instead? (And can a reference to this be stuffed into the man page?)
> 
> Read from /dev/urandom.  It scales better in multithreaded programs,
> avoids fork issues (hanging, duplicate key streams, disclosure of
> parents' secrets in unprivileged children), and works on ~any Unix,
> not just on OpenBSD and whoever else parroted arc4random.

Eh, no. That's a lot worse. The system call overhead alone is orders of
magnitnude slower rthan any locking will ever be. That's completely
ignoring the need for a file descriptor or /dev.

Joerg


Home | Main Index | Thread Index | Old Index