Hi,

Anyway, crypto driver is called with CRYPTO_TFM_REQ_MAY_SLEEP flag set.
It basically mean it can sleep.
But it is not because of kmap_atomic()

So no possibility to know if to use GFP_KERNEL or GFP_ATOMIC.

I guess that is not correct way.

If driver cannot sleep then CRYPTO_TFM_REQ_MAY_SLEEP should not be set
when calling it.

Even sync implementation might use HW and sleep a bit while HW is doing
calculation...


- Dmitry

ext Herbert Xu wrote:
> Dmitry Kasatkin <dmitry.kasat...@nokia.com> wrote:
>   
>> One interesting issue
>>
>> Many clients in the kernel set CRYPTO_TFM_REQ_MAY_SLEEP to desc.flags.
>> It is used by crypto_yeld().
>>     
>
> That flag is really only meaningful for synchronous implementations.
>
> For hardware crypto that is asynchronous, you can simply ignore it
> in most cases (exceptions include invoking a syncrhonous backup, for
> example).
>
> Cheers,
>   
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to