acpi/nfit, libnvdimm: Add enable/update passphrase support for Intel nvdimms
authorDave Jiang <dave.jiang@intel.com>
Fri, 7 Dec 2018 20:29:09 +0000 (13:29 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 21 Dec 2018 20:44:41 +0000 (12:44 -0800)
commitd2a4ac73f56a5d0709d28b41fec8d15e4500f8f1
tree6ae066b618c3c0c68865b0783f88da25d2d69a7a
parent03b65b22ada8115a7a7bfdf0789f6a94adfd6070
acpi/nfit, libnvdimm: Add enable/update passphrase support for Intel nvdimms

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 <old_keyid> <new_keyid>" to the
sysfs attribute "security". If no <old_keyid> exists (for enabling
security) then a 0 should be used.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/dimm_devs.c
drivers/nvdimm/nd-core.h
drivers/nvdimm/security.c