Re: [PATCH v2 01/11] crypto: move crypto_alg_get/crypto_alg_put to linux/crypto.h

From: Herbert Xu
Date: Tue Nov 20 2018 - 00:48:42 EST


On Tue, Nov 20, 2018 at 06:46:59AM +0100, LABBE Corentin wrote:
> On Tue, Nov 20, 2018 at 11:10:47AM +0800, Herbert Xu wrote:
> > On Mon, Nov 19, 2018 at 12:25:10PM -0800, Ard Biesheuvel wrote:
> > > On Mon, 19 Nov 2018 at 11:53, Corentin Labbe <clabbe@xxxxxxxxxxxx> wrote:
> > > >
> > > > Since we will need crypto_alg_get/crypto_alg_put for "locking"
> > > > crypto_alg when updating stats, we need it to be via linux/crypto.h
> > > >
> > >
> > > This seems backwards to me. Surely, crypto stats are permitted to use
> > > the internal crypto API?
> >
> > I agree.
> >
>
> I dont understand what is backwards ? moving or using ?
> What do you suggest for "locking" crypto_alg ?

You should include "crypto/internal.h" directly in your code rather
than exporting these functions for wider usage outside of the API
code.

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