On Thu, Dec 13, 2018 at 3:48 PM Dave Jiang <[email protected]> wrote:
>
> Add command definition for security commands defined in Intel DSM
> specification v1.8 [1]. This includes "get security state", "set
> passphrase", "unlock unit", "freeze lock", "secure erase", "overwrite",
> "overwrite query", "master passphrase enable/disable", and "master
> erase", . Since this adds several Intel definitions, move the relevant
> bits to their own header.
>
> These commands mutate physical data, but that manipulation is not cache
> coherent. The requirement to flush and invalidate caches makes these
> commands unsuitable to be called from userspace, so extra logic is added
> to detect and block these commands from being submitted via the ioctl
> command submission path.
>
> Lastly, the commands may contain sensitive key material that should not
> be dumped in a standard debug session. Update the nvdimm-command
> payload-dump facility to move security command payloads behind a
> default-off compile time switch.
>
> [1]: http://pmem.io/documents/NVDIMM_DSM_Interface-V1.8.pdf
>
> Signed-off-by: Dave Jiang <[email protected]>
> Signed-off-by: Dan Williams <[email protected]>
[..]
>  int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm 
> *nvdimm,
>                 unsigned int cmd, void *buf, unsigned int buf_len, int 
> *cmd_rc)
>  {
> @@ -478,9 +496,10 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, 
> struct nvdimm *nvdimm,
>
>         dev_dbg(dev, "%s cmd: %d: func: %d input length: %d\n",
>                 dimm_name, cmd, func, in_buf.buffer.length);
> -       print_hex_dump_debug("nvdimm in  ", DUMP_PREFIX_OFFSET, 4, 4,
> -                       in_buf.buffer.pointer,
> -                       min_t(u32, 256, in_buf.buffer.length), true);
> +       if (payload_dumpable(nfit_mem->family, func))

My bad, this crashes because nfit_mem is of course NULL when
acpi_nfit_ctl() is processing a bus level command like
ND_CMD_ARS_STATUS.

...I believe you had it correct in an earlier version and I lost that
in the squash.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to