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
78 const struct attribute_group **attr_groups;78 const struct attribute_group **attr_groups;
79 unsigned long bus_dsm_mask;79 unsigned long bus_dsm_mask;
80 unsigned long cmd_mask;80 unsigned long cmd_mask;
81 unsigned long dimm_family_mask;
82 unsigned long bus_family_mask;
81 struct module *module;83 struct module *module;
82 char *provider_name;84 char *provider_name;
83 struct device_node *of_node;85 struct device_node *of_node;