Am Mittwoch, 14. Februar 2018, 06:50:38 CET schrieb Harsh Jain:

Hi Harsh,

> On 10-02-2018 03:34, Stephan Müller wrote:
> > Crypto drivers may implement a streamlined serialization support for AIO
> > requests that is reported by the CRYPTO_ALG_SERIALIZES_IV_ACCESS flag to
> > the crypto user. When the user decides that he wants to send multiple
> > AIO requests concurrently and wants the crypto driver to handle the
> > serialization, the caller has to set CRYPTO_TFM_REQ_IV_SERIALIZE to notify
> > the crypto driver.
> Will crypto_alloc_* API takes cares of this flag?. For Kernel Crypto user IV
> Synchronization logic depends on weather tfm allocated supports IV
> Serialisation or not.

The alloc API calls are not related to this flag. This flag is set in the 
request sent to the driver. If the driver sees this flag, it shall perform its 

The idea is the following: the driver reports CRYPTO_ALG_SERIALIZES_IV_ACCESS 
if it can serialize requests. In this case, the higher level functions (like 
AF_ALG) would not serialize the request. Now, the higher level functions must 
inform the driver that its serialization function shall be performed which 

Note, the higher level functions may decide that no serialization is necessary 
(e.g. in the case the inline IV handling is followed by AF_ALG). This implies 
that the CRYPTO_TFM_REQ_IV_SERIALIZE flag would not be set even though the 
driver is capable of serializing (and thus would report 


Reply via email to