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

2020-10-07 Thread Jakub Kicinski
On Tue, 6 Oct 2020 20:15:53 +0200 Johannes Berg wrote: > 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 si

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

2020-10-06 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