mbox series

[0/36] Move crypto_engine callback into algorithm object

Message ID ZNX/BwEkV3SDpsAS@gondor.apana.org.au (mailing list archive)
Headers show
Series Move crypto_engine callback into algorithm object | expand

Message

Herbert Xu Aug. 11, 2023, 9:27 a.m. UTC
As it stands, every crypto_engine user sets up callbacks in struct
crypto_engine_ctx which is stored at the head of the tfm context.

This is error-prone because there is no guarantee for that callback
to be there at all.  In fact this is exactly what happened when the
tfm context was moved for DMA alignment.

The first part of this series eliminates the unnecessary prepare
and unprepare callbacks so that only one function remains.

Then that last callback is moved into the algorithm object.  This
is checked by using special register/unregister functions that are
specific to crypto_engine.

Cheers,