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-sourcechan...@netbsd.org> > > 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