Page MenuHomeFreeBSD

Don't return errors from the cryptodev_process() method.
ClosedPublic

Authored by jhb on Sep 8 2020, 4:51 PM.
Tags
None
Referenced Files
F132693306: D26361.id.diff
Sun, Oct 19, 2:44 AM
F132661619: D26361.id76786.diff
Sat, Oct 18, 8:43 PM
F132656518: D26361.id76786.diff
Sat, Oct 18, 7:42 PM
F132650223: D26361.id76777.diff
Sat, Oct 18, 6:27 PM
Unknown Object (File)
Thu, Oct 16, 3:18 PM
Unknown Object (File)
Thu, Oct 16, 3:18 PM
Unknown Object (File)
Thu, Oct 16, 3:18 PM
Unknown Object (File)
Thu, Oct 16, 3:54 AM
Subscribers

Details

Summary

The cryptodev_process() method should either return 0 if it has
completed a request, or ERESTART to defer the request until later. If
a request encounters an error, the error should be reported via
crp_etype before completing the request via crypto_done().

Fix a few more drivers noticed by asomers@ similar to the fix in
r365389. This is an old bug, but went unnoticed since crypto requests
did not start failing as a normal part of operation until digest
verification was introduced which can fail requests with EBADMSG.

PR: 247986
Reported by: asomers

Test Plan
  • none yet, still need to compile test

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 33444
Build 30728: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Sep 8 2020, 4:51 PM
jhb added inline comments.
sys/dev/safe/safe.c
1262

This is slightly different as we need to pass ERESTART to the caller.

This revision is now accepted and ready to land.Sep 8 2020, 5:44 PM