From: sashiko-bot@kernel.org
To: "Shivendra Pratap" <shivendra.pratap@oss.qualcomm.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v26 05/10] dt-bindings: arm: Document reboot mode magic
Date: Mon, 28 Sep 2026 06:26:13 +0000 [thread overview]
Message-ID: <20260928062613.7BB651F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260928-arm-psci-system_reset2-vendor-reboots-v26-5-b24e2348e8e1@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] dt-bindings: ineffective unevaluatedProperties allows undocumented properties
- [Low] dt-bindings: missing maxItems constraint on mode-* arrays
--
commit b385b6956b70c623850aefcc8ceb50fda4b87cc0
Author: Shivendra Pratap <shivendra.pratap@oss.qualcomm.com>
dt-bindings: arm: Document reboot mode magic
Add bindings to describe vendor-specific reboot modes. Values here
correspond to valid parameters to vendor-specific reset types in PSCI
SYSTEM_RESET2 call.
> diff --git a/Documentation/devicetree/bindings/arm/psci.yaml b/Documentation/devicetree/bindings/arm/psci.yaml
> index 0d04389c81faa..82ae25e7a3386 100644
> --- a/Documentation/devicetree/bindings/arm/psci.yaml
> +++ b/Documentation/devicetree/bindings/arm/psci.yaml
[ ... ]
> @@ -98,6 +98,39 @@ properties:
> [1] Kernel documentation - ARM idle states bindings
> Documentation/devicetree/bindings/cpu/idle-states.yaml
>
> + reboot-mode:
> + type: object
> + $ref: /schemas/power/reset/reboot-mode.yaml#
> + unevaluatedProperties: false
[Severity: Low]
Does unevaluatedProperties here effectively restrict undocumented properties?
The referenced schema /schemas/power/reset/reboot-mode.yaml# has an open
additionalProperties: true. Under JSON Schema evaluation rules, this causes
all properties to be annotated as successfully evaluated.
Consequently, unevaluatedProperties: false in the referencing schema becomes
a no-op, allowing any arbitrary property to pass validation silently.
> + properties:
> + # "mode-normal" is just SYSTEM_RESET
> + mode-normal: false
> + patternProperties:
> + "^mode-.*$":
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + minItems: 2
[Severity: Low]
Should this also include a maxItems constraint?
Providing a list of schemas to items constrains the initial array elements
but does not intrinsically limit the array's maximum length.
Without maxItems: 3, a device tree defining 4 or more cells for a reboot
mode will silently pass schema validation, violating the binding's up to
three 32-bit cells requirement.
> + items:
> + - description: arg1 (vendor-specific SYSTEM_RESET2 reset_type)
> + minimum: 0x80000000
> + - description: arg2 (cookie_lo in 2-cell form, cookie_hi in 3-cell form)
> + - description: arg3 (cookie_lo in 3-cell form)
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260928-arm-psci-system_reset2-vendor-reboots-v26-0-b24e2348e8e1@oss.qualcomm.com?part=5
next prev parent reply other threads:[~2026-09-28 6:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 6:09 [PATCH v26 00/10] Implement PSCI reboot mode driver for PSCI resets Shivendra Pratap
2026-09-28 6:09 ` [PATCH v26 01/10] power: reset: reboot-mode: Support up to 3 magic values per mode Shivendra Pratap
2026-09-28 6:09 ` [PATCH v26 02/10] power: reset: reboot-mode: Add support for predefined reboot modes Shivendra Pratap
2026-09-28 6:26 ` sashiko-bot
2026-09-28 17:25 ` Shivendra Pratap
2026-09-28 6:09 ` [PATCH v26 03/10] firmware: psci: Introduce command-based resets Shivendra Pratap
2026-09-28 6:09 ` [PATCH v26 04/10] firmware: psci: Add support for PSCI auxiliary devices Shivendra Pratap
2026-10-02 13:29 ` Bartosz Golaszewski
2026-09-28 6:09 ` [PATCH v26 05/10] dt-bindings: arm: Document reboot mode magic Shivendra Pratap
2026-09-28 6:26 ` sashiko-bot [this message]
2026-09-28 17:20 ` Shivendra Pratap
2026-10-06 2:53 ` Rob Herring (Arm)
2026-09-28 6:09 ` [PATCH v26 06/10] power: reset: Add psci-reboot-mode driver Shivendra Pratap
2026-10-02 13:30 ` Bartosz Golaszewski
2026-10-04 7:29 ` Shivendra Pratap
2026-09-28 6:09 ` [PATCH v26 07/10] arm64: dts: qcom: Add psci reboot-modes for kodiak boards Shivendra Pratap
2026-09-28 6:09 ` [PATCH v26 08/10] arm64: dts: qcom: Add psci reboot-modes for lemans boards Shivendra Pratap
2026-09-28 6:09 ` [PATCH v26 09/10] arm64: dts: qcom: Add psci reboot-modes for monaco boards Shivendra Pratap
2026-09-28 6:09 ` [PATCH v26 10/10] arm64: dts: qcom: Add psci reboot-modes for talos boards Shivendra Pratap
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=20260928062613.7BB651F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shivendra.pratap@oss.qualcomm.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