]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: virtio - deal with unsupported input sizes
authorArd Biesheuvel <ardb@kernel.org>
Sat, 9 Nov 2019 17:09:27 +0000 (18:09 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 17 Nov 2019 01:02:45 +0000 (09:02 +0800)
commitd2d92c8fd0468702d71277b39e0f4a3faa20edbd
tree1d2b82bd2c034fe76663541a7f71cf5ff2f33f73
parentaec8d054096f17041058a99d26ffb41d82327523
crypto: virtio - deal with unsupported input sizes

Return -EINVAL for input sizes that are not a multiple of the AES
block size, since they are not supported by our CBC chaining mode.

While at it, remove the pr_err() that reports unsupported key sizes
being used: we shouldn't spam the kernel log with that.

Fixes: 659c9ea6816d ("crypto: add virtio-crypto driver")
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Gonglei <arei.gonglei@huawei.com>
Cc: virtualization@lists.linux-foundation.org
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/virtio/virtio_crypto_algs.c