[PATCH] Add example to rand.3

Cristian Rodríguez crrodriguez@opensuse.org
Wed Dec 28 21:04:38 GMT 2022


On Wed, Dec 28, 2022 at 5:57 PM Alejandro Colomar via Libc-alpha
<libc-alpha@sourceware.org> wrote:

> Ahh, I didn't connect the dots the other day!  We don't need to wait for glibc.
> libbsd already provides arc4random on GNU/Linux systems, so I can already
> recommend using arc4random to seed srand(3).
>
> I'll prepare a patch...
>

I would suggest avoiding that, as it suffers from all the problems
previously discussed on this list , on the relevant arc4random thread

tl;dr , it can't be safe without kernel support, as you need to know
when to drop the buffer. (on fork, on resume plus on $deity knows
condition for which there is no kernel notification about)


More information about the Libc-alpha mailing list