On Mon, Jul 2, 2018 at 4:39 PM, Dave Jiang <dave.ji...@intel.com> wrote: > Adding support to allow query the security status of the Intel nvdimms and > also unlock the dimm via the kernel key management APIs. The passphrase is > expected to be pulled from userspace through keyutils. Moving the Intel > related bits to its own source file as well. > > Signed-off-by: Dave Jiang <dave.ji...@intel.com> > --- > drivers/acpi/nfit/Makefile | 2 - > drivers/acpi/nfit/core.c | 3 + > drivers/acpi/nfit/intel.c | 142 > ++++++++++++++++++++++++++++++++++++++++++++ > drivers/acpi/nfit/intel.h | 2 + > drivers/nvdimm/dimm.c | 7 ++ > drivers/nvdimm/dimm_devs.c | 110 ++++++++++++++++++++++++++++++++++ > drivers/nvdimm/nd-core.h | 3 + > drivers/nvdimm/nd.h | 2 + > include/linux/libnvdimm.h | 22 ++++++- > 9 files changed, 287 insertions(+), 6 deletions(-) > create mode 100644 drivers/acpi/nfit/intel.c > > diff --git a/drivers/acpi/nfit/Makefile b/drivers/acpi/nfit/Makefile > index a407e769f103..8287005f9226 100644 > --- a/drivers/acpi/nfit/Makefile > +++ b/drivers/acpi/nfit/Makefile > @@ -1,3 +1,3 @@ > obj-$(CONFIG_ACPI_NFIT) := nfit.o > -nfit-y := core.o > +nfit-y := core.o intel.o > nfit-$(CONFIG_X86_MCE) += mce.o > diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c > index a6fb336da79d..638bb7fbe565 100644 > --- a/drivers/acpi/nfit/core.c > +++ b/drivers/acpi/nfit/core.c > @@ -1907,7 +1907,8 @@ static int acpi_nfit_register_dimms(struct > acpi_nfit_desc *acpi_desc) > nvdimm = nvdimm_create(acpi_desc->nvdimm_bus, nfit_mem, > acpi_nfit_dimm_attribute_groups, > flags, cmd_mask, flush ? flush->hint_count : > 0, > - nfit_mem->flush_wpq, dimm_id); > + nfit_mem->flush_wpq, dimm_id, > + &intel_security_ops);
I would expect there to be a routine that returns the security ops based on the 'nvdimm family'. I.e. that this ops structure should be NULL for everything except NVDIMM_FAMILY_INTEL presently. _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm