]> git.baikalelectronics.ru Git - kernel.git/commit
nvdimm: Allow overwrite in the presence of disabled dimms
authorDan Williams <dan.j.williams@intel.com>
Thu, 28 Apr 2022 22:47:46 +0000 (15:47 -0700)
committerDan Williams <dan.j.williams@intel.com>
Thu, 28 Apr 2022 22:47:46 +0000 (15:47 -0700)
commitcce43a94f7d407784541a305de91111751e60d0e
tree25f9f7c032abac07ee1932f8572cb08f41628c78
parente4a67e7b86ac9594e95aae4314d32cb9554f393b
nvdimm: Allow overwrite in the presence of disabled dimms

It is not clear why the original implementation of overwrite support
required the dimm driver to be active before overwrite could proceed. In
fact that can lead to cases where the kernel retains an invalid cached
copy of the labels from before the overwrite. Unfortunately the kernel
has not only allowed that case, but enforced it.

Going forward, allow for overwrite to happen while the label area is
offline, and follow-on with updates to 'ndctl sanitize-dimm --overwrite'
to trigger the label area invalidation by default.

Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
Reported-by: Krzysztof Kensicki <krzysztof.kensicki@intel.com>
Fixes: 1353f2daf118 ("acpi/nfit, libnvdimm/security: Add security DSM overwrite support")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/security.c