linux-stable/drivers/nvdimm
Dan Williams 638d39ed2c nvdimm: Allow overwrite in the presence of disabled dimms
[ Upstream commit bb7bf697fe ]

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: 7d988097c5 ("acpi/nfit, libnvdimm/security: Add security DSM overwrite support")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:23:08 +02:00
..
badrange.c mm/memremap_pages: convert to 'struct range' 2020-10-13 18:38:28 -07:00
blk.c nvdimm-blk: convert to blk_alloc_disk/blk_cleanup_disk 2021-06-01 07:42:23 -06:00
btt.c nvdimm/btt: do not call del_gendisk() if not needed 2021-11-18 19:17:06 +01:00
btt.h nvdimm-btt: convert to blk_alloc_disk/blk_cleanup_disk 2021-06-01 07:42:23 -06:00
btt_devs.c
bus.c bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
claim.c libnvdimm: Cleanup include of badblocks.h 2020-12-15 21:47:45 -08:00
core.c nvdimm: Fix firmware activation deadlock scenarios 2022-06-09 10:23:08 +02:00
dax_devs.c
dimm.c libnvdimm: Make remove callback return void 2021-02-16 19:35:29 -08:00
dimm_devs.c libnvdimm: Export nvdimm shutdown helper, nvdimm_delete() 2021-06-15 16:47:22 -07:00
e820.c
Kconfig
label.c libnvdimm/labels: Add claim class helpers 2021-08-24 12:08:28 -07:00
label.h libnvdimm/labels: Add claim class helpers 2021-08-24 12:08:28 -07:00
Makefile
namespace_devs.c cxl for v5.15 2021-09-09 11:48:27 -07:00
nd-core.h
nd.h libnvdimm/labels: Add claim class helpers 2021-08-24 12:08:28 -07:00
nd_virtio.c
of_pmem.c
pfn.h
pfn_devs.c mm/memremap_pages: support multiple ranges per invocation 2020-10-13 18:38:28 -07:00
pmem.c nvdimm/pmem: cleanup the disk if pmem_release_disk() is yet assigned 2021-11-18 19:17:07 +01:00
pmem.h
region.c libnvdimm: Make remove callback return void 2021-02-16 19:35:29 -08:00
region_devs.c nvdimm/region: Fix default alignment for small regions 2022-04-08 14:23:48 +02:00
security.c nvdimm: Allow overwrite in the presence of disabled dimms 2022-06-09 10:23:08 +02:00
virtio_pmem.c virtio_pmem: convert to LE accessors 2020-08-05 11:08:41 -04:00
virtio_pmem.h