Re: [PATCH v5 00/11] mm: Teach memory_failure() about ZONE_DEVICE pages

2018-07-12 Thread Dan Williams
On Wed, Jul 4, 2018 at 2:40 PM, Dan Williams wrote: > Changes since v4 [1]: > * Rework dax_lock_page() to reuse get_unlocked_mapping_entry() (Jan) > > * Change the calling convention to take a 'struct page *' and return > success / failure instead of performing the pfn_to_page() internal to >

Re: [ndctl PATCH v11 3/5] ndctl, monitor: add the unit file of systemd for ndctl-monitor service

2018-07-12 Thread Verma, Vishal L
On Wed, 2018-07-11 at 12:00 +0900, QI Fuli wrote: > This patch adds the systemd unit file for ndctl-monitor service. > The systemd unit directory can be configured by setting environment > variable "--with-systemd-unit-dir[=DIR]". > > A monitor daemon can be started as a system service: >#

Re: [ndctl PATCH v11 1/5] ndctl, monitor: add a new command - monitor

2018-07-12 Thread Verma, Vishal L
On Wed, 2018-07-11 at 12:00 +0900, QI Fuli wrote: > Ndctl monitor is used for monitoring the smart events of nvdimm DIMMs. ^ s/nvdimm DIMMs/NVDIMMs/ > When a smart event fires, monitor will output the notifications which > include dimm

Re: [ndctl PATCH v11 4/5] ndctl, documentation: add manpage for monitor

2018-07-12 Thread Verma, Vishal L
On Wed, 2018-07-11 at 12:00 +0900, QI Fuli wrote: > This patch is used to add manpage for ndctl monitor command. > > Signed-off-by: QI Fuli > --- > Documentation/ndctl/Makefile.am | 3 +- > Documentation/ndctl/ndctl-monitor.txt | 96 +++ > 2 files changed, 98

Re: [ndctl PATCH v11 0/5] ndctl, monitor: add ndctl monitor daemon

2018-07-12 Thread Verma, Vishal L
On Wed, 2018-07-11 at 12:00 +0900, QI Fuli wrote: > This is the v11 patch for ndctl monitor, a tiny daemon to monitor > the smart events of nvdimm DIMMs. Since NVDIMM does not have a > feature like mirroring, if it breaks down, the data will be > impossible to restore. Ndctl monitor daemon will

RE: [ndctl PATCH v11 5/5] ndctl, test: add a new unit test for monitor

2018-07-12 Thread Qi, Fuli
> On Thu, 2018-07-12 at 15:51 -0400, Masayoshi Mizuma wrote: > > Hi Qi, > > > > Nice work! Let me ask some comments. > > > > On 07/10/2018 11:00 PM, QI Fuli wrote: > > [...] > > > diff --git a/test/monitor.sh b/test/monitor.sh new file mode 100755 > > > index 000..43cb11f > > > --- /dev/null >

[PATCH v4 08/11] nfit/libnvdimm: add support for issue secure erase DSM to Intel nvdimm

2018-07-12 Thread Dave Jiang
Add support to issue a secure erase DSM to the Intel nvdimm. The required passphrase is acquired from userspace through the kernel key management. To trigger the action, "erase" is written to the "security" sysfs attribute. libnvdimm will support the erase generic API call. Signed-off-by: Dave

[PATCH v4 05/11] nfit/libnvdimm: add set passphrase support for Intel nvdimms

2018-07-12 Thread Dave Jiang
Add support for setting and/or updating passphrase on the Intel nvdimms. The passphrase is pulled from userspace through the kernel key management. We trigger the update via writing "update" to the sysfs attribute "security". The state of the security can also be read via the "security" attribute.

[PATCH v4 06/11] nfit/libnvdimm: add disable passphrase support to Intel nvdimm.

2018-07-12 Thread Dave Jiang
Add support to disable passphrase (security) for the Intel nvdimm. The passphrase used for disabling is pulled from userspace via the kernel key management. The action is triggered by writing "disable" to the sysfs attribute "security". libnvdimm will support the generic disable API call.

[PATCH v4 07/11] nfit/libnvdimm: add freeze security support to Intel nvdimm

2018-07-12 Thread Dave Jiang
Add support for freeze security on Intel nvdimm. This locks out any changes to security for the DIMM unless a reboot is done. This is triggered by writing "freeze" to the "security" sysfs attribute. libnvdimm will support the generic freeze_lock API call. Signed-off-by: Dave Jiang ---

[PATCH v4 10/11] nfit_test: add test support for Intel nvdimm security DSMs

2018-07-12 Thread Dave Jiang
Add nfit_test support for DSM functions "Get Security State", "Set Passphrase", "Disable Passphrase", "Unlock Unit", "Freeze Lock", and "Secure Erase" for the fake DIMMs. Also adding a sysfs knob in order to put the DIMMs in "locked" state. The order of testing DIMM unlocking would be. 1a. Set

[PATCH v4 09/11] nfit_test: add context to dimm_dev for nfit_test

2018-07-12 Thread Dave Jiang
In order to access the nfit_test context via sideband sysfs knobs, the dimm_dev needs to be more than struct device in order to point back to struct nfit_test. Wrapping the original struct device with a struct nfit_dimm_dev and saving the nfit_test as private driver data. Also changing the

[PATCH v4 11/11] libnvdimm: add documentation for nvdimm security support

2018-07-12 Thread Dave Jiang
Add theory of operation for the security support that's going into libnvdimm. Signed-off-by: Dave Jiang --- Documentation/nvdimm/security | 70 + 1 file changed, 70 insertions(+) create mode 100644 Documentation/nvdimm/security diff --git

[PATCH v4 04/11] nfit/libnvdimm: add unlock of nvdimm support for Intel DIMMs

2018-07-12 Thread Dave Jiang
Add support to allow query the security status of the Intel nvdimms and also unlock the dimm via the kernel key management APIs. The passphrase is expected to be pulled from userspace through keyutils. Moving the Intel related bits to its own source file as well. Signed-off-by: Dave Jiang ---

[PATCH v4 02/11] libnvdimm: create keyring to store security keys

2018-07-12 Thread Dave Jiang
Prepping the libnvdimm to support security management by adding a keyring in order to provide passphrase management through the kernel key management APIs. Signed-off-by: Dave Jiang --- drivers/nvdimm/core.c |7 +++ drivers/nvdimm/dimm_devs.c | 96

[PATCH v4 03/11] nfit/libnvdimm: store dimm id as a member to struct nvdimm

2018-07-12 Thread Dave Jiang
The generated dimm id is needed for the sysfs attribute as well as being used as the identifier/description for the security key. Since it's constant and should never change, store it as a member of struct nvdimm. Signed-off-by: Dave Jiang --- drivers/acpi/nfit/core.c | 35

[PATCH v4 00/11] Adding security support for nvdimm

2018-07-12 Thread Dave Jiang
The following series implements security support for nvdimm. Mostly adding new security DSM support from the Intel NVDIMM DSM spec v1.7, but also adding generic support libnvdimm for other vendors. The most important security features are unlocking locked nvdimms, and updating/setting security

[PATCH v4 01/11] nfit: add support for Intel DSM 1.7 commands

2018-07-12 Thread Dave Jiang
Add command definition for security commands defined in Intel DSM specification v1.7. This includes "get security state", "set passphrase", "unlock unit", "freeze lock", "secure erase", "ovewrite", and "overwrite query". Since we are adding a lot of Intel definitions, moving the relevant bits to

Re: [ndctl PATCH 2/2] ndctl, test: convert remaining tests to use test/common

2018-07-12 Thread Masayoshi Mizuma
Hi Vishal, Looks good to me. Please feel free to add: Reviewed-by: Masayoshi Mizuma Thanks, Masa On 07/11/2018 07:56 PM, Vishal Verma wrote: > The original test/common conversions missed the --enable-destructive > class of tests. The json single object vs. array changes prompted > changes to

Re: [ndctl PATCH v11 5/5] ndctl, test: add a new unit test for monitor

2018-07-12 Thread Verma, Vishal L
On Thu, 2018-07-12 at 15:51 -0400, Masayoshi Mizuma wrote: > Hi Qi, > > Nice work! Let me ask some comments. > > On 07/10/2018 11:00 PM, QI Fuli wrote: > [...] > > diff --git a/test/monitor.sh b/test/monitor.sh > > new file mode 100755 > > index 000..43cb11f > > --- /dev/null > > +++

Re: [ndctl PATCH v11 5/5] ndctl, test: add a new unit test for monitor

2018-07-12 Thread Masayoshi Mizuma
Hi Qi, Nice work! Let me ask some comments. On 07/10/2018 11:00 PM, QI Fuli wrote: [...] > diff --git a/test/monitor.sh b/test/monitor.sh > new file mode 100755 > index 000..43cb11f > --- /dev/null > +++ b/test/monitor.sh > @@ -0,0 +1,177 @@ > +#!/bin/bash -Ex > + > +#

[GIT PULL] libnvdimm fixes for 4.18-rc5

2018-07-12 Thread Jiang, Dave
Hi Linus, please pull from git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm tags/libnvdimm-fixes-4.18-rc5 ...to receive, three fixes, a test unit fix, and a ratelimit change on output. The following changes since commit 7daf201d7fe8334e2d2364d4e8ed3394ec9af819: Linux 4.18-rc2

Re: [ndctl PATCH] ndctl, documentation: fix the manpage of inject-smart

2018-07-12 Thread Verma, Vishal L
On Thu, 2018-07-12 at 14:40 +0900, QI Fuli wrote: > The ndctl inject-smart doesn't have a [-H | --health] option. > This patch replaces [-H | --health] in the manpage of inject-smart > with [-f | --fatal]. > > Signed-off-by: QI Fuli > --- > Documentation/ndctl/ndctl-inject-smart.txt | 12

[PATCHv3 1/2] libnvdimm: Use max contiguous area for namespace size

2018-07-12 Thread Keith Busch
This patch will find the max contiguous area to determine the largest pmem namespace size that can be created. If the requested size exceeds the largest available, ENOSPC error will be returned. This fixes the allocation underrun error and wrong error return code that have otherwise been observed

[PATCHv3 2/2] libnvdimm: Export max available extent

2018-07-12 Thread Keith Busch
The 'available_size' attribute showing the combined total of all unallocated space isn't always useful to know how large of a namespace a user may be able to allocate if the region is fragmented. This patch will export the largest extent of unallocated space that may be allocated to create a new

Re: [ndctl PATCH 1/2] ndctl, test: fix tests for the array vs object listing fix

2018-07-12 Thread Ross Zwisler
On Wed, Jul 11, 2018 at 05:56:43PM -0600, Vishal Verma wrote: > The commit below updated json listings to always be arrays unless, > potentially, --human was specified. As a fallout of the change, some > unit tests that used jq to look for certain elements, or the json2var > conversion broke in

Re: [PATCHv2 1/2] libnvdimm: Use max contiguous area for namespace size

2018-07-12 Thread Keith Busch
On Mon, Jul 09, 2018 at 02:49:54PM -0700, Dan Williams wrote: > On Mon, Jul 9, 2018 at 8:44 AM, Keith Busch wrote: > > On Fri, Jul 06, 2018 at 03:25:15PM -0700, Dan Williams wrote: > >> This is going in the right direction... but still needs to account for > >> the blk_overlap. > >> > >> So, on a