On 01/06/2012 02:37 AM, Herbert Xu wrote:
Nikos Mavrogiannopoulos [off-list ref] wrote:
quoted
The added CRYPTO_ALG_KERN_DRIVER_ONLY indicates whether a cipher
is only available via a kernel driver. If the cipher implementation
might be available by using an instruction set or by porting the
kernel code, then it must not be set.
[...]
quoted
+static inline u32 crypto_tfm_alg_flags(struct crypto_tfm *tfm)
+{
+ return tfm->__crt_alg->cra_flags;
+}
+
Who is going to use this? For one it's not type-safe as we try
to avoid directly using crypto_tfm in kernel code.
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.
regards,
Nikos