From: Anton Danilov <littlesmilingcloud@gmail.com>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sasha Levin <sashal@kernel.org>,
Thorsten Leemhuis <linux@leemhuis.info>,
Chuck Lever <chuck.lever@oracle.com>,
Jakub Kicinski <kuba@kernel.org>,
Donald Hunter <donald.hunter@gmail.com>,
Paolo Abeni <pabeni@redhat.com>,
"Remy D. Farley" <one-d-wide@protonmail.com>,
Rachel Menge <rachelmenge@linux.microsoft.com>,
netdev@vger.kernel.org
Subject: [PATCH 6.12.y 0/4] tools: ynl: fix spec validation in 6.12.y
Date: Sat, 10 Oct 2026 06:51:12 +0300 [thread overview]
Message-ID: <20261010035116.578385-1-littlesmilingcloud@gmail.com> (raw)
In-Reply-To: <2026060807-egging-prune-a3ae@gregkh>
Two 6.12.y backports added YNL spec features that the 6.12.y YNL tools
do not support:
- 6.12.93: a2de9c7f01b3 ("net/handshake: Pass negative errno through
handshake_complete()") adds a "scope: kernel" definition to
handshake.yaml and uses it in "checks: max";
- 6.12.111: 45ca9f59b6c7 ("net: reject oversized tx_queue_len at
netlink parse time") adds "checks: max" to rt_link.yaml, which
netlink-raw.yaml does not allow.
Since 6.12.93 "make -C tools/net/ynl" fails on handshake:
jsonschema.exceptions.ValidationError: Additional properties are not allowed ('scope' was unexpected)
and since 6.12.111 the in-tree CLI fails on rt_link:
$ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_link.yaml --dump getlink
jsonschema.exceptions.ValidationError: Additional properties are not allowed ('max' was unexpected)
Greg queued fbf5df34a4db ("tools: ynl: add scope qualifier for
definitions") for newer trees and asked for a 6.12.y backport in
https://lore.kernel.org/all/2026060807-egging-prune-a3ae@gregkh/
fbf5df34a4db alone is not enough: handshake.yaml then fails on the
constant name in "checks: max", and the 6.12.y generator cannot
resolve such names. Patches 1 and 2 add that, patch 3 is fbf5df34a4db.
Patch 4 is bf5a54bc0e3d ("doc/netlink: netlink-raw: Add max check"),
requested for 6.18.y in
https://lore.kernel.org/all/899bd843-fd19-418e-8913-91bfb6e760a2@linux.microsoft.com/
Patches 2-4 carry the upstream changes as is; in 6.12.y the generator
is tools/net/ynl/ynl-gen-c.py. Patch 1 needed adjustments, they are
described in its commit message. Like upstream, it also updates the
generated net/core/netdev-genl-gen.c (4294967295ULL -> U32_MAX,
2147483647ULL -> S32_MAX); the object file is byte-identical before
and after (x86_64 defconfig).
Tested on top of v6.12.112:
- all 19 specs validate against their schemas (2 fail before);
- make -C tools/net/ynl builds without warnings (fails before);
- tools/net/ynl/ynl-regen.sh -f regenerates all 24 generated kernel
and uAPI files with no changes, net/handshake/genl.c included;
- cli.py --spec rt_link.yaml --dump getlink works.
Jakub Kicinski (3):
tools: ynl-gen: use names of constants in generated limits
tools: ynl-gen: support limits using definitions
tools: ynl: add scope qualifier for definitions
Remy D. Farley (1):
doc/netlink: netlink-raw: Add max check
Documentation/netlink/genetlink-c.yaml | 14 ++++-
Documentation/netlink/genetlink-legacy.yaml | 14 ++++-
Documentation/netlink/genetlink.yaml | 14 ++++-
Documentation/netlink/netlink-raw.yaml | 20 +++++-
net/core/netdev-genl-gen.c | 4 +-
tools/net/ynl/ynl-gen-c.py | 70 ++++++++++++++++-----
6 files changed, 112 insertions(+), 24 deletions(-)
--
2.47.3
next parent reply other threads:[~2026-10-10 3:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2026060807-egging-prune-a3ae@gregkh>
2026-10-10 3:51 ` Anton Danilov [this message]
2026-10-10 3:51 ` [PATCH 6.12.y 1/4] tools: ynl-gen: use names of constants in generated limits Anton Danilov
2026-10-10 3:51 ` [PATCH 6.12.y 2/4] tools: ynl-gen: support limits using definitions Anton Danilov
2026-10-10 3:51 ` [PATCH 6.12.y 3/4] tools: ynl: add scope qualifier for definitions Anton Danilov
2026-10-10 3:51 ` [PATCH 6.12.y 4/4] doc/netlink: netlink-raw: Add max check Anton Danilov
2026-10-11 16:48 ` [PATCH 6.12.y 0/4] tools: ynl: fix spec validation in 6.12.y Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261010035116.578385-1-littlesmilingcloud@gmail.com \
--to=littlesmilingcloud@gmail.com \
--cc=chuck.lever@oracle.com \
--cc=donald.hunter@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kuba@kernel.org \
--cc=linux@leemhuis.info \
--cc=netdev@vger.kernel.org \
--cc=one-d-wide@protonmail.com \
--cc=pabeni@redhat.com \
--cc=rachelmenge@linux.microsoft.com \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox