prng change feedback

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

ringsignature at riseup.net ringsignature at riseup.net
Sat Oct 7 08:49:35 UTC 2017


On 2017-10-06 16:57, Max wrote:
> GRND_RANDOM let us select randomness source.
> GRND_NONBLOCK let us control blocking behavior.

After rereading the relevant documentation, I realize that I
misunderstood one critical point regarding GRND_NONBLOCK. The critical
difference is that GRND_NONBLOCK controls not only blocking behavior, it
also ensures that in the case of the system not being properly seeded,
it fails closed by immediately returning -1 without outputting any
random bytes. I apologize for completely missing this detail.

It is of course the case that you are correct and if blocking is a
problem, it is logical to set GRND_NONBLOCK and to handle the error
case, especially by terminating. That is indeed a critical error and
there should be no output.

Happy Hacking,
RS



More information about the OpenBSC mailing list