History

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.

Dan Williams committed 6 years ago

Commit 92fe2aa1 parent 48778465 files · +31 −3Browse files

Showing the changes to include/linux (1 of 5 files). Show all

Unified · Split

include/linux/libnvdimm.h+2−0
@@ -78,6 +78,8 @@ struct nvdimm_bus_descriptor { · 77 unmodified lines
7878 const struct attribute_group **attr_groups;
7979 unsigned long bus_dsm_mask;
8080 unsigned long cmd_mask;
81+ unsigned long dimm_family_mask;
82+ unsigned long bus_family_mask;
8183 struct module *module;
8284 char *provider_name;
8385 struct device_node *of_node;