]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
tools/testing/nvdimm: Add test support for Intel nvdimm security DSMs
authorDave Jiang <dave.jiang@intel.com>
Mon, 10 Dec 2018 20:20:42 +0000 (13:20 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 21 Dec 2018 20:44:41 +0000 (12:44 -0800)
commit3c13e2ac747a37e683597d3d875f839f2bc150e1
tree67d6fdf940bc28d3c042276dca743a3af2839f5b
parent89fa9d8ea7bdfa841d19044485cec5f4171069e5
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>
drivers/nvdimm/dimm_devs.c
tools/testing/nvdimm/Kbuild
tools/testing/nvdimm/dimm_devs.c [new file with mode: 0644]
tools/testing/nvdimm/test/nfit.c