From: sashiko-bot@kernel.org
To: "Yu-Chien Peter Lin" <peter.lin@sifive.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v2 2/3] dt-bindings: riscv: Add Worlds per-hart properties
Date: Wed, 29 Jul 2026 16:52:29 +0000 [thread overview]
Message-ID: <20260729165230.510E31F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260729163908.249838-3-peter.lin@sifive.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The CPU node schema incorrectly references the system-wide Worlds schema, bypassing strict property validation for all CPU nodes.
- [High] The schema incorrectly requires the `riscv,pmwid` property on legacy devicetrees that lack the `riscv,isa-extensions` property.
--
--- Patch [2]: [PATCH v2 2/3] dt-bindings: riscv: Add Worlds per-hart properties ---
commit 8c65780e5330e56c6e5f7b6479ae772aa1d15f0c
Author: Yu-Chien Peter Lin <peter.lin@sifive.com>
dt-bindings: riscv: Add Worlds per-hart properties
This commit adds device tree properties to describe the RISC-V Worlds
architecture. It introduces system-wide and per-hart configuration
properties for World IDs, along with schema validation rules.
> diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml
> index 5feeb2203050a..5922a0307cfe0 100644
> --- a/Documentation/devicetree/bindings/riscv/cpus.yaml
> +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml
> @@ -26,6 +26,7 @@ description: |
> allOf:
> - $ref: /schemas/cpu.yaml#
> - $ref: extensions.yaml
> + - $ref: worlds.yaml
[Severity: High]
Does this inclusion break the strict property validation for all CPU nodes?
Because worlds.yaml includes additionalProperties: true, JSON schema
validation will treat all properties as successfully evaluated.
This neutralizes the unevaluatedProperties: false restriction in cpus.yaml,
allowing undocumented or typo'd properties to silently pass validation.
[ ... ]
> + - if:
> + allOf:
> + - properties:
> + riscv,isa-extensions:
> + not:
> + contains:
> + const: smwid
> + - properties:
> + riscv,isa-extensions:
> + contains:
> + enum:
> + - smlwid
> + - smwiddeleg
> + - sswid
> + then:
> + required:
> + - riscv,pmwid
[Severity: High]
Will this erroneously require riscv,pmwid on legacy devicetrees that lack
the riscv,isa-extensions property?
In JSON Schema, a properties check automatically succeeds if the specified
property is absent.
Without an explicit check requiring riscv,isa-extensions to be present, this
conditional evaluates to true when the property is missing. This breaks
backward compatibility with older valid devicetrees that use the deprecated
riscv,isa property.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260729163908.249838-1-peter.lin@sifive.com?part=2
next prev parent reply other threads:[~2026-07-29 16:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 16:39 [PATCH v2 0/3] dt-bindings: riscv: Add RISC-V Worlds and SiFive WorldGuard DT bindings Yu-Chien Peter Lin
2026-07-29 16:39 ` Yu-Chien Peter Lin
2026-07-29 16:39 ` [PATCH v2 1/3] dt-bindings: riscv: Add Worlds ISA extensions Yu-Chien Peter Lin
2026-07-29 16:39 ` Yu-Chien Peter Lin
2026-07-29 16:45 ` sashiko-bot
2026-07-29 16:39 ` [PATCH v2 2/3] dt-bindings: riscv: Add Worlds per-hart properties Yu-Chien Peter Lin
2026-07-29 16:39 ` Yu-Chien Peter Lin
2026-07-29 16:52 ` sashiko-bot [this message]
2026-07-29 18:06 ` Rob Herring (Arm)
2026-07-29 18:06 ` Rob Herring (Arm)
2026-07-29 16:39 ` [PATCH v2 3/3] dt-bindings: sifive: Add WorldGuard Checker Yu-Chien Peter Lin
2026-07-29 16:39 ` Yu-Chien Peter Lin
2026-07-29 18:07 ` Rob Herring (Arm)
2026-07-29 18:07 ` Rob Herring (Arm)
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=20260729165230.510E31F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=peter.lin@sifive.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.