Skip to contentSkip to conversation

Request backport of bf5a54bc0e3d to 6.18.y

DISCUSSION Rachel Menge 3 participants 3 messages Oct 9 – Oct 11

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi stable team,

Please consider applying the following upstream commit to 6.18.y:

bf5a54bc0e3d8962474fcd611f1266eba036232f
doc/netlink: netlink-raw: Add max check

The 6.18.y tree contains these related changes:

2fd0880f0272 ("net: reject oversized tx_queue_len at netlink parse time") 982c7f66c041 ("neighbour: Enforce min/max to NDTPA_INTERVAL_PROBE_TIME_MS.")

Those changes add checks.max to the rt-link.yaml and rt-neigh.yaml Netlink specifications. However, the 6.18.y version of Documentation/netlink/netlink-raw.yaml neither defines len-or-limit nor permits checks.max.

I found this while building YNL from v6.18.55. I reproduced the failure against the unmodified v6.18.55 tag with:

  make -C tools/net/ynl/generated rt-link-user.h

YNL code generation fails JSON schema validation because the rt-link and rt-neigh specifications use checks.max while netlink-raw.yaml rejects that property:

  jsonschema.exceptions.ValidationError:
  Additional properties are not allowed ('max' was unexpected)

The requested upstream commit updates only the build-time YAML schema. It does not change kernel runtime behavior.

I also checked 6.1.y, 6.6.y, 6.12.y, and 6.19.y. Those branches do not contain the rt-link.yaml and rt-neigh.yaml checks.max additions that create this mismatch, so this request is limited to 6.18.y.

Thanks,
Rachel Menge

Tested-by
#1 lore raw
Quoted 4 lines · Rachel Menge

Please consider applying the following upstream commit to 6.18.y:

bf5a54bc0e3d8962474fcd611f1266eba036232f
doc/netlink: netlink-raw: Add max check

I see the same on v6.18.55: rt-link-user.h fails since 6.18.53 and rt-neigh-user.h since 6.18.54, and the in-tree cli.py fails the same way for both families. With bf5a54bc0e3d on top, make -C tools/net/ynl passes, and the generated rt-link and rt-neigh code is byte-identical to a build of the same tree with the two checks hunks dropped.

Quoted 3 lines

I also checked 6.1.y, 6.6.y, 6.12.y, and 6.19.y. Those branches do not contain the rt-link.yaml and rt-neigh.yaml checks.max additions that create this mismatch, so this request is limited to 6.18.y.

6.12.y is affected too. Since 6.12.111 it carries 45ca9f59b6c7 ("net:
reject oversized tx_queue_len at netlink parse time"), which adds checks.max to rt_link.yaml (the file name has an underscore there). 6.12.y does not generate C code for netlink-raw specs, so the build is not affected by this one, but cli.py --spec rt_link.yaml fails with the same ValidationError.

bf5a54bc0e3d applies to 6.12.y as well. The 6.12.y YNL build has been broken since 6.12.93 by handshake.yaml, so I sent a 6.12.y series that fixes that and includes bf5a54bc0e3d:

https://lore.kernel.org/netdev/[email protected]/

One more thing for 6.18.y, not a regression: conntrack.yaml and nftables.yaml fail the schema check since v6.18 itself ('labels mask' and 'set id' do not match the attribute name pattern), so cli.py fails for these two families. Upstream fixed that in 1adc241f3940 ("ynl: fix schema check errors"), which renames the two attributes to labels-mask and set-id. It applies cleanly to 6.18.55, and with it and bf5a54bc0e3d all specs in 6.18.55 pass the schema check. The C build is not affected, these two families are not generated there.

---

Anton Danilov

maintainer
#2 lore raw
In reply to Rachel Menge
Quoted 4 lines

Please consider applying the following upstream commit to 6.18.y:

bf5a54bc0e3d8962474fcd611f1266eba036232f
doc/netlink: netlink-raw: Add max check

Queued for 6.18, along with the schema check fix Anton suggested, thanks.

Signature · 2 lines
Thanks,
Sasha