svn commit: r284959 - in head: . share/man/man4 share/man/man9 sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/dev/syscons sys/dev/ubsec sys/dev/virtio/random sy...

K. Macy kmacy at freebsd.org
Thu Jul 16 23:14:54 UTC 2015


On Thu, Jul 16, 2015 at 3:28 PM, K. Macy <kmacy at freebsd.org> wrote:
> I discovered this when I MFC'd and my kernel wouldn't link because of
> unresolved symbols. I thought I had put the issue aside when I added
> RANDOM_DUMMY to my kernel config.
>
> However, I just hit this:
>
>         while (!random_alg_context.ra_seeded()) {
>                 if (nonblock) {
>                         error = EWOULDBLOCK;
>                         break;
>                 }
>                 tsleep(&random_alg_context, 0, "randseed", hz/10);
>                 /* keep tapping away at the pre-read until we seed/unblock. */
>                 random_alg_context.ra_pre_read();
>                 printf("random: %s unblock wait\n", __func__);
>         }
>
> My system wouldn't boot because this was endlessly spamming the
> console. I don't know what the right default here is. But I can say
> that this is not it.


I've also realized that a process blocked here is uninterruptible.
Hence any process reading an insufficiently seeded /dev/random is
unkillable. For example my boot can't proceed past dd doing a read and
I can't ^C it. Did you test RANDOM_DUMMY?


-K


More information about the svn-src-head mailing list