diff options
author | Dave Jiang <dave.jiang@intel.com> | 2018-12-06 08:39:29 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2018-12-14 02:54:13 +0100 |
commit | f2989396553a0bd13f4b25f567a3dee3d722ce40 (patch) | |
tree | c1790f66286bd33d40e0286349305acf71210abd /drivers/nvdimm/bus.c | |
parent | keys-encrypted: add nvdimm key format type to encrypted keys (diff) | |
download | linux-f2989396553a0bd13f4b25f567a3dee3d722ce40.tar.xz linux-f2989396553a0bd13f4b25f567a3dee3d722ce40.zip |
acpi/nfit, libnvdimm: Introduce nvdimm_security_ops
Some NVDIMMs, like the ones defined by the NVDIMM_FAMILY_INTEL command
set, expose a security capability to lock the DIMMs at poweroff and
require a passphrase to unlock them. The security model is derived from
ATA security. In anticipation of other DIMMs implementing a similar
scheme, and to abstract the core security implementation away from the
device-specific details, introduce nvdimm_security_ops.
Initially only a status retrieval operation, ->state(), is defined,
along with the base infrastructure and definitions for future
operations.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Co-developed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/bus.c')
-rw-r--r-- | drivers/nvdimm/bus.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index 9743d8083538..eae17d8ee539 100644 --- a/drivers/nvdimm/bus.c +++ b/drivers/nvdimm/bus.c @@ -331,6 +331,12 @@ struct nvdimm_bus *to_nvdimm_bus(struct device *dev) } EXPORT_SYMBOL_GPL(to_nvdimm_bus); +struct nvdimm_bus *nvdimm_to_bus(struct nvdimm *nvdimm) +{ + return to_nvdimm_bus(nvdimm->dev.parent); +} +EXPORT_SYMBOL_GPL(nvdimm_to_bus); + struct nvdimm_bus *nvdimm_bus_register(struct device *parent, struct nvdimm_bus_descriptor *nd_desc) { |