Re: [PATCH 1/1] Added CRYPTO_ALG_KERN_DRIVER_ONLY flag (3rd attempt)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 6, 2012 at 9:28 AM, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxxx> wrote:

>> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux