linux_dsm_epyc7002/drivers/nvdimm
Dan Williams 966d23a006 libnvdimm/label: Clear 'updating' flag after label-set update
The UEFI 2.7 specification sets expectations that the 'updating' flag is
eventually cleared. To date, the libnvdimm core has never adhered to
that protocol. The policy of the core matches the policy of other
multi-device info-block formats like MD-Software-RAID that expect
administrator intervention on inconsistent info-blocks, not automatic
invalidation.

However, some pre-boot environments may unfortunately attempt to "clean
up" the labels and invalidate a set when it fails to find at least one
"non-updating" label in the set. Clear the updating flag after set
updates to minimize the window of vulnerability to aggressive pre-boot
environments.

Ideally implementations would not write to the label area outside of
creating namespaces.

Note that this only minimizes the window, it does not close it as the
system can still crash while clearing the flag and the set can be
subsequently deleted / invalidated by the pre-boot environment.

Fixes: f524bf271a ("libnvdimm: write pmem label set")
Cc: <stable@vger.kernel.org>
Cc: Kelly Couch <kelly.j.couch@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2019-01-15 10:47:00 -08:00
..
badrange.c libnvdimm, badrange: remove a WARN for list_empty 2017-11-02 10:42:30 -07:00
blk.c block: genhd: add 'groups' argument to device_add_disk 2018-09-28 08:30:28 -06:00
btt_devs.c libnvdimm: remove redundant __func__ in dev_dbg 2018-03-06 08:44:17 -08:00
btt.c block: genhd: add 'groups' argument to device_add_disk 2018-09-28 08:30:28 -06:00
btt.h libnvdimm, btt: Fix an incompatibility in the log layout 2017-12-21 14:59:27 -08:00
bus.c Merge miscellaneous libnvdimm updates for 4.21 2018-12-27 19:54:10 -08:00
claim.c libnvdimm, pmem: Fix memcpy_mcsafe() return code handling in nsio_rw_bytes() 2018-06-28 18:21:30 -07:00
core.c libnvdimm: remove redundant __func__ in dev_dbg 2018-03-06 08:44:17 -08:00
dax_devs.c libnvdimm: remove redundant __func__ in dev_dbg 2018-03-06 08:44:17 -08:00
dimm_devs.c tools/testing/nvdimm: Add test support for Intel nvdimm security DSMs 2018-12-21 12:44:41 -08:00
dimm.c libnvdimm/security: Quiet security operations 2018-12-22 11:35:41 -08:00
e820.c libnvdimm, e820: Register all pmem resources 2018-06-02 17:05:43 -07:00
Kconfig acpi/nfit, libnvdimm: Add unlock of nvdimm support for Intel DIMMs 2018-12-13 17:54:13 -08:00
label.c libnvdimm/label: Clear 'updating' flag after label-set update 2019-01-15 10:47:00 -08:00
label.h nvdimm: Use namespace index data to reduce number of label reads needed 2018-10-12 08:39:31 -07:00
Makefile acpi/nfit, libnvdimm: Add unlock of nvdimm support for Intel DIMMs 2018-12-13 17:54:13 -08:00
namespace_devs.c libnvdimm, namespace: Replace kmemdup() with kstrndup() 2018-12-10 15:58:46 -08:00
nd-core.h Merge miscellaneous libnvdimm updates for 4.21 2018-12-27 19:54:10 -08:00
nd.h acpi/nfit, libnvdimm: Add unlock of nvdimm support for Intel DIMMs 2018-12-13 17:54:13 -08:00
of_pmem.c libnvdimm, of_pmem: use dev_to_node() instead of of_node_to_nid() 2018-04-19 15:07:10 -07:00
pfn_devs.c libnvdimm, pfn: Pad pfn namespaces relative to other regions 2018-12-05 14:16:12 -08:00
pfn.h libnvdimm, dax: autodetect support 2016-05-20 22:02:57 -07:00
pmem.c Merge branch 'akpm' (patches from Andrew) 2018-12-28 16:55:46 -08:00
pmem.h libnvdimm, pmem: Restore page attributes when clearing errors 2018-08-20 09:22:45 -07:00
region_devs.c Merge miscellaneous libnvdimm updates for 4.21 2018-12-27 19:54:10 -08:00
region.c libnvdimm, region: quiet region probe 2018-04-07 07:47:10 -07:00
security.c libnvdimm/security: Quiet security operations 2018-12-22 11:35:41 -08:00