[PATCH v3 0/2] netlink: export policy on validation failures

2020-10-07 Thread Johannes Berg
Export the policy used for attribute validation when it fails, so e.g. for an out-of-range attribute userspace immediately gets the valid ranges back. v2 incorporates the suggestion from Jakub to have a function to estimate the size (netlink_policy_dump_attr_size_estimate()) and check that it does

[PATCH v3 0/2] netlink: export policy on validation failures

2020-10-07 Thread Johannes Berg
Export the policy used for attribute validation when it fails, so e.g. for an out-of-range attribute userspace immediately gets the valid ranges back. v2 incorporates the suggestion from Jakub to have a function to estimate the size (netlink_policy_dump_attr_size_estimate()) and check that it does