All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Shivendra Pratap" <shivendra.pratap@oss.qualcomm.com>
Cc: mfd@lists.linux.dev, lee@kernel.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v24 05/12] dt-bindings: arm: Document reboot mode magic
Date: Mon, 03 Aug 2026 10:09:35 +0000	[thread overview]
Message-ID: <20260803100936.3E40E1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260803-arm-psci-system_reset2-vendor-reboots-v24-5-889281373870@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Incorrect tuple validation of a 2D `uint32-array`, applying outer array constraints and invalid property-level type `$ref`s to inner elements, breaking validation and dropping the `minimum` constraint.
--

--- Patch [5]: [PATCH v24 05/12] dt-bindings: arm: Document reboot mode magic ---
commit 27b283c27fa751f1b79c98734e61c56bbcfb0f0f
Author: Shivendra Pratap <shivendra.pratap@oss.qualcomm.com>

dt-bindings: arm: Document reboot mode magic

This commit adds bindings to describe vendor-specific reboot modes in the PSCI
SYSTEM_RESET2 call. The values defined here correspond to valid parameters
for vendor-specific reset types.

> diff --git a/Documentation/devicetree/bindings/arm/psci.yaml b/Documentation/devicetree/bindings/arm/psci.yaml
> index 6e2e0c5518411..7d6a86690a2e5 100644
> --- a/Documentation/devicetree/bindings/arm/psci.yaml
> +++ b/Documentation/devicetree/bindings/arm/psci.yaml
> @@ -98,6 +98,41 @@ properties:
[ ... ]
> +    patternProperties:
> +      "^mode-.*$":
> +        minItems: 1
> +        maxItems: 3
> +        items:
> +          - description: arg1 (vendor-specific SYSTEM_RESET2 reset_type)
> +            allOf:
> +              - $ref: /schemas/types.yaml#/definitions/uint32
> +              - minimum: 0x80000000
> +          - description: arg2 (cookie_lo in 2-cell form, cookie_hi in 3-cell form)
> +            $ref: /schemas/types.yaml#/definitions/uint32
> +          - description: arg3 (cookie_lo in 3-cell form)
> +            $ref: /schemas/types.yaml#/definitions/uint32

[Severity: Medium]
Will this schema correctly validate the property values?

Since dt-schema parses device tree arrays as 2D arrays, applying JSON Schema
items list validation to the outer array evaluates the entire inner tuple as a
single element against the schema for arg1.

This regression can cause dt_binding_check to reject valid device trees because
it ends up validating a 1xN array against uint32, which expects a 1x1 matrix.

Because JSON Schema ignores minimum constraints when applied to an array, is it
possible this silently bypasses the minimum constraint of 0x80000000?

Should this pattern property reference /schemas/types.yaml#/definitions/uint32-array
with the element constraints applied natively under it?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260803-arm-psci-system_reset2-vendor-reboots-v24-0-889281373870@oss.qualcomm.com?part=5

  reply	other threads:[~2026-08-03 10:09 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03  9:43 [PATCH v24 00/12] Implement PSCI reboot mode driver for PSCI resets Shivendra Pratap
2026-08-03  9:43 ` [PATCH v24 01/12] power: reset: reboot-mode: Support up to 3 magic values per mode Shivendra Pratap
2026-08-03  9:56   ` sashiko-bot
2026-08-03  9:43 ` [PATCH v24 02/12] power: reset: reboot-mode: Add support for predefined reboot modes Shivendra Pratap
2026-08-03  9:59   ` sashiko-bot
2026-08-04 14:19     ` Shivendra Pratap
2026-08-03  9:43 ` [PATCH v24 03/12] firmware: psci: Introduce command-based resets Shivendra Pratap
2026-08-03 10:01   ` sashiko-bot
2026-08-04 14:38     ` Shivendra Pratap
2026-08-03  9:43 ` [PATCH v24 04/12] mfd: psci-mfd: Add PSCI MFD driver for cpuidle-psci-domain cell Shivendra Pratap
2026-08-03 10:00   ` sashiko-bot
2026-08-12  8:15     ` Lee Jones
2026-08-03  9:43 ` [PATCH v24 05/12] dt-bindings: arm: Document reboot mode magic Shivendra Pratap
2026-08-03 10:09   ` sashiko-bot [this message]
2026-08-03 11:44   ` Rob Herring (Arm)
2026-08-03 12:46     ` Shivendra Pratap
2026-08-03 14:02   ` Rob Herring
2026-08-03 14:21     ` Shivendra Pratap
2026-08-03  9:43 ` [PATCH v24 06/12] power: reset: Add psci-reboot-mode driver Shivendra Pratap
2026-08-03 10:11   ` sashiko-bot
2026-08-03 13:07     ` Shivendra Pratap
2026-08-03  9:43 ` [PATCH v24 07/12] mfd: core: Add firmware-node support to MFD cells Shivendra Pratap
2026-08-03 10:07   ` sashiko-bot
2026-08-03  9:43 ` [PATCH v24 08/12] mfd: psci-mfd: Add psci-reboot-mode child cell Shivendra Pratap
2026-08-03 10:07   ` sashiko-bot
2026-08-03 12:52     ` Shivendra Pratap
2026-08-12  8:18   ` Lee Jones
2026-08-12  8:32     ` Bartosz Golaszewski
2026-08-03  9:43 ` [PATCH v24 09/12] arm64: dts: qcom: Add psci reboot-modes for kodiak boards Shivendra Pratap
2026-08-03 10:13   ` sashiko-bot
2026-08-03  9:43 ` [PATCH v24 10/12] arm64: dts: qcom: Add psci reboot-modes for lemans boards Shivendra Pratap
2026-08-03 10:15   ` sashiko-bot
2026-08-03  9:43 ` [PATCH v24 11/12] arm64: dts: qcom: Add psci reboot-modes for monaco boards Shivendra Pratap
2026-08-03 10:13   ` sashiko-bot
2026-08-03  9:43 ` [PATCH v24 12/12] arm64: dts: qcom: Add psci reboot-modes for talos boards Shivendra Pratap
2026-08-03 10:14   ` 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=20260803100936.3E40E1F000E9@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 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.