[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #17682 [Tor]: safe_timer_diff is unsafe under wrapping
#17682: safe_timer_diff is unsafe under wrapping
------------------------------+------------------------------------
Reporter: teor | Owner: nickm
Type: defect | Status: needs_review
Priority: High | Milestone: Tor: 0.2.8.x-final
Component: Tor | Version: Tor: unspecified
Severity: Normal | Resolution:
Keywords: regression, easy | Actual Points:
Parent ID: #17983 | Points: small
Sponsor: |
------------------------------+------------------------------------
Comment (by robgjansen):
Replying to [comment:13 nickm]:
> Replying to [comment:12 teor]:
> > Doesn't shadow rely on starting Tor at the epoch?
> > (I think I heard that once, I'm not sure how accurate it is.)
>
> I believe it once did.
Shadow internally starts at time 0, and maintains a simulation clock that
ticks with nanosecond granularity. Because applications like Tor rely on
time() and gettimeofday() to properly function, the time that Shadow
emulates to Tor indeed starts at the epoch. (I.e., at the first tick,
Shadow would return 0 if Tor called time() or gettimeofday()).
The logic for what time gets returned from Shadow to Tor starts here:
https://github.com/shadow/shadow/blob/master/src/host/shd-process.c#L3404
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/17682#comment:15>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs