[tor-bugs] #26040 [Core Tor/Tor]: Improve getrandom handling
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu May 10 16:20:28 UTC 2018
#26040: Improve getrandom handling
--------------------------+------------------------------------
Reporter: Hello71 | Owner: Hello71
Type: enhancement | Status: needs_revision
Priority: Medium | Milestone: Tor: 0.3.4.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: catalyst | Sponsor:
--------------------------+------------------------------------
Changes (by catalyst):
* status: needs_review => needs_revision
Comment:
Thanks for the patch! The `getrandom(2)` manpage on one of my Ubuntu VMs
says
{{{
The behavior when a call to getrandom() that is blocked while
reading
from /dev/urandom is interrupted by a signal handler depends on
the
initialization state of the entropy buffer and on the request
size,
buflen. If the entropy is not yet initialized, then the call will
fail
with the EINTR error.
}}}
so in the case of tor starting up soon after boot, I think it might be
possible to get `EINTR` if tor receives a signal while blocked on
insufficient entropy. Arguably we want to retry in this case. (Also I
would be interested in hearing if there are good reasons to treat this as
a bug when it occurs anyway.)
Please make a GitHub pull request for your revised patches so CI can run
on them. Thanks!
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/26040#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list