alistair23-linux/drivers/nvdimm
Dan Williams 1cd7386549 libnvdimm/security: Require nvdimm_security_setup_events() to succeed
The following warning:

    ACPI0012:00: security event setup failed: -19

...is meant to capture exceptional failures of sysfs_get_dirent(),
however it will also fail in the common case when security support is
disabled. A few issues:

1/ A dev_warn() report for a common case is too chatty
2/ The setup of this notifier is generic, no need for it to be driven
   from the nfit driver, it can exist completely in the core.
3/ If it fails for any reason besides security support being disabled,
   that's fatal and should abort DIMM activation. Userspace may hang if
   it never gets overwrite notifications.
4/ The dirent needs to be released.

Move the call to the core 'dimm' driver, make it conditional on security
support being active, make it fatal for the exceptional case, add the
missing sysfs_put() at device disable time.

Fixes: 7d988097c5 ("...Add security DSM overwrite support")
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2019-01-21 09:57:43 -08:00
..
badrange.c
blk.c block: genhd: add 'groups' argument to device_add_disk 2018-09-28 08:30:28 -06:00
btt.c block: genhd: add 'groups' argument to device_add_disk 2018-09-28 08:30:28 -06:00
btt.h
btt_devs.c
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
dax_devs.c
dimm.c libnvdimm/security: Require nvdimm_security_setup_events() to succeed 2019-01-21 09:57:43 -08:00
dimm_devs.c libnvdimm/security: Require nvdimm_security_setup_events() to succeed 2019-01-21 09:57:43 -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: Switch to bitmap_zalloc() 2018-12-10 15:58:15 -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 libnvdimm/security: Fix nvdimm_security_state() state request selection 2019-01-15 13:54:33 -08:00
nd.h libnvdimm/security: Require nvdimm_security_setup_events() to succeed 2019-01-21 09:57:43 -08:00
of_pmem.c
pfn.h
pfn_devs.c libnvdimm, pfn: Pad pfn namespaces relative to other regions 2018-12-05 14:16:12 -08: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.c
region_devs.c Merge miscellaneous libnvdimm updates for 4.21 2018-12-27 19:54:10 -08:00
security.c libnvdimm/security: Quiet security operations 2018-12-22 11:35:41 -08:00