diff options
author | Dave Jiang <dave.jiang@intel.com> | 2018-12-10 21:20:42 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2018-12-21 21:44:41 +0100 |
commit | 3c13e2ac747a37e683597d3d875f839f2bc150e1 (patch) | |
tree | 67d6fdf940bc28d3c042276dca743a3af2839f5b /drivers | |
parent | acpi/nfit, libnvdimm/security: add Intel DSM 1.8 master passphrase support (diff) | |
download | linux-3c13e2ac747a37e683597d3d875f839f2bc150e1.tar.xz linux-3c13e2ac747a37e683597d3d875f839f2bc150e1.zip |
tools/testing/nvdimm: Add test support for Intel nvdimm security DSMs
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. Disable DIMM X.
1b. Set Passphrase to DIMM X.
2. Write to
/sys/devices/platform/nfit_test.0/nfit_test_dimm/test_dimmX/lock_dimm
3. Renable DIMM X
4. Check DIMM X state via sysfs "security" attribute for nmemX.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/nvdimm/dimm_devs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvdimm/dimm_devs.c b/drivers/nvdimm/dimm_devs.c index bd3f156463b1..4890310df874 100644 --- a/drivers/nvdimm/dimm_devs.c +++ b/drivers/nvdimm/dimm_devs.c @@ -370,7 +370,7 @@ static ssize_t available_slots_show(struct device *dev, } static DEVICE_ATTR_RO(available_slots); -static ssize_t security_show(struct device *dev, +__weak ssize_t security_show(struct device *dev, struct device_attribute *attr, char *buf) { struct nvdimm *nvdimm = to_nvdimm(dev); |