summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDave Watson <davejwatson@fb.com>2019-01-27 03:57:38 +0300
committerDavid S. Miller <davem@davemloft.net>2019-01-29 10:05:55 +0300
commit32eb67b93c9e3cd62cb423e30b090cdd4aa8d275 (patch)
tree1d74f0e18976fc62c46d74b775a2a96b153dfc80 /include
parentb46a0bf78ad7b150ef5910da83859f7f5a514ffd (diff)
downloadlinux-32eb67b93c9e3cd62cb423e30b090cdd4aa8d275.tar.xz
net: tls: Save iv in tls_rec for async crypto requests
aead_request_set_crypt takes an iv pointer, and we change the iv soon after setting it. Some async crypto algorithms don't save the iv, so we need to save it in the tls_rec for async requests. Found by hardcoding x64 aesni to use async crypto manager (to test the async codepath), however I don't think this combination can happen in the wild. Presumably other hardware offloads will need this fix, but there have been no user reports. Fixes: a42055e8d2c30 ("Add support for async encryption of records...") Signed-off-by: Dave Watson <davejwatson@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/tls.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/tls.h b/include/net/tls.h
index 2a6ac8d642af..1486b60c4de8 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -120,6 +120,8 @@ struct tls_rec {
struct scatterlist sg_aead_out[2];
char aad_space[TLS_AAD_SPACE_SIZE];
+ u8 iv_data[TLS_CIPHER_AES_GCM_128_IV_SIZE +
+ TLS_CIPHER_AES_GCM_128_SALT_SIZE];
struct aead_request aead_req;
u8 aead_req_ctx[];
};