HomeFreeBSD

Move per-operation data out of the csession structure.

Description

Move per-operation data out of the csession structure.

Create a struct cryptop_data which contains state needed for a single
symmetric crypto operation and move that state out of the session. This
closes a race with the CRYPTO_F_DONE flag that can result in use after
free.

While here, remove the 'cse->error' member. It was just a copy of
'crp->crp_etype' and cryptodev_op() and cryptodev_aead() checked both
'crp->crp_etype' and 'cse->error'. Similarly, do not check for an
error from mtx_sleep() since it is not used with PCATCH or a timeout
so cannot fail with an error.

PR: 218597
Reviewed by: kib
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D13928

Details

Provenance
jhbAuthored on
Reviewer
kib
Differential Revision
D13928: Move per-operation data out of the csession structure.
Parents
rS328452: Fix a sleepable malloc in ndastart. We shouldn't be sleeping
Branches
Unknown
Tags
Unknown