Re: FAILED: patch "[PATCH] dax: Don't access a freed inode" failed to apply to 4.19-stable tree

2018-12-13 Thread Greg KH
On Tue, Dec 11, 2018 at 07:23:49AM -0800, Matthew Wilcox wrote: > On Tue, Dec 11, 2018 at 03:00:09PM +0100, gre...@linuxfoundation.org wrote: > > > > The patch below does not apply to the 4.19-stable tree. > > If someone wants it applied there, or to any other stable or longterm > > tree, then

Re: [dm-devel] Snapshot target and DAX-capable devices

2018-12-13 Thread Theodore Y. Ts'o
On Wed, Dec 12, 2018 at 05:43:22PM -0500, Mike Snitzer wrote: > > I would expect that dm-snapshot will be used quite a lot for > > short-lived snapshots (that only live during a database backup or an > > fsck run). I would hardly call that a "niche use case". > > dm-snapshot is only ~60%

Re: [PATCH v15 01/16] acpi/nfit: Add support for Intel DSM 1.8 commands

2018-12-13 Thread Dan Williams
On Thu, Dec 13, 2018 at 3:48 PM Dave Jiang wrote: > > Add command definition for security commands defined in Intel DSM > specification v1.8 [1]. This includes "get security state", "set > passphrase", "unlock unit", "freeze lock", "secure erase", "overwrite", > "overwrite query", "master

[PATCH v15 14/16] tools/testing/nvdimm: Add overwrite support for nfit_test

2018-12-13 Thread Dave Jiang
With the implementation of Intel NVDIMM DSM overwrite, we are adding unit test to nfit_test for testing of overwrite operation. Signed-off-by: Dave Jiang --- tools/testing/nvdimm/test/nfit.c | 55 ++ 1 file changed, 55 insertions(+) diff --git

[PATCH v15 16/16] libnvdimm/security: Add documentation for nvdimm security support

2018-12-13 Thread Dave Jiang
Add theory of operation for the security support that's going into libnvdimm. Signed-off-by: Dave Jiang Reviewed-by: Jing Lin Signed-off-by: Dan Williams --- Documentation/nvdimm/security.txt | 141 + 1 file changed, 141 insertions(+) create mode 100644

[PATCH v15 12/16] acpi/nfit, libnvdimm/security: add Intel DSM 1.8 master passphrase support

2018-12-13 Thread Dave Jiang
With Intel DSM 1.8 [1] two new security DSMs are introduced. Enable/update master passphrase and master secure erase. The master passphrase allows a secure erase to be performed without the user passphrase that is set on the NVDIMM. The commands of master_update and master_erase are added to the

[PATCH v15 13/16] tools/testing/nvdimm: Add test support for Intel nvdimm security DSMs

2018-12-13 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.

[PATCH v15 15/16] tools/testing/nvdimm: add Intel DSM 1.8 support for nfit_test

2018-12-13 Thread Dave Jiang
Adding test support for new Intel DSM from v1.8. The ability of simulating master passphrase update and master secure erase have been added to nfit_test. Signed-off-by: Dave Jiang --- tools/testing/nvdimm/test/nfit.c | 86 ++ 1 file changed, 86

[PATCH v15 08/16] acpi/nfit, libnvdimm: Add disable passphrase support to Intel nvdimm.

2018-12-13 Thread Dave Jiang
Add support to disable passphrase (security) for the Intel nvdimm. The passphrase used for disabling is pulled from an encrypted-key in the kernel user keyring. The action is triggered by writing "disable " to the sysfs attribute "security". Signed-off-by: Dave Jiang Signed-off-by: Dan Williams

[PATCH v15 09/16] acpi/nfit, libnvdimm: Add enable/update passphrase support for Intel nvdimms

2018-12-13 Thread Dave Jiang
Add support for enabling and updating passphrase on the Intel nvdimms. The passphrase is the an encrypted key in the kernel user keyring. We trigger the update via writing "update " to the sysfs attribute "security". If no exists (for enabling security) then a 0 should be used. Signed-off-by:

[PATCH v15 10/16] acpi/nfit, libnvdimm: Add support for issue secure erase DSM to Intel nvdimm

2018-12-13 Thread Dave Jiang
Add support to issue a secure erase DSM to the Intel nvdimm. The required passphrase is acquired from an encrypted key in the kernel user keyring. To trigger the action, "erase " is written to the "security" sysfs attribute. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams ---

[PATCH v15 11/16] acpi/nfit, libnvdimm/security: Add security DSM overwrite support

2018-12-13 Thread Dave Jiang
We are adding support for the security calls of ovewrite and query overwrite introduced from Intel DSM spec v1.7. This will allow triggering of overwrite on Intel NVDIMMs. The overwrite operation can take tens of minutes. When the overwrite DSM is issued successfully, the NVDIMMs will be

[PATCH v15 06/16] acpi/nfit, libnvdimm: Add freeze security support to Intel nvdimm

2018-12-13 Thread Dave Jiang
Add support for freeze security on Intel nvdimm. This locks out any changes to security for the DIMM until a hard reset of the DIMM is performed. This is triggered by writing "freeze" to the generic nvdimm/nmemX "security" sysfs attribute. Signed-off-by: Dave Jiang Co-developed-by: Dan Williams

[PATCH v15 04/16] keys-encrypted: add nvdimm key format type to encrypted keys

2018-12-13 Thread Dave Jiang
Adding nvdimm key format type to encrypted keys in order to limit the size of the key to 32bytes. Signed-off-by: Dave Jiang Acked-by: Mimi Zohar Signed-off-by: Dan Williams --- Documentation/security/keys/trusted-encrypted.rst |6 security/keys/encrypted-keys/encrypted.c |

[PATCH v15 03/16] keys: Export lookup_user_key to external users

2018-12-13 Thread Dave Jiang
Export lookup_user_key() symbol in order to allow nvdimm passphrase update to retrieve user injected keys. Signed-off-by: Dave Jiang Acked-by: David Howells Signed-off-by: Dan Williams --- include/linux/key.h |3 +++ security/keys/internal.h |2 --

[PATCH v15 07/16] acpi/nfit, libnvdimm: Add unlock of nvdimm support for Intel DIMMs

2018-12-13 Thread Dave Jiang
From: Dan Williams Add support to unlock the dimm via the kernel key management APIs. The passphrase is expected to be pulled from userspace through keyutils. The key management and sysfs attributes are libnvdimm generic. Encrypted keys are used to protect the nvdimm passphrase at rest. The

[PATCH v15 05/16] acpi/nfit, libnvdimm: Introduce nvdimm_security_ops

2018-12-13 Thread Dave Jiang
Some NVDIMMs, like the ones defined by the NVDIMM_FAMILY_INTEL command set, expose a security capability to lock the DIMMs at poweroff and require a passphrase to unlock them. The security model is derived from ATA security. In anticipation of other DIMMs implementing a similar scheme, and to

[PATCH v15 00/16] Adding security support for nvdimm

2018-12-13 Thread Dave Jiang
The following series implements security support for nvdimm based on Intel DSM spec v1.8. The passphrase is protected by encrypted-key and managed through the kernel key management framework. The security features supported are security state show, passphrase enable/update, passphrase disable,

[PATCH v15 02/16] acpi/nfit, libnvdimm: Store dimm id as a member to struct nvdimm

2018-12-13 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. As nvdimm_create() continues to grow parameters relative to NFIT driver

[PATCH v15 01/16] acpi/nfit: Add support for Intel DSM 1.8 commands

2018-12-13 Thread Dave Jiang
Add command definition for security commands defined in Intel DSM specification v1.8 [1]. This includes "get security state", "set passphrase", "unlock unit", "freeze lock", "secure erase", "overwrite", "overwrite query", "master passphrase enable/disable", and "master erase", . Since this adds

Re: [PATCH v14 12/17] acpi/nfit, libnvdimm/security: Add security DSM overwrite support

2018-12-13 Thread Dan Williams
On Thu, Dec 13, 2018 at 8:49 AM Dave Jiang wrote: > > We are adding support for the security calls of ovewrite and query > overwrite introduced from Intel DSM spec v1.7. This will allow triggering > of overwrite on Intel NVDIMMs. The overwrite operation can take tens > of minutes. When the

[PATCH v14 17/17] libnvdimm/security: Add documentation for nvdimm security support

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

[PATCH v14 16/17] tools/testing/nvdimm: add Intel DSM 1.8 support for nfit_test

2018-12-13 Thread Dave Jiang
Adding test support for new Intel DSM from v1.8. The ability of simulating master passphrase update and master secure erase have been added to nfit_test. Signed-off-by: Dave Jiang --- tools/testing/nvdimm/test/nfit.c | 86 ++ 1 file changed, 86

[PATCH v14 15/17] tools/testing/nvdimm: Add overwrite support for nfit_test

2018-12-13 Thread Dave Jiang
With the implementation of Intel NVDIMM DSM overwrite, we are adding unit test to nfit_test for testing of overwrite operation. Signed-off-by: Dave Jiang --- tools/testing/nvdimm/test/nfit.c | 55 ++ 1 file changed, 55 insertions(+) diff --git

[PATCH v14 10/17] acpi/nfit, libnvdimm: Add support for issue secure erase DSM to Intel nvdimm

2018-12-13 Thread Dave Jiang
Add support to issue a secure erase DSM to the Intel nvdimm. The required passphrase is acquired from an encrypted key in the kernel user keyring. To trigger the action, "erase " is written to the "security" sysfs attribute. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams ---

[PATCH v14 11/17] libnvdimm/security: introduce NDD_SECURITY_BUSY flag

2018-12-13 Thread Dave Jiang
Adding a flag for nvdimm->flags to support erase functions. While it's ok to hold the nvdimm_bus lock for secure erase due to minimal time to execute the command, overwrite requires a significantly longer time and makes this impossible. The flag will block any drivers from being loaded and DIMMs

[PATCH v14 13/17] acpi/nfit, libnvdimm/security: add Intel DSM 1.8 master passphrase support

2018-12-13 Thread Dave Jiang
With Intel DSM 1.8 [1] two new security DSMs are introduced. Enable/update master passphrase and master secure erase. The master passphrase allows a secure erase to be performed without the user passphrase that is set on the NVDIMM. The commands of master_update and master_erase are added to the

[PATCH v14 08/17] acpi/nfit, libnvdimm: Add disable passphrase support to Intel nvdimm.

2018-12-13 Thread Dave Jiang
Add support to disable passphrase (security) for the Intel nvdimm. The passphrase used for disabling is pulled from an encrypted-key in the kernel user keyring. The action is triggered by writing "disable " to the sysfs attribute "security". Signed-off-by: Dave Jiang Signed-off-by: Dan Williams

[PATCH v14 05/17] acpi/nfit, libnvdimm: Introduce nvdimm_security_ops

2018-12-13 Thread Dave Jiang
Some NVDIMMs, like the ones defined by the NVDIMM_FAMILY_INTEL command set, expose a security capability to lock the DIMMs at poweroff and require a passphrase to unlock them. The security model is derived from ATA security. In anticipation of other DIMMs implementing a similar scheme, and to

[PATCH v14 12/17] acpi/nfit, libnvdimm/security: Add security DSM overwrite support

2018-12-13 Thread Dave Jiang
We are adding support for the security calls of ovewrite and query overwrite introduced from Intel DSM spec v1.7. This will allow triggering of overwrite on Intel NVDIMMs. The overwrite operation can take tens of minutes. When the overwrite DSM is issued successfully, the NVDIMMs will be

[PATCH v14 14/17] tools/testing/nvdimm: Add test support for Intel nvdimm security DSMs

2018-12-13 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.

[PATCH v14 09/17] acpi/nfit, libnvdimm: Add enable/update passphrase support for Intel nvdimms

2018-12-13 Thread Dave Jiang
Add support for enabling and updating passphrase on the Intel nvdimms. The passphrase is the an encrypted key in the kernel user keyring. We trigger the update via writing "update " to the sysfs attribute "security". If no exists (for enabling security) then a 0 should be used. Signed-off-by:

[PATCH v14 07/17] acpi/nfit, libnvdimm: Add unlock of nvdimm support for Intel DIMMs

2018-12-13 Thread Dave Jiang
From: Dan Williams Add support to unlock the dimm via the kernel key management APIs. The passphrase is expected to be pulled from userspace through keyutils. The key management and sysfs attributes are libnvdimm generic. Encrypted keys are used to protect the nvdimm passphrase at rest. The

[PATCH v14 06/17] acpi/nfit, libnvdimm: Add freeze security support to Intel nvdimm

2018-12-13 Thread Dave Jiang
Add support for freeze security on Intel nvdimm. This locks out any changes to security for the DIMM until a hard reset of the DIMM is performed. This is triggered by writing "freeze" to the generic nvdimm/nmemX "security" sysfs attribute. Signed-off-by: Dave Jiang Co-developed-by: Dan Williams

[PATCH v14 02/17] acpi/nfit, libnvdimm: Store dimm id as a member to struct nvdimm

2018-12-13 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. As nvdimm_create() continues to grow parameters relative to NFIT driver

[PATCH v14 03/17] keys: Export lookup_user_key to external users

2018-12-13 Thread Dave Jiang
Export lookup_user_key() symbol in order to allow nvdimm passphrase update to retrieve user injected keys. Signed-off-by: Dave Jiang Acked-by: David Howells Signed-off-by: Dan Williams --- include/linux/key.h |3 +++ security/keys/internal.h |2 --

[PATCH v14 04/17] keys-encrypted: add nvdimm key format type to encrypted keys

2018-12-13 Thread Dave Jiang
Adding nvdimm key format type to encrypted keys in order to limit the size of the key to 32bytes. Signed-off-by: Dave Jiang Acked-by: Mimi Zohar Signed-off-by: Dan Williams --- Documentation/security/keys/trusted-encrypted.rst |6 security/keys/encrypted-keys/encrypted.c |

[PATCH v14 01/17] acpi/nfit: Add support for Intel DSM 1.8 commands

2018-12-13 Thread Dave Jiang
Add command definition for security commands defined in Intel DSM specification v1.8 [1]. This includes "get security state", "set passphrase", "unlock unit", "freeze lock", "secure erase", "overwrite", "overwrite query", "master passphrase enable/disable", and "master erase", . Since this adds

[PATCH v14 00/17] Adding security support for nvdimm

2018-12-13 Thread Dave Jiang
The following series implements security support for nvdimm based on Intel DSM spec v1.8. The passphrase is protected by encrypted-key and managed through the kernel key management framework. The security features supported are security state show, passphrase enable/update, passphrase disable,