From: sashiko-bot@kernel.org
To: Prabhakar <prabhakar.csengg@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
wsa+renesas@sang-engineering.com
Subject: Re: [PATCH net-next v3 04/13] dt-bindings: net: dsa: renesas,rzn1-a5psw: Disallow ports beyond port@4
Date: Thu, 15 Oct 2026 13:19:31 +0000 [thread overview]
Message-ID: <sashiko-outbox-172911@kernel.org> (raw)
In-Reply-To: <20261014131906.990077-5-prabhakar.mahadev-lad.rj@bp.renesas.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dt-bindings: net: dsa: incomplete schema validation allows bypassing port restrictions via ports node
--
commit b100423001348cf87abe9e11b4f74d424451c2db
Author: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
dt-bindings: net: dsa: renesas,rzn1-a5psw: Disallow ports beyond port@4
Restrict the A5PSW ethernet-ports node to ports 0 through 4, matching the
hardware configuration of four external ports and one CPU/management port.
> diff --git a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml
> index fab6aa6237e93..c5e652c057a94 100644
> --- a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml
> @@ -61,7 +61,14 @@ properties:
>
> ethernet-ports:
> type: object
> - additionalProperties: true
> + additionalProperties: false
[Severity: Low]
Does this schema allow bypassing the port restrictions if a device tree uses
a node named ports instead of ethernet-ports?
Because dsa.yaml allows either ports or ethernet-ports, and the schema
doesn't list ethernet-ports in the required properties, a devicetree could
define a ports node with a port outside the 0-4 range (e.g. port@5) and
silently pass validation.
The driver in drivers/net/dsa/rzn1_a5psw.c has a hard dependency on
ethernet-ports:
drivers/net/dsa/rzn1_a5psw.c:a5psw_pcs_get() {
...
ports = of_get_child_by_name(a5psw->dev->of_node, "ethernet-ports");
if (!ports)
return -EINVAL;
...
}
Should ethernet-ports be added to the required properties list to ensure the
validation rules are properly enforced?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261014131906.990077-1-prabhakar.mahadev-lad.rj@bp.renesas.com?part=4
next prev parent reply other threads:[~2026-10-15 13:19 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 13:18 [PATCH net-next v3 00/13] Add ETHSW support for Renesas RZ/T2H and RZ/N2H SoCs Prabhakar
2026-10-14 13:18 ` [PATCH net-next v3 01/13] net: dsa: tag_rzn1_a5psw: Drop redundant ETH_P_DSA_A5PSW definition Prabhakar
2026-10-14 13:18 ` [PATCH net-next v3 02/13] net: dsa: tag_rzn1_a5psw: Add RZ/T2H ETHSW tag protocol support Prabhakar
2026-10-14 13:18 ` [PATCH net-next v3 03/13] net: dsa: Kconfig: Expand config description to cover RZ/T2H and RZ/N2H ETHSW Prabhakar
2026-10-14 13:18 ` [PATCH net-next v3 04/13] dt-bindings: net: dsa: renesas,rzn1-a5psw: Disallow ports beyond port@4 Prabhakar
2026-10-15 13:19 ` sashiko-bot [this message]
2026-10-15 20:37 ` Rob Herring
2026-10-14 13:18 ` [PATCH net-next v3 05/13] dt-bindings: net: dsa: renesas,rzn1-a5psw: Add RZ/T2H and RZ/N2H ETHSW support Prabhakar
2026-10-15 20:39 ` Rob Herring (Arm)
2026-10-14 13:18 ` [PATCH net-next v3 06/13] net: dsa: rzn1-a5psw: Add support for optional reset control Prabhakar
2026-10-14 13:18 ` [PATCH net-next v3 07/13] net: dsa: rzn1-a5psw: Add support for optional timestamp clock Prabhakar
2026-10-14 13:18 ` [PATCH net-next v3 08/13] net: dsa: rzn1-a5psw: Make use dev_err_probe() Prabhakar
2026-10-14 13:18 ` [PATCH net-next v3 09/13] net: dsa: rzn1-a5psw: Get switch info via OF data Prabhakar
2026-10-15 13:19 ` sashiko-bot
2026-10-14 13:18 ` [PATCH net-next v3 10/13] net: dsa: rzn1-a5psw: Choose tagging protocol based on compatible string Prabhakar
2026-10-15 13:19 ` sashiko-bot
2026-10-14 13:18 ` [PATCH net-next v3 11/13] net: dsa: rzn1-a5psw: Add fixed frame length workaround for management port Prabhakar
2026-10-15 13:19 ` sashiko-bot
2026-10-14 13:19 ` [PATCH net-next v3 12/13] net: dsa: rzn1-a5psw: Add support for RZ/T2H Ethernet switch Prabhakar
2026-10-15 13:19 ` sashiko-bot
2026-10-14 13:19 ` [PATCH net-next v3 13/13] net: dsa: Kconfig: Enable support for RZ/T2H and RZ/N2H SoCs Prabhakar
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=sashiko-outbox-172911@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=prabhakar.csengg@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=wsa+renesas@sang-engineering.com \
/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