summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2015-09-05 10:15:19 +0000
committerglebius <glebius@FreeBSD.org>2015-09-05 10:15:19 +0000
commit790dc6f94a18458e1890c6c82b22e51da4285e04 (patch)
tree6a0d837ea94696bd074f6862e5531acd4c620032 /contrib/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
parent4bfbbf8647f0d3441657cc97c83b430b4f97e7f4 (diff)
downloadFreeBSD-src-790dc6f94a18458e1890c6c82b22e51da4285e04.zip
FreeBSD-src-790dc6f94a18458e1890c6c82b22e51da4285e04.tar.gz
Use Jenkins hash for TCP syncache.
o Unlike xor, in Jenkins hash every bit of input affects virtually every bit of output, thus salting the hash actually works. With xor salting only provides a false sense of security, since if hash(x) collides with hash(y), then of course, hash(x) ^ salt would also collide with hash(y) ^ salt. [1] o Jenkins provides much better distribution than xor, very close to ideal. TCP connection setup/teardown benchmark has shown a 10% increase with default hash size, and with bigger hashes that still provide possibility for collisions. With enormous hash size, when dataset is by an order of magnitude smaller than hash size, the benchmark has shown 4% decrease in performance decrease, which is expected and acceptable. Noticed by: Jeffrey Knockel <jeffk cs.unm.edu> [1] Benchmarks by: jch Reviewed by: jch, pkelsey, delphij Security: strengthens protection against hash collision DoS Sponsored by: Nginx, Inc.
Diffstat (limited to 'contrib/llvm/lib/CodeGen/MIRParser/MIRParser.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud