Page MenuHomeFreeBSD

Add a crypto capability flag for accelerated software drivers.

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



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

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jhb requested review of this revision.Jun 3 2020, 11:01 PM
989 ↗(On Diff #72651)

"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.


(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