OSDN Git Service

crypto: virtio - Register an algo only if it's supported
authorFarhan Ali <alifm@linux.vnet.ibm.com>
Tue, 19 Jun 2018 15:41:34 +0000 (11:41 -0400)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 1 Jul 2018 13:00:46 +0000 (21:00 +0800)
commitd0d859bb87ac3b4df1cb6692531fc95d093357c5
tree98479955d47077a57822c4a3472fce79477c8808
parentb551bac14acab9c601269e2007a6b6cad2250a4c
crypto: virtio - Register an algo only if it's supported

Register a crypto algo with the Linux crypto layer only if
the algorithm is supported by the backend virtio-crypto
device.

Also route crypto requests to a virtio-crypto
device, only if it can support the requested service and
algorithm.

Signed-off-by: Farhan Ali <alifm@linux.ibm.com>
Acked-by: Gonglei <arei.gonglei@huawei.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/virtio/virtio_crypto_algs.c
drivers/crypto/virtio/virtio_crypto_common.h
drivers/crypto/virtio/virtio_crypto_mgr.c