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>
This commit is contained in:
@@ -59,12 +59,19 @@ static inline enum nvdimm_security_state nvdimm_security_state(
|
||||
int nvdimm_security_freeze(struct nvdimm *nvdimm);
|
||||
#if IS_ENABLED(CONFIG_NVDIMM_KEYS)
|
||||
int nvdimm_security_disable(struct nvdimm *nvdimm, unsigned int keyid);
|
||||
int nvdimm_security_update(struct nvdimm *nvdimm, unsigned int keyid,
|
||||
unsigned int new_keyid);
|
||||
#else
|
||||
static inline int nvdimm_security_disable(struct nvdimm *nvdimm,
|
||||
unsigned int keyid)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
static inline int nvdimm_security_update(struct nvdimm *nvdimm, unsigned int keyid,
|
||||
unsigned int new_keyid)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user