diff options
author | Dave Jiang <dave.jiang@intel.com> | 2018-12-07 22:02:12 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2018-12-21 21:44:41 +0100 |
commit | 64e77c8c047fb91ea8c7800c1238108a72f0bf9c (patch) | |
tree | 59aef33ac371f18b005319560addc9c9c85dea9b /drivers/nvdimm/nd-core.h | |
parent | acpi/nfit, libnvdimm: Add enable/update passphrase support for Intel nvdimms (diff) | |
download | linux-64e77c8c047fb91ea8c7800c1238108a72f0bf9c.tar.xz linux-64e77c8c047fb91ea8c7800c1238108a72f0bf9c.zip |
acpi/nfit, libnvdimm: Add support for issue secure erase DSM to Intel nvdimm
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 <keyid>" is written to the
"security" sysfs attribute.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/nd-core.h')
-rw-r--r-- | drivers/nvdimm/nd-core.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/nvdimm/nd-core.h b/drivers/nvdimm/nd-core.h index c2567f9ae07b..b4b633ccfbe9 100644 --- a/drivers/nvdimm/nd-core.h +++ b/drivers/nvdimm/nd-core.h @@ -61,6 +61,7 @@ int nvdimm_security_freeze(struct nvdimm *nvdimm); int nvdimm_security_disable(struct nvdimm *nvdimm, unsigned int keyid); int nvdimm_security_update(struct nvdimm *nvdimm, unsigned int keyid, unsigned int new_keyid); +int nvdimm_security_erase(struct nvdimm *nvdimm, unsigned int keyid); #else static inline int nvdimm_security_disable(struct nvdimm *nvdimm, unsigned int keyid) @@ -72,6 +73,10 @@ static inline int nvdimm_security_update(struct nvdimm *nvdimm, unsigned int key { return -EOPNOTSUPP; } +static inline int nvdimm_security_erase(struct nvdimm *nvdimm, unsigned int keyid) +{ + return -EOPNOTSUPP; +} #endif /** |