lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 15 Dec 2016 00:45:27 +0000
From:   "Gonglei (Arei)" <arei.gonglei@...wei.com>
To:     Halil Pasic <pasic@...ux.vnet.ibm.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "qemu-devel@...gnu.org" <qemu-devel@...gnu.org>,
        "virtio-dev@...ts.oasis-open.org" <virtio-dev@...ts.oasis-open.org>,
        "virtualization@...ts.linux-foundation.org" 
        <virtualization@...ts.linux-foundation.org>,
        "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>
CC:     "Huangweidong (C)" <weidong.huang@...wei.com>,
        Claudio Fontana <Claudio.Fontana@...wei.com>,
        "mst@...hat.com" <mst@...hat.com>,
        Luonengjun <luonengjun@...wei.com>,
        "Hanweidong (Randy)" <hanweidong@...wei.com>,
        "xin.zeng@...el.com" <xin.zeng@...el.com>,
        "Xuquan (Quan Xu)" <xuquan8@...wei.com>,
        "Wanzongshun (Vincent)" <wanzongshun@...wei.com>,
        "stefanha@...hat.com" <stefanha@...hat.com>,
        "Zhoujian (jay, Euler)" <jianjay.zhou@...wei.com>,
        "cornelia.huck@...ibm.com" <cornelia.huck@...ibm.com>,
        longpeng <longpeng2@...wei.com>,
        "arei.gonglei@...mail.com" <arei.gonglei@...mail.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "Wubin (H)" <wu.wubin@...wei.com>,
        "herbert@...dor.apana.org.au" <herbert@...dor.apana.org.au>
Subject: RE: [Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver


> 
> 
> On 12/14/2016 12:50 PM, Gonglei wrote:
> > diff --git a/drivers/crypto/virtio/virtio_crypto_core.c
> b/drivers/crypto/virtio/virtio_crypto_core.c
> > new file mode 100644
> > index 0000000..c0854a1
> > --- /dev/null
> > +++ b/drivers/crypto/virtio/virtio_crypto_core.c
> > @@ -0,0 +1,474 @@
> [..]
> > +
> > +static void virtcrypto_dataq_callback(struct virtqueue *vq)
> > +{
> > +	struct virtio_crypto *vcrypto = vq->vdev->priv;
> > +	struct virtio_crypto_request *vc_req;
> > +	unsigned long flags;
> > +	unsigned int len;
> > +	struct ablkcipher_request *ablk_req;
> > +	int error;
> > +
> > +	spin_lock_irqsave(&vcrypto->lock, flags);
> 
> Would it make sense to use a per virtqueue lock
> like in virtio_blk for example instead of locking on the whole
> device? OK, it seems you use only one dataqueue, so it
> may not be that relevant.
> 
Currently yes, both the backend device (cryptodev-backend-builtin)
and the frontend driver use one dataqueue.

Regards,
-Gonglei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ