]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-crypto: adjust dst_len at ops callback
authorlei he <helei.sig11@bytedance.com>
Fri, 6 May 2022 13:16:26 +0000 (21:16 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 31 May 2022 16:45:09 +0000 (12:45 -0400)
commit518f74fb3ade73b40d1438f1d480afc6536519f9
treeb7e152f78d90541dbe09767faa38f06c93a3ed5e
parent2878e902007b7ced5a403eefcbc749678d70319c
virtio-crypto: adjust dst_len at ops callback

For some akcipher operations(eg, decryption of pkcs1pad(rsa)),
the length of returned result maybe less than akcipher_req->dst_len,
we need to recalculate the actual dst_len through the virt-queue
protocol.

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: lei he <helei.sig11@bytedance.com>
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Message-Id: <20220506131627.180784-5-pizhenwei@bytedance.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/crypto/virtio/virtio_crypto_akcipher_algs.c