On Fri, Jan 6, 2012 at 9:28 AM, Herbert Xu [off-list ref] wrote:
quoted
I needed this function in order to access the new flag without
relying on the structure format. The available crypto_tfm_alg_type()
would apply a mask and remove it, thus I added this function.
Can you show me some example code so I can see how you intend
to use it in userspace?
I intend to export the flag to use space as shown below. The idea is
to allow userspace libraries decide whether to use the acceleration
(i.e. if the CRYPTO_ALG_KERN_DRIVER_ONLY is not given they shouldn't
attempt to use the kernel algorithm).
How the flag is exported by cryptodev-linux:
http://repo.or.cz/w/cryptodev-linux.git/blob/aead:/ioctl.c#l716
An example of using it in userspace:
http://repo.or.cz/w/cryptodev-linux.git/blob/aead:/examples/aes.c#l43
regards,
Nikos