[virtio-dev] Re: [PATCH v4 1/1] crypto: add virtio-crypto driver

2016-12-01 Thread Stefan Hajnoczi
On Thu, Dec 01, 2016 at 02:27:19AM +, Gonglei (Arei) wrote: > > On Tue, Nov 29, 2016 at 08:48:14PM +0800, Gonglei wrote: > > > diff --git a/drivers/crypto/virtio/virtio_crypto_algs.c > > b/drivers/crypto/virtio/virtio_crypto_algs.c > > > new file mode 100644 > > > index 000..08b077f > > >

[virtio-dev] Re: [PATCH v4 1/1] crypto: add virtio-crypto driver

2016-12-01 Thread Stefan Hajnoczi
On Thu, Dec 01, 2016 at 02:27:19AM +, Gonglei (Arei) wrote: > > On Tue, Nov 29, 2016 at 08:48:14PM +0800, Gonglei wrote: > > > +static int virtio_crypto_alg_ablkcipher_init_session( > > > + struct virtio_crypto_ablkcipher_ctx *ctx, > > > + uint32_t alg, const uint8_t *key, > >

[virtio-dev] [PATCH v5 0/1] virtio-crypto: add Linux driver

2016-12-01 Thread Gonglei
v5: - add comments for algs_lock and table_lock. [Stefan] - use kzfree instead of kfree for key material security. [Stefan] - drop unnecessary spin_lock for struct virtio_crypto_ablkcipher_ctx. - dynamically allocated memory for iv in order to avoid to do DMA from the stack memory in

[virtio-dev] [PATCH v5 1/1] crypto: add virtio-crypto driver

2016-12-01 Thread Gonglei
This patch introduces virtio-crypto driver for Linux Kernel. The virtio crypto device is a virtual cryptography device as well as a kind of virtual hardware accelerator for virtual machines. The encryption anddecryption requests are placed in the data queue and are ultimately handled by