Re: [Mesa-dev] [PATCH V2 2/3] util/rand_xor: add function to seed rand

2017-03-22 Thread Nicolai Hähnle
On 22.03.2017 00:59, Timothy Arceri wrote: V2: pass the seed to the seed function so that we can isolate its uses. Stop leaking fd when urandom couldn't be read. --- src/gallium/drivers/radeon/r600_test_dma.c | 3 +- src/util/rand_xor.c| 57 ++

Re: [Mesa-dev] [PATCH V2 2/3] util/rand_xor: add function to seed rand

2017-03-22 Thread Nicolai Hähnle
On 22.03.2017 05:52, Jonathan Gray wrote: If a proper PRNG like arc4random backed by a syscall like getentropy were used this would already handle reseeding on fork and fd exhaustion. And look people have already gone out of their way to provide fallbacks for these interfaces. https://github.co

Re: [Mesa-dev] [PATCH V2 2/3] util/rand_xor: add function to seed rand

2017-03-21 Thread Jonathan Gray
If a proper PRNG like arc4random backed by a syscall like getentropy were used this would already handle reseeding on fork and fd exhaustion. And look people have already gone out of their way to provide fallbacks for these interfaces. https://github.com/libressl-portable/openbsd/tree/master/src/

[Mesa-dev] [PATCH V2 2/3] util/rand_xor: add function to seed rand

2017-03-21 Thread Timothy Arceri
V2: pass the seed to the seed function so that we can isolate its uses. Stop leaking fd when urandom couldn't be read. --- src/gallium/drivers/radeon/r600_test_dma.c | 3 +- src/util/rand_xor.c| 57 ++ src/util/rand_xor.h