Page MenuHomeFreeBSD

Move per-operation data out of the csession structure.
ClosedPublic

Authored by jhb on Jan 16 2018, 12:59 AM.
Tags
None
Referenced Files
F170469560: D13928.id.diff
Fri, Sep 4, 11:38 PM
F170462427: D13928.id38504.diff
Fri, Sep 4, 10:51 PM
F170436407: D13928.diff
Fri, Sep 4, 7:58 PM
Unknown Object (File)
Thu, Sep 3, 5:43 PM
Unknown Object (File)
Thu, Sep 3, 4:10 PM
Unknown Object (File)
Thu, Sep 3, 12:58 PM
Unknown Object (File)
Thu, Sep 3, 12:40 PM
Unknown Object (File)
Thu, Sep 3, 12:03 PM
Subscribers

Details

Summary

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.

PR: 218597

Test Plan
  • cryptocheck and cryptotest.py against cryptosoft0, ccr0, and aesni0.

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 14405
Build 14557: arc lint + arc unit

Event Timeline

kib added inline comments.
sys/opencrypto/cryptodev.c
1094

What is the purpose of this locking ?

This revision is now accepted and ready to land.Jan 17 2018, 9:29 AM
sys/opencrypto/cryptodev.c
1094

Just to avoid losing wakeups() with the loop at line 1050.

This revision was automatically updated to reflect the committed changes.