diff options
author | Stephan Mueller <smueller@chronox.de> | 2017-06-25 17:12:59 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-07-28 17:55:47 +0800 |
commit | d887c52d6ae43aeebd249b5f2f1333e60236aa60 (patch) | |
tree | 900c6c96a8e7fba573a3d9d6a74a9e35096364d7 /kernel | |
parent | e870456d8e7c8d57c059ea479b5aadbb55ff4c3a (diff) | |
download | linux-d887c52d6ae43aeebd249b5f2f1333e60236aa60.tar.gz linux-d887c52d6ae43aeebd249b5f2f1333e60236aa60.tar.bz2 linux-d887c52d6ae43aeebd249b5f2f1333e60236aa60.zip |
crypto: algif_aead - overhaul memory management
The updated memory management is described in the top part of the code.
As one benefit of the changed memory management, the AIO and synchronous
operation is now implemented in one common function. The AF_ALG
operation uses the async kernel crypto API interface for each cipher
operation. Thus, the only difference between the AIO and sync operation
types visible from user space is:
1. the callback function to be invoked when the asynchronous operation
is completed
2. whether to wait for the completion of the kernel crypto API operation
or not
The change includes the overhaul of the TX and RX SGL handling. The TX
SGL holding the data sent from user space to the kernel is now dynamic
similar to algif_skcipher. This dynamic nature allows a continuous
operation of a thread sending data and a second thread receiving the
data. These threads do not need to synchronize as the kernel processes
as much data from the TX SGL to fill the RX SGL.
The caller reading the data from the kernel defines the amount of data
to be processed. Considering that the interface covers AEAD
authenticating ciphers, the reader must provide the buffer in the
correct size. Thus the reader defines the encryption size.
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions