Thread (10 messages) read the whole thread 10 messages, 3 authors, 2012-01-06

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

From: Nikos Mavrogiannopoulos <hidden>
Date: 2012-01-06 08:15:10

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help