Page MenuHomeFreeBSD

Add a crypto capability flag for accelerated software drivers.
ClosedPublic

Authored by jhb on Jun 3 2020, 11:01 PM.

Details

Summary

Use this in GELI to print out a different message when accelerated
software such as AESNI is used vs plain software crypto.

While here, simplify the logic a bit for determing which type of
crypto driver was chosen the first time by examining the capabilities
of the matched driver after a single call to crypto_newsession rather
than making separate calls with different flags.

Test Plan
  • created a temporary geli (geli onetime) on a memory disk (md0) with only cryptosoft present, with aesni.ko loaded, and with ccr0 present and verify the string printed by GELI for all three cases

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 31476
Build 29088: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Jun 3 2020, 11:01 PM
sys/geom/eli/g_eli.c
989

"hardware" may also not be quite the right name. Something like "co-processor" might be more apt? However, were we to do that, it would also make sense I think to have a little helper method shared by this function and the XML dumping code that maps the sc_crypto value to a string.

LGTM.

(I don't think I have any better idea on the wording of 'hardware' either, maybe leave it as-is for now?)

This revision is now accepted and ready to land.Jun 5 2020, 11:59 PM