diff options
author | Eneas U de Queiroz | 2019-12-20 16:02:15 -0300 |
---|---|---|
committer | Herbert Xu | 2019-12-27 18:18:04 +0800 |
commit | 3ee50c896d712dc2fc8f34c2cd1918d035e74045 (patch) | |
tree | 37183552f664b04bd57d5d75ad1f0624759ba9b4 /net/xdp | |
parent | 7de4c2bd196f111e39cc60f6197654aff23ba2b4 (diff) |
crypto: qce - save a sg table slot for result buf
When ctr-aes-qce is used for gcm-mode, an extra sg entry for the
authentication tag is present, causing trouble when the qce driver
prepares the dst-results sg table for dma.
It computes the number of entries needed with sg_nents_for_len, leaving
out the tag entry. Then it creates a sg table with that number plus
one, used to store a result buffer.
When copying the sg table, there's no limit to the number of entries
copied, so the extra slot is filled with the authentication tag sg.
When the driver tries to add the result sg, the list is full, and it
returns EINVAL.
By limiting the number of sg entries copied to the dest table, the slot
for the result buffer is guaranteed to be unused.
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'net/xdp')
0 files changed, 0 insertions, 0 deletions