NetBSD/sys/opencrypto
darran d6a1889de6 Fix a race condition in opencrypto where the crypto request could be
completed by the crypto device, queued on the retq, but freed by the
ioctl lwp.  The problem manifests as various panics relating to the
condvar inside the request. The problem can occur whenever the crypto
device completes the request immediately and the ioctl skips the cv_wait().

The problem can be reproduced by enabling cryptosoft and running an openssl
speed test. E.g.
    sysctl -w kern.cryptodevallowsoft=-1
    openssl speed -engine cryptodev -evp des-ede3-cbc -multi 64

Add a macro for TAILQ_FOREACH_REVERSE_SAFE() to queue.h, since this
was missing and the opencrypto code removes requests from a list while
iterating with TAILQ_FOREACH_REVERSE().

Add missing cv_destroy() calls for the key request cleanup.

Reviewed by Thor Lancelot Simon.
2008-11-18 12:59:58 +00:00
..
criov.c This code never worked on a released version of FreeBSD in the form it's 2008-02-01 04:52:35 +00:00
crypto.c Fix a race condition in opencrypto where the crypto request could be 2008-11-18 12:59:58 +00:00
cryptodev.c Fix a race condition in opencrypto where the crypto request could be 2008-11-18 12:59:58 +00:00
cryptodev.h Fix a race condition in opencrypto where the crypto request could be 2008-11-18 12:59:58 +00:00
cryptosoft_xform.c Rework opencrypto to use a spin mutex (crypto_mtx) instead of "splcrypto" 2008-02-04 00:35:34 +00:00
cryptosoft.c Rework opencrypto to use a spin mutex (crypto_mtx) instead of "splcrypto" 2008-02-04 00:35:34 +00:00
cryptosoft.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
deflate.c Back out previous. It broke the build. 2008-05-05 13:41:29 +00:00
deflate.h Back out previous. It broke the build. 2008-05-05 13:41:29 +00:00
files.opencrypto Rework opencrypto to use a spin mutex (crypto_mtx) instead of "splcrypto" 2008-02-04 00:35:34 +00:00
Makefile
xform.c From Darran Hunt: you can't just specify the "wrong" underlying algorithm 2008-02-28 09:29:10 +00:00
xform.h From Darran Hunt at Coyote Point: don't truncate HMAC to 96 bits unless 2008-02-02 02:39:00 +00:00