[tor-bugs] #28636 [Core Tor/Tor]: Address comments by Nick (2018-11-27 over IRC)

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Nov 27 16:35:06 UTC 2018


#28636: Address comments by Nick (2018-11-27 over IRC)
-------------------------+-------------------------------------------------
     Reporter:  asn      |      Owner:  (none)
         Type:  defect   |     Status:  new
     Priority:  Medium   |  Milestone:  Tor: 0.4.0.x-final
    Component:  Core     |    Version:
  Tor/Tor                |   Keywords:  wtf-pad, tor-relay, tor-cell,
     Severity:  Normal   |  padding
Actual Points:           |  Parent ID:  #28632
       Points:           |   Reviewer:
      Sponsor:           |
-------------------------+-------------------------------------------------
 Nick expressed the following concerns/comments about the branch:

 - We should be careful about using `monotime_*` functions in the branch
 because of performance issues:
 {{{
 15:19 <+nickm> ... it is too slow for a fast path.
 15:19 <+nickm> and lots of the ways to use it can be too slow for a fast
 path
 15:21 <+nickm> hrm.  So there are two things that can make it slow.
 15:22 <+nickm> there are two things that can make this function slow
 15:22 <+nickm> first, it tries to get the most precise monotonic time, not
 the fastest one
 15:22 <+nickm> so it might have to go to the kernel and do a context
 switch and take some time there
 15:22 <+nickm> the "coarse" variants of monotime_* don't have that
 problem.
 15:23 <+nickm> The second issue is that using the "usec" variant requires
 64-bit division on some platforms, which is noticeably expensive on 32-bit
 hardware.
 }}}

 - Figure out how dormant mode interacts with the padding code.
 {{{
 15:27 <+nickm> okay.  short version is that tor can enter a "dormant"
 state when it is inactive for a really long time, or when the controller
 tells it to do so.
 15:28 <+nickm> we should probably figure out whether being dormant
 prevents you from sendig padding and vice versa...
 15:28 <+nickm> ... and whether it should prevent you from sending padding
 (and vice versa)...
 }}}

 - Do type checking when downcasting the vcarious probability
 distributions.

 - `<+nickm> Also there are all these generic dist_ops functions that you
 could use ... but the API seems to encourage you not to use them.  having
 wrapper functions instead that call dist->dist_ops.func(dist, ...) would
 be neat`

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28636>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list