Re: [PATCH net-next 02/11] tools: ynl-gen: generate nested array policies
Johannes Berg <[email protected]>
| Newsgroups | com.zx2c4.lists.wireguard,org.kernel.vger.linux-kernel,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 2025-09-08 at 09:08 +0000, Asbjørn Sloth Tønnesen wrote: > > Thank you for the consensus write up. Should we prohibit indexed-array with sub-type > nest for families with a genetlink protocol? > > It is currently only used in families with a netlink-raw or genetlink-legacy protocol. I have no strong opinion on that, but I guess maybe so? At least print out a warning for anyone who's trying to add such a new thing perhaps, so that new stuff that isn't just a port (to ynl) or annotation of existing APIs doesn't add it. > > I can't get rid of the nested array types in nl80211 though, of course. > > Wireguard is already in the same boat. [...] Oh, sorry. I didn't look at the linked patch and thought it was adding such a new thing. Looking now, I see it just makes the policy validate it instead of (only) doing it in the code. (FWIW, in the code you could then also set the policy argument for nla_parse_nested() calls to NULL.) > Given that, as Jacob pointed out, there are more families with nested arrays in > their YNL spec, than those using NLA_NESTED_ARRAY, then it appears that there > are more families already in the boat. Right. johannes