boringssl/crypto
Adam Langley 82639e6f53 Use a pool of |rand_state| objects.
Previously we used thread-local state objects in rand.c. However, for
applications with large numbers of threads, this can lead to excessive
memory usage.

This change causes us to maintain a mutex-protected pool of state
objects where the size of the pool equals the maximum concurrency of
|RAND_bytes|. This might lead to state objects bouncing between CPUs
more often, but should help the memory usage problem.

Change-Id: Ie83763d3bc139e64ac17bf7e015ad082b2f8a81a
Reviewed-on: https://boringssl-review.googlesource.com/29565
Commit-Queue: Adam Langley <agl@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Reviewed-by: David Benjamin <davidben@google.com>
2018-07-06 21:25:37 +00:00
..
asn1 Use new encoding functions in ASN1_mbstring_ncopy. 2018-05-11 21:58:47 +00:00
base64
bio Remove files from Trusty which can't link because of Trusty libc. 2018-04-19 19:06:58 +00:00
bn_extra Rename bn->top to bn->width. 2018-02-05 23:44:24 +00:00
buf
bytestring Properly advance the CBS when parsing BER structures. 2018-06-26 07:23:10 +00:00
chacha
cipher_extra Remove SSL 3.0 implementation. 2018-06-28 16:54:58 +00:00
cmac Support 3DES-CMAC. 2018-05-15 22:23:26 +00:00
conf
curve25519 Rename third_party/wycheproof to satisfy a bureaucrat. 2018-05-07 18:33:50 +00:00
dh
digest_extra Add SHA256_TransformBlocks. 2018-04-25 17:51:50 +00:00
dsa Fix some timing leaks in the DSA code. 2018-06-15 02:37:45 +00:00
ec_extra
ecdh Update ECDH and EVP tests to accept latest Wycheproof vectors. 2018-06-07 16:54:30 +00:00
ecdsa_extra
engine
err Implement the client side of certificate compression. 2018-06-18 22:16:11 +00:00
evp Update ECDH and EVP tests to accept latest Wycheproof vectors. 2018-06-07 16:54:30 +00:00
fipsmodule Use a pool of |rand_state| objects. 2018-07-06 21:25:37 +00:00
hkdf
hmac_extra
lhash Add lh_FOO_retrieve_key to avoid stack-allocating SSL_SESSION. 2018-07-03 22:56:46 +00:00
obj Add some more compatibility functions. 2018-05-08 20:51:15 +00:00
pem Add a bunch of compatibility functions for PKCS#7. 2018-06-26 18:42:49 +00:00
perlasm
pkcs7 Add a bunch of compatibility functions for PKCS#7. 2018-06-26 18:42:49 +00:00
pkcs8 Properly advance the CBS when parsing BER structures. 2018-06-26 07:23:10 +00:00
poly1305
pool Add bssl::UpRef. 2018-07-03 22:47:36 +00:00
rand_extra [fuchsia] Update to zx_cprng_draw 2018-06-28 21:08:18 +00:00
rc4
rsa_extra Rename crypto/rsa_extra/print.c. 2018-05-23 22:36:14 +00:00
stack Avoid modifying stack in sk_find. 2018-04-12 21:02:12 +00:00
test Use new encoding functions in ASN1_mbstring_ncopy. 2018-05-11 21:58:47 +00:00
x509 Add bssl::UpRef. 2018-07-03 22:47:36 +00:00
x509v3 Restore some revocation-related X.509 extensions. 2018-05-15 23:36:08 +00:00
CMakeLists.txt Make X509 time validation stricter. 2018-06-25 17:54:33 +00:00
compiler_test.cc
constant_time_test.cc Add a test for CRYPTO_memcmp. 2018-03-27 16:22:47 +00:00
cpu-aarch64-fuchsia.c
cpu-aarch64-linux.c
cpu-arm-linux.c
cpu-arm.c
cpu-intel.c Change OPENSSL_cpuid_setup to reserve more extended feature space. 2018-04-19 20:48:58 +00:00
cpu-ppc64le.c
crypto.c Return more placeholder version strings. 2018-05-15 22:57:30 +00:00
ex_data.c
internal.h Use a pool of |rand_state| objects. 2018-07-06 21:25:37 +00:00
mem.c Remove unused string.h include. 2018-04-24 17:42:39 +00:00
refcount_c11.c
refcount_lock.c
refcount_test.cc
self_test.cc
thread_none.c
thread_pthread.c
thread_test.cc Use std::thread in thread_test.cc. 2018-06-04 17:32:48 +00:00
thread_win.c Reland "Fix bssl client/server's error-handling." 2018-05-07 17:19:59 +00:00
thread.c Remove a bunch of unnecessary includes. 2016-06-28 20:31:14 +00:00