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, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt