The kernel crypto framework sometimes returned an error, sometimes
authorbluhm <bluhm@openbsd.org>
Wed, 13 Oct 2021 13:08:58 +0000 (13:08 +0000)
committerbluhm <bluhm@openbsd.org>
Wed, 13 Oct 2021 13:08:58 +0000 (13:08 +0000)
commit3877526a1e044021de4c42aba89655a6a5889f16
tree7a6a1c8f592562d932f3ba935f19b33dc2afd322
parentff8fb92b25131022f39b5b59d4b0f2efc6939ec8
The kernel crypto framework sometimes returned an error, sometimes
the callback was called, and sometimes both.  So the caller of that
API could not release resources correctly.
A bunch of errors can or should not happen, replace them with an
assert.  Remove redundant checks.  crypto_invoke() should not return
the error, but pass it via callback.
Some old hardware drivers keep part of their inconsistency as I
cannot test them.
OK mpi@
12 files changed:
sys/arch/amd64/amd64/aesni.c
sys/arch/amd64/amd64/via.c
sys/arch/arm64/arm64/cryptox.c
sys/arch/i386/i386/via.c
sys/arch/i386/pci/glxsb.c
sys/arch/octeon/dev/octcrypto.c
sys/crypto/crypto.c
sys/crypto/cryptodev.h
sys/crypto/cryptosoft.c
sys/dev/pci/hifn7751.c
sys/dev/pci/safe.c
sys/dev/pci/ubsec.c