Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.devel.release > #79892

Re: Fixing Linux getrandom() in stable

From Russ Allbery <rra@debian.org>
Newsgroups linux.debian.devel.release, linux.debian.kernel
Subject Re: Fixing Linux getrandom() in stable
Date 2018-05-10 19:50 +0200
Message-ID <vNXRv-39Z-5@gated-at.bofh.it> (permalink)
References <vNG4i-TU-1@gated-at.bofh.it> <vNU7f-Q4-1@gated-at.bofh.it> <vNXy9-32U-3@gated-at.bofh.it> <vNXHP-36c-3@gated-at.bofh.it>
Organization The Eyrie

Cross-posted to 2 groups.

Show all headers | View raw


Michael Biebl <biebl@debian.org> writes:
> Am 10.05.2018 um 19:22 schrieb Russ Allbery:

>> I may be misunderstanding the nature of the issue, but I believe that a
>> Type=oneshot service that runs a small C program that calls getrandom()
>> and then exit(0) when it returns would provide a useful facility.
>> krb5-kdc could then just declare a dependency on that service and
>> wouldn't be started until randomness was available.

> So we'd shift the waiting for randomness-to-be-available from one
> service to another? I don't quite see yet, where the benefit is in that.
> What's better if a wait-for-rng-ready binary blocks on getrandom()
> instead of the krb5-kdc binary itself? We wouldn't shorten the time we
> have to wait this way.

It means that the configured timeout for which it's reasonable to wait for
randomness is centralized in one service that can set that based on
understanding of what's necessary in practice, and timeouts to catch other
startup problems can remain in place for other services.  Right now, to
have krb5-kdc wait for randomness requires extending the startup timeout
of the service as a whole, thus potentially not diagnosing various other
problems that might be preventing the KDC from starting unrelated to
randomness.

It also opens the door to what I think would be the best long-term
solution (although the kernel and systemd folks may disagree with me):
having the kernel explicitly signal userspace in some way when getrandom()
is ready and exposing that in the systemd target dependency tree, so that
nothing has to poll and the dependency can be handled in the same way
that, e.g., devices appearing can be handled.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>

Back to linux.debian.devel.release | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Fixing Linux getrandom() in stable Ben Hutchings <ben@decadent.org.uk> - 2018-05-10 00:50 +0200
  Re: Fixing Linux getrandom() in stable Michael Biebl <biebl@debian.org> - 2018-05-10 15:50 +0200
    Re: Fixing Linux getrandom() in stable Russ Allbery <rra@debian.org> - 2018-05-10 19:30 +0200
      Re: Fixing Linux getrandom() in stable Michael Biebl <biebl@debian.org> - 2018-05-10 19:40 +0200
        Re: Fixing Linux getrandom() in stable Russ Allbery <rra@debian.org> - 2018-05-10 19:50 +0200
          Re: Fixing Linux getrandom() in stable Ian Campbell <ijc@debian.org> - 2018-05-10 21:20 +0200
        Re: Fixing Linux getrandom() in stable Benjamin Kaduk <kaduk@mit.edu> - 2018-05-10 19:50 +0200
  Re: Fixing Linux getrandom() in stable Yves-Alexis Perez <corsac@debian.org> - 2018-05-13 11:30 +0200
    Re: Fixing Linux getrandom() in stable Ben Hutchings <ben@decadent.org.uk> - 2018-05-13 19:20 +0200
  Re: Fixing Linux getrandom() in stable Adrian Bunk <bunk@debian.org> - 2018-05-13 22:50 +0200
    Re: Fixing Linux getrandom() in stable Thorsten Glaser <tg@mirbsd.de> - 2018-05-13 23:40 +0200
      Re: Fixing Linux getrandom() in stable Thorsten Glaser <tg@mirbsd.de> - 2018-05-14 03:00 +0200
      Re: Fixing Linux getrandom() in stable "Theodore Y. Ts'o" <tytso@mit.edu> - 2018-05-14 03:20 +0200
      Re: Fixing Linux getrandom() in stable Sam Hartman <hartmans@debian.org> - 2018-05-14 15:20 +0200
    Re: Fixing Linux getrandom() in stable Ben Hutchings <ben@decadent.org.uk> - 2018-05-14 04:20 +0200
      Re: Fixing Linux getrandom() in stable Adrian Bunk <bunk@debian.org> - 2018-05-22 21:50 +0200

csiph-web