Commit Graph

284 Commits

Author SHA1 Message Date
Nick Mathewson
3b58f9929f r18283@catbus: nickm | 2008-02-20 18:58:31 -0500
Fix assertion when searching for a string in an empty chunk.


svn:r13634
2008-02-20 23:58:48 +00:00
Nick Mathewson
304bdfdc6b r18279@catbus: nickm | 2008-02-20 18:38:48 -0500
Log message to try to detect error in buffers.c


svn:r13633
2008-02-20 23:38:57 +00:00
Nick Mathewson
f0e523c6ef r18272@catbus: nickm | 2008-02-20 18:20:33 -0500
add a flag to suppress overwriting the certificates file with new certificates, so we do not overwrite all certs when starting as an authority.


svn:r13630
2008-02-20 23:20:36 +00:00
Nick Mathewson
384a8ab777 r18267@catbus: nickm | 2008-02-20 16:57:45 -0500
Suppress signed/unsigned comparison warnings in buffers.c


svn:r13624
2008-02-20 21:57:48 +00:00
Nick Mathewson
7521ef9a00 r18264@catbus: nickm | 2008-02-20 12:48:21 -0500
fix bufs in buf_pos_t implementation.


svn:r13623
2008-02-20 17:48:39 +00:00
Nick Mathewson
cefe0a1959 r18255@catbus: nickm | 2008-02-20 11:44:55 -0500
Add asserts and refactor some comparisons in order to fix some veracode-identified issues. Note a bug in buffers.c


svn:r13618
2008-02-20 16:57:39 +00:00
Roger Dingledine
d1a195d3cb call a "number of characters" a size_t, not an int
svn:r13594
2008-02-19 22:52:50 +00:00
Nick Mathewson
418c2e1b6b r14181@tombo: nickm | 2008-02-15 16:48:17 -0500
Fix all but 2 DOCDOC items; defer many XXX020s (particularly those where fixing them would fix no bugs at the risk of introducing some bugs).


svn:r13529
2008-02-15 23:39:04 +00:00
Nick Mathewson
f3eaeb99a3 r18051@catbus: nickm | 2008-02-12 15:20:43 -0500
Re-tune mempool parametes based on testing on peacetime: use smaller chuncks, free them a little more aggressively, and try very hard to concentrate allocations on fuller chunks.  Also, lots of new documentation.


svn:r13484
2008-02-12 20:20:52 +00:00
Nick Mathewson
141a5877f3 r14063@tombo: nickm | 2008-02-08 15:48:32 -0500
Add a bunch more code documentation; change the interface of fetch_var_cell_from_buf() so it takes the current link protocol into account and can't get confused by weird command bytes on v1 connections.


svn:r13430
2008-02-08 21:13:15 +00:00
Nick Mathewson
842a33ff20 Update some copyright notices: it is now 2008.
svn:r13412
2008-02-07 05:31:47 +00:00
Nick Mathewson
4d70094b6e r17951@catbus: nickm | 2008-02-06 14:34:13 -0500
Add more documentation; change the behavior of read_to_buf_tls to be more consistent.  Note a longstanding problem with current read/write interfaces.


svn:r13407
2008-02-06 19:34:32 +00:00
Nick Mathewson
a869574c56 r17947@catbus: nickm | 2008-02-06 11:57:53 -0500
Fix a bunch of DOCDOC items; document the --quiet flag; refactor a couple of XXXX020 items.


svn:r13405
2008-02-06 16:58:05 +00:00
Nick Mathewson
ec6c131da6 r17936@catbus: nickm | 2008-02-06 00:31:11 -0500
Fix/downgrade some more XXX020s.


svn:r13397
2008-02-06 05:31:21 +00:00
Nick Mathewson
ae6df065ed r15890@tombo: nickm | 2008-01-12 17:19:51 -0500
Add a --disable-buffer-freelists configure argument to build without buffer RAM chunk freelists, so we can benchmark the impact of this.


svn:r13121
2008-01-13 00:20:44 +00:00
Nick Mathewson
614dc52623 r17467@catbus: nickm | 2008-01-05 19:54:20 -0500
fix whitespace


svn:r13035
2008-01-06 00:54:22 +00:00
Nick Mathewson
46a27c2f93 r15750@tombo: nickm | 2007-12-29 19:12:51 -0500
Make HTTP-processing code in buffers.c faster: do not pull up 50K of text into the first chunk if the headers end earlier than that.


svn:r13006
2007-12-30 00:13:07 +00:00
Nick Mathewson
cd85eac0d3 r17433@catbus: nickm | 2007-12-29 12:35:57 -0500
Incomplete code to avoid doing needless pull-ups on HTTP.  Also, use memstr instead of strstr to find the content-length header.


svn:r13005
2007-12-29 17:36:03 +00:00
Nick Mathewson
f4f5dc4aca r15745@tombo: nickm | 2007-12-29 00:15:17 -0500
Try even harder not to allocate chunks bigger than MAX_CHUNK_ALLOC.


svn:r13003
2007-12-29 05:16:30 +00:00
Nick Mathewson
bd32982c77 r17426@catbus: nickm | 2007-12-28 21:12:29 -0500
Remove need for buf_pullup in fetch_line_from_buf().


svn:r13002
2007-12-29 02:33:42 +00:00
Nick Mathewson
d7f5a73173 r17410@catbus: nickm | 2007-12-27 09:20:27 -0500
Exciting new entries in buf_dump_freelist_sizes() to make sure our freelist sizes are reasonable.


svn:r12996
2007-12-27 14:20:30 +00:00
Nick Mathewson
1a2b6c2ae3 r17407@catbus: nickm | 2007-12-27 00:18:31 -0500
Fix windows compile error


svn:r12995
2007-12-27 05:18:36 +00:00
Nick Mathewson
119b4e1edf r17405@catbus: nickm | 2007-12-26 22:27:37 -0500
And clean up an assertion failure.


svn:r12993
2007-12-27 03:27:48 +00:00
Nick Mathewson
148e2e1c48 r17403@catbus: nickm | 2007-12-26 22:23:50 -0500
Apparently loops work better when you actually increment/decrement the loop variable.  Who knew?


svn:r12992
2007-12-27 03:23:57 +00:00
Nick Mathewson
1503021ee5 r15723@tombo: nickm | 2007-12-26 19:25:51 -0500
Actually trim freelists.


svn:r12991
2007-12-27 00:25:54 +00:00
Nick Mathewson
3a5bee150f r15721@tombo: nickm | 2007-12-26 17:07:10 -0500
Fix a nasty infinite loop in flush_buf[_tls].


svn:r12990
2007-12-26 22:07:14 +00:00
Nick Mathewson
27220fb395 r15719@tombo: nickm | 2007-12-26 14:02:12 -0500
More tweaks on 0-byte TLS writes.


svn:r12989
2007-12-26 19:02:15 +00:00
Nick Mathewson
80151b42df r15717@tombo: nickm | 2007-12-26 13:55:53 -0500
Oops.  flush_buf_tls can request more than the requested number of bytes.  When that happens, do not let the size_t sz wrap around.


svn:r12988
2007-12-26 18:55:56 +00:00
Nick Mathewson
84b6e26c50 r15715@tombo: nickm | 2007-12-26 13:09:27 -0500
Peacetime managed to run overnight in paranoia mode.  Disabling paranoia, so that buffers.c can be a little speedy again.


svn:r12987
2007-12-26 18:09:36 +00:00
Nick Mathewson
fb8cbc8642 r15710@tombo: nickm | 2007-12-25 19:36:03 -0500
Fix in flush_buf_tls: it is okay to flush an empty buffer, since we may have a partial TLS record pending.


svn:r12984
2007-12-26 00:36:05 +00:00
Nick Mathewson
a7ef07b4bd r15693@tombo: nickm | 2007-12-25 19:11:29 -0500
Here, have some terribly clever new buffer code.  It uses a mbuf-like strategy rather than a ring buffer strategy, so it should require far far less extra memory to hold any given amount of data.  Also, it avoids access patterns like x=malloc(1024);x=realloc(x,1048576);x=realloc(x,1024);append_to_freelist(x) that might have been contributing to memory fragmentation.  I've  tested it out a little on peacetime, and it seems to work so far.  If you want to benchmark it for speed, make sure to remove the #define PARANOIA; #define NOINLINE macros at the head of the module.


svn:r12983
2007-12-26 00:12:08 +00:00
Roger Dingledine
1d8a8063b9 clean up copyrights, and assign 2007 copyrights to The Tor Project, Inc
svn:r12786
2007-12-12 21:09:01 +00:00
Roger Dingledine
2b8ca7b4a4 patch from karsten to clean up documentation and to integrate
more fixes into rend-spec.txt.


svn:r12715
2007-12-07 21:27:58 +00:00
Nick Mathewson
2e378295d6 r16997@catbus: nickm | 2007-12-06 18:56:33 -0500
Make http://torproject urls into https://torproject urls.  Patch from steve.


svn:r12708
2007-12-06 23:56:36 +00:00
Nick Mathewson
92372b156a r16995@catbus: nickm | 2007-12-06 18:42:53 -0500
patch from steve: replace more tor.eff.org instances with torproject.org


svn:r12707
2007-12-06 23:42:59 +00:00
Roger Dingledine
8ac5f24c33 easy tweaks on r12607
svn:r12608
2007-11-29 15:30:32 +00:00
Roger Dingledine
aaf35cccf7 karsten's second refactoring patch
svn:r12607
2007-11-29 15:25:04 +00:00
Nick Mathewson
6fcda5299f r14727@31-33-67: nickm | 2007-11-05 18:34:35 -0500
Make VERSIONS variable-length.


svn:r12391
2007-11-05 23:34:39 +00:00
Nick Mathewson
9a20a64b62 r16438@catbus: nickm | 2007-11-05 16:45:45 -0500
Initial code for variable-length cells. CERT and VERSIONS  need to use them.


svn:r12390
2007-11-05 21:46:35 +00:00
Roger Dingledine
e5885deab5 Separate "SOCKS_COMMAND_CONNECT_DIR" into two flags in
edge_connection_t: want_onehop if it must attach to a circuit with
only one hop (e.g. for the current tunnelled connections that use
begin_dir), and use_begindir if we mean to use a BEGIN_DIR relay
command to establish the stream rather than the normal BEGIN. Now
we can make anonymized begin_dir connections for (e.g.) more secure
hidden service posting and fetching.


svn:r12244
2007-10-28 08:16:19 +00:00
Peter Palfrader
1a94e84661 Say "using socksX _to_ port y" instead of "socksX _on_ port y". it confuses weasel less
svn:r11834
2007-10-10 15:44:34 +00:00
Nick Mathewson
91f83cfc2d r14830@catbus: nickm | 2007-08-29 13:50:10 -0400
Make controllers accept LF as well as CRLF.  Update spec to reflect this.  Remove now-dead code.  Make controller warning about v0 protocol more accurate.


svn:r11299
2007-08-29 19:02:33 +00:00
Nick Mathewson
480db0f00a r14034@catbus: nickm | 2007-07-31 05:22:56 -0400
possible fix for bug 473: always set buf->cur on buf_remove_from_front.


svn:r11004
2007-07-31 09:31:15 +00:00
Nick Mathewson
9fb77a6479 Disable SENTINELS in buffers: it may be responsible for making platform mallocs() be inefficient, and we havent needed it in a long long time.
svn:r10994
2007-07-30 17:51:14 +00:00
Nick Mathewson
9260a824ef Yet another buffer RAM patch: tNever ever ever keep a buffer memory chunk around for an empty buffer that could go on the freelist. This wants profiling to make sure that performance doesnt suffer.
svn:r10993
2007-07-30 17:47:43 +00:00
Nick Mathewson
0d274e1db1 r13952@catbus: nickm | 2007-07-27 19:18:46 -0400
Weasel noticed that many buffers spend their time with empty 4k, 8k, and 16k memory chunks.  Thus, be more aggressive about putting empty chunks on the freelist, regardless of their high water marks.  (Also, run buffer_shrink_freelist on the 8k-chunk freelist.)


svn:r10953
2007-07-27 23:19:02 +00:00
Nick Mathewson
a5477c7bb9 r13944@catbus: nickm | 2007-07-27 15:52:35 -0400
Fix warnings on platforms where rlim values can be signed.
 Add an 8k buffer freelist.
 


svn:r10948
2007-07-27 19:53:29 +00:00
Nick Mathewson
bc9a7be943 r13939@catbus: nickm | 2007-07-27 14:33:22 -0400
When dumping memory usage, list bytes used in buffer memory free-lists.


svn:r10947
2007-07-27 18:33:37 +00:00
Roger Dingledine
a1ab2c8087 free bridge list on exit; try harder to free buffer freelists on exit.
svn:r10854
2007-07-17 11:33:38 +00:00
Roger Dingledine
fcbb817db5 free another string, and the buffer freelists, on exit.
svn:r10851
2007-07-17 09:26:45 +00:00