* Re: [PATCH net 1/4] netlink: specs: fou: change local-v6/peer-v6 check [not found] ` <20250901145034.525518-2-ast@fiberby.net> @ 2025-09-01 18:50 ` Jakub Kicinski 0 siblings, 0 replies; 4+ messages in thread From: Jakub Kicinski @ 2025-09-01 18:50 UTC (permalink / raw) To: Asbjørn Sloth Tønnesen Cc: David S. Miller, Eric Dumazet, Paolo Abeni, Donald Hunter, Simon Horman, Jacob Keller, Stanislav Fomichev, Matthieu Baerts (NGI0), David Ahern, Chuck Lever, wireguard, netdev, linux-kernel On Mon, 1 Sep 2025 14:50:20 +0000 Asbjørn Sloth Tønnesen wrote: > While fixing the binary min-len implementaion, I noticed that > the only user, should AFAICT be using exact-len instead. > > In net/ipv4/fou_core.c FOU_ATTR_LOCAL_V6 and FOU_ATTR_PEER_V6 > are only used for singular IPv6 addresses, a exact-len policy, > therefore seams like a better fit. > > AFAICT this was caused by lacking support for the exact-len check > at the time of the blamed commit, which was later remedied by > c63ad379526 ("tools: ynl-gen: add support for exact-len validation"). No, take a look at 1d562c32e43. The intention was to keep the code before and after the same. I agree that the check is not ideal but it's not really a bug to ignore some input. So if you want to clean this up -- net-next and no Fixes tag.. > This patch therefore changes the local-v6/peer-v6 attributes to > use an exact-len check, instead of a min-len check. ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20250901145034.525518-3-ast@fiberby.net>]
* Re: [PATCH net 2/4] tools: ynl-gen: use macro for binary min-len check [not found] ` <20250901145034.525518-3-ast@fiberby.net> @ 2025-09-01 18:52 ` Jakub Kicinski 0 siblings, 0 replies; 4+ messages in thread From: Jakub Kicinski @ 2025-09-01 18:52 UTC (permalink / raw) To: Asbjørn Sloth Tønnesen Cc: David S. Miller, Eric Dumazet, Paolo Abeni, Donald Hunter, Simon Horman, Jacob Keller, Stanislav Fomichev, Matthieu Baerts (NGI0), David Ahern, Chuck Lever, wireguard, netdev, linux-kernel On Mon, 1 Sep 2025 14:50:21 +0000 Asbjørn Sloth Tønnesen wrote: > This patch changes the generated min-len check for binary > attributes to use the NLA_POLICY_MIN_LEN() macro, and thereby > ensures that .validation_type is not left at NLA_VALIDATE_NONE. Please test this well and include the results in the commit message. I'm pretty sure it's fine as is. ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20250901145034.525518-4-ast@fiberby.net>]
* Re: [PATCH net 3/4] tools: ynl-gen: fix nested array counting [not found] ` <20250901145034.525518-4-ast@fiberby.net> @ 2025-09-01 18:56 ` Jakub Kicinski 0 siblings, 0 replies; 4+ messages in thread From: Jakub Kicinski @ 2025-09-01 18:56 UTC (permalink / raw) To: Asbjørn Sloth Tønnesen Cc: David S. Miller, Eric Dumazet, Paolo Abeni, Donald Hunter, Simon Horman, Jacob Keller, Stanislav Fomichev, Matthieu Baerts (NGI0), David Ahern, Chuck Lever, wireguard, netdev, linux-kernel On Mon, 1 Sep 2025 14:50:22 +0000 Asbjørn Sloth Tønnesen wrote: > The blamed commit introduced the concept of split attribute > counting, and later allocating an array to hold them, however > TypeArrayNest wasn't updated to use the new counting variable. > > Abbreviated example from tools/net/ynl/generated/nl80211-user.c: > nl80211_if_combination_attributes_parse(...): > unsigned int n_limits = 0; > [...] > ynl_attr_for_each(attr, nlh, yarg->ys->family->hdr_len) > if (type == NL80211_IFACE_COMB_LIMITS) > ynl_attr_for_each_nested(attr2, attr) > dst->_count.limits++; > if (n_limits) { > dst->_count.limits = n_limits; > /* allocate and parse attributes */ > } > > In the above example n_limits is guaranteed to always be 0, > hence the conditional is unsatisfiable and is optimized out. > > This patch changes the attribute counting to use n_limits++ in the > attribute counting loop in the above example. Looks good, thanks! Reviewed-by: Jakub Kicinski <kuba@kernel.org> ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20250901145034.525518-5-ast@fiberby.net>]
* Re: [PATCH net 4/4] genetlink: fix typo in comment [not found] ` <20250901145034.525518-5-ast@fiberby.net> @ 2025-09-01 18:57 ` Jakub Kicinski 0 siblings, 0 replies; 4+ messages in thread From: Jakub Kicinski @ 2025-09-01 18:57 UTC (permalink / raw) To: Asbjørn Sloth Tønnesen Cc: David S. Miller, Eric Dumazet, Paolo Abeni, Donald Hunter, Simon Horman, Jacob Keller, Stanislav Fomichev, Matthieu Baerts (NGI0), David Ahern, Chuck Lever, wireguard, netdev, linux-kernel On Mon, 1 Sep 2025 14:50:23 +0000 Asbjørn Sloth Tønnesen wrote: > In this context "not that ..." should properly be "note that ...". > > Fixes: b8fd60c36a44 ("genetlink: allow families to use split ops directly") Looks good, but this is not a fix, please repost without the Fixes tag and for net-next. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-09-01 19:02 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20250901145034.525518-1-ast@fiberby.net> [not found] ` <20250901145034.525518-2-ast@fiberby.net> 2025-09-01 18:50 ` [PATCH net 1/4] netlink: specs: fou: change local-v6/peer-v6 check Jakub Kicinski [not found] ` <20250901145034.525518-3-ast@fiberby.net> 2025-09-01 18:52 ` [PATCH net 2/4] tools: ynl-gen: use macro for binary min-len check Jakub Kicinski [not found] ` <20250901145034.525518-4-ast@fiberby.net> 2025-09-01 18:56 ` [PATCH net 3/4] tools: ynl-gen: fix nested array counting Jakub Kicinski [not found] ` <20250901145034.525518-5-ast@fiberby.net> 2025-09-01 18:57 ` [PATCH net 4/4] genetlink: fix typo in comment Jakub Kicinski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).