From: sashiko-bot@kernel.org
To: "Shivendra Pratap" <shivendra.pratap@oss.qualcomm.com>
Cc: conor+dt@kernel.org, lee@kernel.org, devicetree@vger.kernel.org,
mfd@lists.linux.dev, robh@kernel.org
Subject: Re: [PATCH v23 06/13] dt-bindings: arm: Document reboot mode magic
Date: Tue, 14 Jul 2026 17:33:09 +0000 [thread overview]
Message-ID: <20260714173309.9E3D91F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260714-arm-psci-system_reset2-vendor-reboots-v23-6-e7453c548c21@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The dt-schema constraints for the reboot mode cells are applied to the outer tuple array rather than the individual 32-bit cells within the tuple, silently bypassing the 0x80000000 minimum value check.
- [Medium] Incorrect use of `additionalProperties: false` alongside `$ref` inside the `reboot-mode` node definition.
--
--- Patch [6]: [PATCH v23 06/13] dt-bindings: arm: Document reboot mode magic ---
commit a9e970af5fba06441f5c9bf2192c866e245aed96
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 6e2e0c5518411..11b90e8affb32 100644
> --- a/Documentation/devicetree/bindings/arm/psci.yaml
> +++ b/Documentation/devicetree/bindings/arm/psci.yaml
> @@ -98,6 +98,37 @@ 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#
> + additionalProperties: false
[Severity: Medium]
Should this use unevaluatedProperties: false instead?
Using additionalProperties: false alongside a $ref does not consider
properties defined by the inherited schema (reboot-mode.yaml) or standard
properties injected by the dt-schema core (such as status or phandle).
This can cause dt_binding_check to incorrectly fail on valid device trees
that include standard properties.
> + properties:
> + # "mode-normal" is just SYSTEM_RESET
> + mode-normal: false
> + patternProperties:
> + "^mode-.*$":
> + minItems: 1
> + maxItems: 3
> + items:
> + - description: arg1 (vendor-specific SYSTEM_RESET2 reset_type)
> + minimum: 0x80000000
[Severity: Medium]
Does this correctly apply the minimum constraint to the 32-bit cell?
In dt-schema, uint32-array properties are parsed as a 2D array (an array
of tuples). Because items is placed directly under the property definition
here, it applies the minimum: 0x80000000 constraint to the first tuple
(which is an array) instead of the first cell (which is an integer).
Since JSON schema ignores numeric constraints on arrays, this silently
bypasses the check and allows invalid vendor-specific reset types.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260714-arm-psci-system_reset2-vendor-reboots-v23-0-e7453c548c21@oss.qualcomm.com?part=6
next prev parent reply other threads:[~2026-07-14 17:33 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 17:16 [PATCH v23 00/13] Implement PSCI reboot mode driver for PSCI resets Shivendra Pratap
2026-07-14 17:16 ` [PATCH v23 01/13] power: reset: reboot-mode: Remove devres based allocations Shivendra Pratap
2026-07-14 17:29 ` sashiko-bot
2026-07-14 17:16 ` [PATCH v23 02/13] power: reset: reboot-mode: Support up to 3 magic values per mode Shivendra Pratap
2026-07-14 17:30 ` sashiko-bot
2026-07-14 17:16 ` [PATCH v23 03/13] power: reset: reboot-mode: Add support for predefined reboot modes Shivendra Pratap
2026-07-14 17:27 ` sashiko-bot
2026-07-14 17:16 ` [PATCH v23 04/13] firmware: psci: Introduce command-based resets Shivendra Pratap
2026-07-14 17:28 ` sashiko-bot
2026-07-14 17:16 ` [PATCH v23 05/13] mfd: psci-mfd: Add PSCI MFD driver for cpuidle-psci-domain cell Shivendra Pratap
2026-07-14 17:27 ` sashiko-bot
2026-07-14 17:16 ` [PATCH v23 06/13] dt-bindings: arm: Document reboot mode magic Shivendra Pratap
2026-07-14 17:33 ` sashiko-bot [this message]
2026-07-14 17:16 ` [PATCH v23 07/13] power: reset: Add psci-reboot-mode driver Shivendra Pratap
2026-07-14 17:30 ` sashiko-bot
2026-07-14 17:16 ` [PATCH v23 08/13] mfd: core: Add firmware-node support to MFD cells Shivendra Pratap
2026-07-14 17:30 ` sashiko-bot
2026-07-14 17:16 ` [PATCH v23 09/13] mfd: psci-mfd: Add psci-reboot-mode child cell Shivendra Pratap
2026-07-14 17:24 ` sashiko-bot
2026-07-14 17:16 ` [PATCH v23 10/13] arm64: dts: qcom: Add psci reboot-modes for kodiak boards Shivendra Pratap
2026-07-14 17:32 ` sashiko-bot
2026-07-14 17:16 ` [PATCH v23 11/13] arm64: dts: qcom: Add psci reboot-modes for lemans boards Shivendra Pratap
2026-07-14 17:32 ` sashiko-bot
2026-07-14 17:16 ` [PATCH v23 12/13] arm64: dts: qcom: Add psci reboot-modes for monaco boards Shivendra Pratap
2026-07-14 17:31 ` sashiko-bot
2026-07-14 17:16 ` [PATCH v23 13/13] arm64: dts: qcom: Add psci reboot-modes for talos boards Shivendra Pratap
2026-07-14 17:32 ` sashiko-bot
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=20260714173309.9E3D91F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lee@kernel.org \
--cc=mfd@lists.linux.dev \
--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