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, 26 Apr 2018 14:15:17 +0100
From:   Stefan Hajnoczi <stefanha@...il.com>
To:     Pankaj Gupta <pagupta@...hat.com>
Cc:     linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        qemu-devel@...gnu.org, linux-nvdimm@...1.01.org,
        linux-mm@...ck.org, jack@...e.cz, stefanha@...hat.com,
        dan.j.williams@...el.com, riel@...riel.com,
        haozhong.zhang@...el.com, nilal@...hat.com, kwolf@...hat.com,
        pbonzini@...hat.com, ross.zwisler@...el.com, david@...hat.com,
        xiaoguangrong.eric@...il.com, hch@...radead.org, marcel@...hat.com,
        mst@...hat.com, niteshnarayanlal@...mail.com, imammedo@...hat.com,
        lcapitulino@...hat.com
Subject: Re: [RFC v2 2/2] pmem: device flush over VIRTIO

On Wed, Apr 25, 2018 at 04:54:14PM +0530, Pankaj Gupta wrote:
> This patch adds functionality to perform 
> flush from guest to hosy over VIRTIO 
> when 'ND_REGION_VIRTIO'flag is set on 
> nd_negion. Flag is set by 'virtio-pmem'
> driver.
> 
> Signed-off-by: Pankaj Gupta <pagupta@...hat.com>
> ---
>  drivers/nvdimm/region_devs.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c
> index a612be6..6c6454e 100644
> --- a/drivers/nvdimm/region_devs.c
> +++ b/drivers/nvdimm/region_devs.c
> @@ -20,6 +20,7 @@
>  #include <linux/nd.h>
>  #include "nd-core.h"
>  #include "nd.h"
> +#include <linux/virtio_pmem.h>
>  
>  /*
>   * For readq() and writeq() on 32-bit builds, the hi-lo, lo-hi order is
> @@ -1074,6 +1075,12 @@ void nvdimm_flush(struct nd_region *nd_region)
>  	struct nd_region_data *ndrd = dev_get_drvdata(&nd_region->dev);
>  	int i, idx;
>  
> +       /* call PV device flush */
> +	if (test_bit(ND_REGION_VIRTIO, &nd_region->flags)) {
> +		virtio_pmem_flush(&nd_region->dev);
> +		return;
> +	}

How does libnvdimm know when flush has completed?

Callers expect the flush to be finished when nvdimm_flush() returns but
the virtio driver has only queued the request, it hasn't waited for
completion!

Download attachment "signature.asc" of type "application/pgp-signature" (456 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ