linux-stable/drivers/nvdimm
Dan Williams 92fe2aa859 libnvdimm: Validate command family indices
The ND_CMD_CALL format allows for a general passthrough of passlisted
commands targeting a given command set. However there is no validation
of the family index relative to what the bus supports.

- Update the NFIT bus implementation (the only one that supports
  ND_CMD_CALL passthrough) to also passlist the valid set of command
  family indices.

- Update the generic __nd_ioctl() path to validate that field on behalf
  of all implementations.

Fixes: 31eca76ba2 ("nfit, libnvdimm: limited/whitelisted dimm command marshaling mechanism")
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <lenb@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
2020-07-25 19:34:47 -06:00
..
badrange.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 295 2019-06-05 17:36:38 +02:00
blk.c libnvdimm for 5.8 2020-06-13 13:04:36 -07:00
btt.c libnvdimm for 5.8 2020-06-13 13:04:36 -07:00
btt.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
btt_devs.c libnvdimm: Move attribute groups to device type 2019-11-17 09:17:38 -08:00
bus.c libnvdimm: Validate command family indices 2020-07-25 19:34:47 -06:00
claim.c libnvdimm/namespace: Differentiate between probe mapping and runtime mapping 2019-11-14 19:08:47 -08:00
core.c libnvdimm for 5.5 2019-12-01 18:43:25 -08:00
dax_devs.c libnvdimm: Move attribute groups to device type 2019-11-17 09:17:38 -08:00
dimm.c libnvdimm/region: Introduce NDD_LABELING 2020-03-17 12:23:21 -07:00
dimm_devs.c libnvdimm/region: Introduce an 'align' attribute 2020-03-17 12:23:21 -07:00
e820.c libnvdimm/e820: Retrieve and populate correct 'target_node' info 2020-02-18 10:28:05 -08:00
Kconfig lib: Uplevel the pmem "region" ida to a global allocator 2019-11-07 15:44:29 +01:00
label.c libnvdimm/label: Remove the dpa align check 2019-09-05 16:11:14 -07:00
label.h libnvdimm/label: Replace zero-length array with flexible-array member 2020-03-30 12:37:09 -07:00
Makefile libnvdimm: Enable unit test infrastructure compile checks 2019-09-07 04:28:05 -03:00
namespace_devs.c libnvdimm/region: Introduce an 'align' attribute 2020-03-17 12:23:21 -07:00
nd-core.h libnvdimm for 5.5 2019-12-01 18:43:25 -08:00
nd.h nvdimm: use bio_{start,end}_io_acct 2020-05-27 05:21:23 -06:00
nd_virtio.c virtio_pmem: fix sparse warning 2019-07-16 19:44:26 -07:00
of_pmem.c libnvdimm: Update persistence domain value for of_pmem and papr_scm device 2020-03-31 14:42:28 -07:00
pfn.h libnvdimm/namespace: Enforce memremap_compat_align() 2020-03-17 12:23:21 -07:00
pfn_devs.c libnvdimm/namespace: Enforce memremap_compat_align() 2020-03-17 12:23:21 -07:00
pmem.c libnvdimm for 5.8 2020-06-13 13:04:36 -07:00
pmem.h libnvdimm, pmem: Restore page attributes when clearing errors 2018-08-20 09:22:45 -07:00
region.c libnvdimm/region: Initialize bad block for volatile namespaces 2019-09-24 10:27:51 -07:00
region_devs.c nvdimm/region: always show the 'align' attribute 2020-06-17 14:08:31 -07:00
security.c libnvdimm: prevent nvdimm from requesting key when security is disabled 2019-09-24 10:30:10 -07:00
virtio_pmem.c virtio-pmem: Add virtio pmem driver 2019-07-05 15:19:10 -07:00
virtio_pmem.h virtio-pmem: Add virtio pmem driver 2019-07-05 15:19:10 -07:00