RE: [ndctl PATCH v2 2/2] ndctl, monitor: refactor read_config_file

2019-01-09 Thread qi.f...@fujitsu.com
> -Original Message- > From: Verma, Vishal L [mailto:vishal.l.ve...@intel.com] > Sent: Tuesday, January 8, 2019 7:02 AM > To: linux-nvdimm@lists.01.org; Qi, Fuli/斉 福利 > Subject: Re: [ndctl PATCH v2 2/2] ndctl, monitor: refactor read_config_file > > > On Mon, 2019-01-07 at 17:38 +0900,

RE: [ndctl PATCH v2 1/2] ndctl: add the ciniparser tool from ccan

2019-01-09 Thread qi.f...@fujitsu.com
> > > > > > > > > > Hi Qi, > > > > > > > > > > Thanks for these patches, and also for rebasing to the latest! > > > > > > > > > > ciniparser.c adds a new warning (see below). Could you fix that > > > > > up in a new patch on top of the initial import (i.e. we retain > > > > > the as-is import, and

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-09 Thread Dave Chinner
On Wed, Jan 09, 2019 at 08:17:31PM +0530, Pankaj Gupta wrote: > This patch series has implementation for "virtio pmem". > "virtio pmem" is fake persistent memory(nvdimm) in guest > which allows to bypass the guest page cache. This also > implements a VIRTIO based asynchronous flush

Re: PMEM error-handling forces SIGKILL causes kernel panic

2019-01-09 Thread Dan Williams
[ switch to text mail, add lkml and Naoya ] On Wed, Jan 9, 2019 at 12:19 PM Jane Chu wrote: > > Hi, Dan, > > Sorry for the late report. > We recently saw panics from PMEM error handling, here are the log messages > and stack trace. "<--" are added by me. > > > [ 4488.098830] mce: Uncorrected

Re: [PATCH v7 03/12] ndctl: add disable security support

2019-01-09 Thread Verma, Vishal L
On Wed, 2019-01-09 at 10:54 -0700, Dave Jiang wrote: > Add support for disable security to libndctl and also command line option > of "disable-passphrase" for ndctl. This provides a way to disable security > on the nvdimm. > > Signed-off-by: Dave Jiang > --- > Documentation/ndctl/Makefile.am

Re: [PATCH v7 07/12] ndctl: setup modprobe rules

2019-01-09 Thread Verma, Vishal L
On Wed, 2019-01-09 at 10:54 -0700, Dave Jiang wrote: > Adding reference config file for modprobe.d in order to trigger the > reference script that will inject keys associated with the nvdimms > into > the kernel user ring for unlock. > > Signed-off-by: Dave Jiang > --- > Makefile.am

Re: [PATCH v7 06/12] ndctl: add unit test for security ops (minus overwrite)

2019-01-09 Thread Verma, Vishal L
On Wed, 2019-01-09 at 10:54 -0700, Dave Jiang wrote: > Add unit test for security enable, disable, update, erase, unlock, and > freeze. > > Signed-off-by: Dave Jiang > --- > test/Makefile.am |4 + > test/security.sh | 203 > ++ > 2

PMEM error-handling forces SIGKILL causes kernel panic

2019-01-09 Thread Jane Chu
Hi, Dan, Sorry for the late report. We recently saw panics from PMEM error handling, here are the log messages and stack trace. "<--" are added by me. [ 4488.098830] mce: Uncorrected hardware memory error in user-access at a6ec46f8 <-- [ 4488.131625] Memory failure: 0xa6ec46f: forcibly

Re: [PATCH v3 3/5] libnvdimm: add nd_region buffered dax_dev flag

2019-01-09 Thread Pankaj Gupta
> > > > This patch adds 'DAXDEV_BUFFERED' flag which is set > > for virtio pmem corresponding nd_region. This later > > is used to disable MAP_SYNC functionality for ext4 > > & xfs filesystem. > > > > Signed-off-by: Pankaj Gupta > > --- > > drivers/dax/super.c | 17 + >

Re: [PATCH v3 5/5] xfs: disable map_sync for virtio pmem

2019-01-09 Thread Pankaj Gupta
> > Virtio pmem provides asynchronous host page cache flush > > mechanism. we don't support 'MAP_SYNC' with virtio pmem > > and xfs. > > > > Signed-off-by: Pankaj Gupta > > --- > > fs/xfs/xfs_file.c | 8 > > 1 file changed, 8 insertions(+) > > > > diff --git a/fs/xfs/xfs_file.c

[PATCH v7 10/12] ndctl: master phassphrase management support

2019-01-09 Thread Dave Jiang
Adding master passphrase enabling and update to ndctl. This is a new feature from Intel DSM v1.8. Signed-off-by: Dave Jiang --- Documentation/ndctl/ndctl-enable-passphrase.txt |7 + Documentation/ndctl/ndctl-update-passphrase.txt |7 + ndctl/dimm.c|

[PATCH v7 12/12] ndctl: documentation for security and key management

2019-01-09 Thread Dave Jiang
Add a "Theory of Operation" section describing the Intel DSM operations to the relevant man pages. Signed-off-by: Dave Jiang --- Documentation/ndctl/intel-nvdimm-security.txt| 140 ++ Documentation/ndctl/ndctl-disable-passphrase.txt |2

[PATCH v7 11/12] ndctl: add master secure erase support

2019-01-09 Thread Dave Jiang
Intel DSM v1.8 introduced the concept of master passphrase and allowing nvdimm to be secure erased via the master passphrase in addition to the user passphrase. Add ndctl support to provide master passphrase secure erase. Signed-off-by: Dave Jiang --- Documentation/ndctl/ndctl-sanitize-dimm.txt

[PATCH v7 09/12] ndctl: add wait-overwrite support

2019-01-09 Thread Dave Jiang
Add a blocking 'wait-overwrite' command to ndctl to let a user wait for an overwrite operation on a dimm to complete. Signed-off-by: Dave Jiang --- Documentation/ndctl/Makefile.am |3 + Documentation/ndctl/ndctl-wait-overwrite.txt | 31 ++ ndctl/builtin.h

[PATCH v7 07/12] ndctl: setup modprobe rules

2019-01-09 Thread Dave Jiang
Adding reference config file for modprobe.d in order to trigger the reference script that will inject keys associated with the nvdimms into the kernel user ring for unlock. Signed-off-by: Dave Jiang --- Makefile.am | 10 ++ contrib/ndctl-loadkeys.sh| 25

[PATCH v7 06/12] ndctl: add unit test for security ops (minus overwrite)

2019-01-09 Thread Dave Jiang
Add unit test for security enable, disable, update, erase, unlock, and freeze. Signed-off-by: Dave Jiang --- test/Makefile.am |4 + test/security.sh | 203 ++ 2 files changed, 207 insertions(+) create mode 100755 test/security.sh diff

[PATCH v7 04/12] ndctl: add support for freeze security

2019-01-09 Thread Dave Jiang
Add support for freeze security to libndctl and also command line option of "freeze-security" for ndctl. This will lock the ability to make changes to the NVDIMM security. Signed-off-by: Dave Jiang --- Documentation/ndctl/Makefile.am |3 ++-

[PATCH v7 01/12] ndctl: add support for display security state

2019-01-09 Thread Dave Jiang
Adding libndctl API call for retrieving security state for a DIMM and also adding support to ndctl list for displaying security state. Signed-off-by: Dave Jiang --- Documentation/ndctl/ndctl-list.txt |8 ndctl/lib/dimm.c | 37

[PATCH v7 05/12] ndctl: add support for sanitize dimm

2019-01-09 Thread Dave Jiang
Add support to secure erase to libndctl and also command line option of "sanitize-dimm" for ndctl. This will initiate the request to crypto erase a DIMM. Signed-off-by: Dave Jiang --- Documentation/ndctl/Makefile.am |3 +- Documentation/ndctl/ndctl-sanitize-dimm.txt | 37

[PATCH v7 03/12] ndctl: add disable security support

2019-01-09 Thread Dave Jiang
Add support for disable security to libndctl and also command line option of "disable-passphrase" for ndctl. This provides a way to disable security on the nvdimm. Signed-off-by: Dave Jiang --- Documentation/ndctl/Makefile.am |3 +-

[PATCH v7 02/12] ndctl: add passphrase update to ndctl

2019-01-09 Thread Dave Jiang
Add API call for triggering sysfs knob to update the security for a DIMM in libndctl. Also add the ndctl "update-passphrase" to trigger the operation. Signed-off-by: Dave Jiang --- Documentation/ndctl/Makefile.am |4 Documentation/ndctl/ndctl-enable-passphrase.txt | 42 ++

[PATCH v7 00/12] ndctl: add security support

2019-01-09 Thread Dave Jiang
The following series implements mechanisms that utilize the sysfs knobs provided by the kernel in order to support the Intel DSM v1.8 spec that provides security to NVDIMM. The following abilities are added: 1. display security state 2. enable/update passphrase 3. disable passphrase 4. freeze

Re: [PATCH v3 3/5] libnvdimm: add nd_region buffered dax_dev flag

2019-01-09 Thread Dan Williams
On Wed, Jan 9, 2019 at 5:53 AM Pankaj Gupta wrote: > > This patch adds 'DAXDEV_BUFFERED' flag which is set > for virtio pmem corresponding nd_region. This later > is used to disable MAP_SYNC functionality for ext4 > & xfs filesystem. > > Signed-off-by: Pankaj Gupta > --- > drivers/dax/super.c

Re: [PATCH v3 5/5] xfs: disable map_sync for virtio pmem

2019-01-09 Thread Darrick J. Wong
On Wed, Jan 09, 2019 at 08:17:36PM +0530, Pankaj Gupta wrote: > Virtio pmem provides asynchronous host page cache flush > mechanism. we don't support 'MAP_SYNC' with virtio pmem > and xfs. > > Signed-off-by: Pankaj Gupta > --- > fs/xfs/xfs_file.c | 8 > 1 file changed, 8 insertions(+)

Re: [PATCH v3 4/5] ext4: disable map_sync for virtio pmem

2019-01-09 Thread Pankaj Gupta
> > On Wed 09-01-19 19:26:05, Pankaj Gupta wrote: > > Virtio pmem provides asynchronous host page cache flush > > mechanism. We don't support 'MAP_SYNC' with virtio pmem > > and ext4. > > > > Signed-off-by: Pankaj Gupta > ... > > @@ -371,6 +373,13 @@ static int ext4_file_mmap(struct file

[PATCH v3 0/5] kvm "virtio pmem" device

2019-01-09 Thread Pankaj Gupta
This patch series has implementation for "virtio pmem". "virtio pmem" is fake persistent memory(nvdimm) in guest which allows to bypass the guest page cache. This also implements a VIRTIO based asynchronous flush mechanism. Sharing guest kernel driver in this patchset with the changes

[PATCH v3 3/5] libnvdimm: add nd_region buffered dax_dev flag

2019-01-09 Thread Pankaj Gupta
This patch adds 'DAXDEV_BUFFERED' flag which is set for virtio pmem corresponding nd_region. This later is used to disable MAP_SYNC functionality for ext4 & xfs filesystem. Signed-off-by: Pankaj Gupta --- drivers/dax/super.c | 17 + drivers/nvdimm/pmem.c| 3 +++

[PATCH v3 2/5] virtio-pmem: Add virtio pmem driver

2019-01-09 Thread Pankaj Gupta
This patch adds virtio-pmem driver for KVM guest. Guest reads the persistent memory range information from Qemu over VIRTIO and registers it on nvdimm_bus. It also creates a nd_region object with the persistent memory range information so that existing 'nvdimm/pmem' driver can reserve this into

[PATCH v3 5/5] xfs: disable map_sync for virtio pmem

2019-01-09 Thread Pankaj Gupta
Virtio pmem provides asynchronous host page cache flush mechanism. we don't support 'MAP_SYNC' with virtio pmem and xfs. Signed-off-by: Pankaj Gupta --- fs/xfs/xfs_file.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index e474250..eae4aa4

[PATCH v3 4/5] ext4: disable map_sync for virtio pmem

2019-01-09 Thread Pankaj Gupta
Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and ext4. Signed-off-by: Pankaj Gupta --- fs/ext4/file.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index

[PATCH v3 1/5] libnvdimm: nd_region flush callback support

2019-01-09 Thread Pankaj Gupta
This patch adds functionality to perform flush from guest to host over VIRTIO. We are registering a callback based on 'nd_region' type. virtio_pmem driver requires this special flush function. For rest of the region types we are registering existing flush function. Report error returned by host

Re: [Qemu-devel] [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-09 Thread Pankaj Gupta
Please ignore this series as my network went down while sending this. I will send this series again. Thanks, Pankaj > > This patch series has implementation for "virtio pmem". > "virtio pmem" is fake persistent memory(nvdimm) in guest > which allows to bypass the guest page cache. This

[PATCH v3 5/5] xfs: disable map_sync for virtio pmem

2019-01-09 Thread Pankaj Gupta
Virtio pmem provides asynchronous host page cache flush mechanism. we don't support 'MAP_SYNC' with virtio pmem and xfs. Signed-off-by: Pankaj Gupta --- fs/xfs/xfs_file.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index e474250..eae4aa4

[PATCH v3 3/5] libnvdimm: add nd_region buffered dax_dev flag

2019-01-09 Thread Pankaj Gupta
This patch adds 'DAXDEV_BUFFERED' flag which is set for virtio pmem corresponding nd_region. This later is used to disable MAP_SYNC functionality for ext4 & xfs filesystem. Signed-off-by: Pankaj Gupta --- drivers/dax/super.c | 17 + drivers/nvdimm/pmem.c| 3 +++

[PATCH v3 2/5] virtio-pmem: Add virtio pmem driver

2019-01-09 Thread Pankaj Gupta
This patch adds virtio-pmem driver for KVM guest. Guest reads the persistent memory range information from Qemu over VIRTIO and registers it on nvdimm_bus. It also creates a nd_region object with the persistent memory range information so that existing 'nvdimm/pmem' driver can reserve this into

[PATCH v3 1/5] libnvdimm: nd_region flush callback support

2019-01-09 Thread Pankaj Gupta
This patch adds functionality to perform flush from guest to host over VIRTIO. We are registering a callback based on 'nd_region' type. virtio_pmem driver requires this special flush function. For rest of the region types we are registering existing flush function. Report error returned by host

[PATCH v3 0/5] kvm "virtio pmem" device

2019-01-09 Thread Pankaj Gupta
This patch series has implementation for "virtio pmem". "virtio pmem" is fake persistent memory(nvdimm) in guest which allows to bypass the guest page cache. This also implements a VIRTIO based asynchronous flush mechanism. Sharing guest kernel driver in this patchset with the changes