[tor-bugs] #25122 [Core Tor/Tor]: geoip: Hook the client geoip cache into the OOM handler

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Feb 2 17:12:34 UTC 2018


#25122: geoip: Hook the client geoip cache into the OOM handler
-------------------------------------------------+-------------------------
 Reporter:  dgoulet                              |          Owner:  dgoulet
     Type:  enhancement                          |         Status:
                                                 |  needs_revision
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.3.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-relay, tor-oom, tor-dos,         |  Actual Points:
  029-backport, 031-backport, 032-backport       |
Parent ID:                                       |         Points:
 Reviewer:  nickm                                |        Sponsor:
-------------------------------------------------+-------------------------
Changes (by dgoulet):

 * status:  needs_review => needs_revision
 * reviewer:   => nickm


Comment:

 Replying to [comment:4 nickm]:
 > Looks good.  But could you take a few minutes to make sure that there is
 nowhere else in all the codebase, before or after applying #24902, that
 allocates or frees one of these objects?  And that the transport_name
 field never changes once the object is allocated?

 I really hope the `transport_name` doesn't change because it is used to
 compare entries in the HT if present. I'll confirm that.

 >
 > Possibly, we should make a _new() function to handle the allocate-and-
 count part of this function.  That could be a separate ticket, though.

 Yes agree, we need a new() there. This will be a bit bigger change to
 backport but should be fairly trivial though.

 >
 > Possibly, we should check to make sure that we never underflow on
 geoip_client_history_cache_size

 Hmmm, I'll work on inc/dev functions for that value that validates.

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


More information about the tor-bugs mailing list