1. 12 Dec, 2009 1 commit
    • Sebastian Hahn's avatar
      *_free functions now accept NULL · 3807db00
      Sebastian Hahn authored
      Some *_free functions threw asserts when passed NULL. Now all of them
      accept NULL as input and perform no action when called that way.
      This gains us consistence for our free functions, and allows some
      code simplifications where an explicit null check is no longer necessary.
  2. 20 Nov, 2009 2 commits
  3. 14 Nov, 2009 1 commit
    • Jacob Appelbaum's avatar
      Fix compilation with with bionic libc. · 6f1fe7e9
      Jacob Appelbaum authored and Nick Mathewson's avatar Nick Mathewson committed
      This fixes bug 1147:
       bionic doesn't have an actual implementation of mlockall();
       mlockall() is merely in the headers but not actually in the library.
       This prevents Tor compilation with the bionic libc for Android handsets.
  4. 27 Oct, 2009 1 commit
    • Jacob Appelbaum's avatar
      Implement DisableAllSwap to avoid putting secret info in page files. · 2aac39a7
      Jacob Appelbaum authored and Roger Dingledine's avatar Roger Dingledine committed
      This commit implements a new config option: 'DisableAllSwap'
      This option probably only works properly when Tor is started as root.
      We added two new functions: tor_mlockall() and tor_set_max_memlock().
      tor_mlockall() attempts to mlock() all current and all future memory pages.
      For tor_mlockall() to work properly we set the process rlimits for memory to
      RLIM_INFINITY (and beyond) inside of tor_set_max_memlock().
      We behave differently from mlockall() by only allowing tor_mlockall() to be
      called one single time. All other calls will result in a return code of 1.
      It is not possible to change DisableAllSwap while running.
      A sample configuration item was added to the torrc.complete.in config file.
      A new item in the man page for DisableAllSwap was added.
      Thanks to Moxie Marlinspike and Chris Palmer for their feedback on this patch.
      Please note that we make no guarantees about the quality of your OS and its
      mlock/mlockall implementation. It is possible that this will do nothing at all.
      It is also possible that you can ulimit the mlock properties of a given user
      such that root is not required. This has not been extensively tested and is
      unsupported. I have included some comments for possible ways we can handle
      this on win32.
  5. 15 Sep, 2009 1 commit
  6. 10 Aug, 2009 1 commit
  7. 30 May, 2009 1 commit
    • Nick Mathewson's avatar
      Don't attempt to log messages to a controller from a worker thread. · fd992dee
      Nick Mathewson authored
      This patch adds a function to determine whether we're in the main
      thread, and changes control_event_logmsg() to return immediately if
      we're in a subthread.  This is necessary because otherwise we will
      call connection_write_to_buf, which modifies non-locked data
      Bugfix on 0.2.0.x; fix for at least one of the things currently
      called "bug 977".
  8. 27 May, 2009 1 commit
  9. 13 May, 2009 1 commit
    • Nick Mathewson's avatar
      Use a mutex to protect the count of open sockets. · c36efb0c
      Nick Mathewson authored
      This matters because a cpuworker can close its socket when it
      finishes.  Cpuworker typically runs in another thread, so without a
      lock here, we can have a race condition and get confused about how
      many sockets are open.  Possible fix for bug 939.
  10. 04 May, 2009 1 commit
  11. 02 May, 2009 1 commit
  12. 03 Mar, 2009 1 commit
  13. 02 Mar, 2009 1 commit
  14. 09 Feb, 2009 2 commits
  15. 21 Jan, 2009 1 commit
  16. 20 Jan, 2009 1 commit
  17. 04 Jan, 2009 2 commits
  18. 30 Dec, 2008 1 commit
  19. 22 Dec, 2008 4 commits
  20. 11 Dec, 2008 1 commit
  21. 09 Dec, 2008 1 commit
  22. 08 Dec, 2008 1 commit
  23. 05 Dec, 2008 3 commits
  24. 02 Dec, 2008 2 commits
  25. 26 Nov, 2008 2 commits
  26. 11 Nov, 2008 1 commit
  27. 10 Nov, 2008 3 commits
  28. 09 Nov, 2008 1 commit