]> git.baikalelectronics.ru Git - kernel.git/commit
net: tls: Save iv in tls_rec for async crypto requests
authorDave Watson <davejwatson@fb.com>
Sun, 27 Jan 2019 00:57:38 +0000 (00:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Jan 2019 07:05:55 +0000 (23:05 -0800)
commit60e3609bcc261c942e2a6681fbf84202c5a0ebfb
tree1d74f0e18976fc62c46d74b775a2a96b153dfc80
parent41ab6dc2927dd97e5e08f08ae382eccead12427e
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: 4e09428b5ad71 ("Add support for async encryption of records...")
Signed-off-by: Dave Watson <davejwatson@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tls.h
net/tls/tls_sw.c