lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOX2RU4u+v9EPAPoxZmL4iGAmt+VuuxNJW-_AE7TZaFHZBTaEA@mail.gmail.com>
Date:   Tue, 23 Aug 2022 20:23:13 +0200
From:   Robert Marko <robimarko@...il.com>
To:     Rob Herring <robh@...nel.org>
Cc:     Support Opensource <support.opensource@...semi.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Javier Martinez Canillas <javier@...hile0.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Konrad Dybcio <konrad.dybcio@...ainline.org>,
        Adam Ward <Adam.Ward.opensource@...semi.com>,
        Hsin-Hsiung Wang <hsin-hsiung.wang@...iatek.com>,
        Sumit Semwal <sumit.semwal@...aro.org>,
        ChiYuan Huang <cy_huang@...htek.com>,
        Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH] regulator: dt-bindings: Add missing (unevaluated|additional)Properties
 on child nodes

On Tue, 23 Aug 2022 at 16:57, Rob Herring <robh@...nel.org> wrote:
>
> In order to ensure only documented properties are present, node schemas
> must have unevaluatedProperties or additionalProperties set to false
> (typically).
>
> Signed-off-by: Rob Herring <robh@...nel.org>
> ---
>  .../bindings/regulator/dlg,da9121.yaml           |  1 +
>  .../bindings/regulator/maxim,max77802.yaml       |  1 +
>  .../bindings/regulator/maxim,max8997.yaml        |  1 +
>  .../bindings/regulator/mt6315-regulator.yaml     |  1 +
>  .../bindings/regulator/qcom,spmi-regulator.yaml  |  1 +
>  .../regulator/qcom-labibb-regulator.yaml         | 16 ++++++++++++++++
>  .../regulator/richtek,rt4801-regulator.yaml      |  1 +
>  .../regulator/rohm,bd71815-regulator.yaml        |  1 +
>  8 files changed, 23 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml b/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml
> index 24ace6e1e5ec..63e1161a87de 100644
> --- a/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml
> +++ b/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml
> @@ -83,6 +83,7 @@ properties:
>
>    regulators:
>      type: object
> +    additionalProperties: false
>      description: |
>        List of regulators provided by the device
>
> diff --git a/Documentation/devicetree/bindings/regulator/maxim,max77802.yaml b/Documentation/devicetree/bindings/regulator/maxim,max77802.yaml
> index 236348c4710c..71138c611b6c 100644
> --- a/Documentation/devicetree/bindings/regulator/maxim,max77802.yaml
> +++ b/Documentation/devicetree/bindings/regulator/maxim,max77802.yaml
> @@ -79,6 +79,7 @@ patternProperties:
>      patternProperties:
>        regulator-state-(standby|mem|disk):
>          type: object
> +        additionalProperties: true
>          properties:
>            regulator-mode: false
>
> diff --git a/Documentation/devicetree/bindings/regulator/maxim,max8997.yaml b/Documentation/devicetree/bindings/regulator/maxim,max8997.yaml
> index 4321f061a7f6..2b266ea43716 100644
> --- a/Documentation/devicetree/bindings/regulator/maxim,max8997.yaml
> +++ b/Documentation/devicetree/bindings/regulator/maxim,max8997.yaml
> @@ -111,6 +111,7 @@ properties:
>
>    regulators:
>      type: object
> +    additionalProperties: false
>      description:
>        List of child nodes that specify the regulators.
>
> diff --git a/Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml b/Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml
> index 37402c370fbb..364b58730be2 100644
> --- a/Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml
> +++ b/Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml
> @@ -29,6 +29,7 @@ properties:
>        "^vbuck[1-4]$":
>          type: object
>          $ref: "regulator.yaml#"
> +        unevaluatedProperties: false
>
>          properties:
>            regulator-compatible:
> diff --git a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml
> index 8b7c4af4b551..3266cd0c580f 100644
> --- a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml
> +++ b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml
> @@ -35,6 +35,7 @@ patternProperties:
>      description: List of regulators and its properties
>      type: object
>      $ref: regulator.yaml#
> +    unevaluatedProperties: false
>
>      properties:
>        qcom,ocp-max-retries:
> diff --git a/Documentation/devicetree/bindings/regulator/qcom-labibb-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom-labibb-regulator.yaml
> index 1ddc1efd19e2..f97b8083678f 100644
> --- a/Documentation/devicetree/bindings/regulator/qcom-labibb-regulator.yaml
> +++ b/Documentation/devicetree/bindings/regulator/qcom-labibb-regulator.yaml
> @@ -20,6 +20,7 @@ properties:
>
>    lab:
>      type: object
> +    additionalProperties: false
>
>      properties:
>        qcom,soft-start-us:
> @@ -33,11 +34,19 @@ properties:
>          description:
>            Short-circuit and over-current interrupts for lab.
>
> +      interrupt-names:
> +        minItems: 1
> +        items:
> +          - const: sc-err
> +          - const: ocp
> +
>      required:
>        - interrupts
> +      - interrupt-names
>
>    ibb:
>      type: object
> +    additionalProperties: false
>
>      properties:
>        qcom,discharge-resistor-kohms:
> @@ -52,8 +61,15 @@ properties:
>          description:
>            Short-circuit and over-current interrupts for ibb.
>
> +      interrupt-names:
> +        minItems: 1
> +        items:
> +          - const: sc-err
> +          - const: ocp
> +
>      required:
>        - interrupts
> +      - interrupt-names
>
>  required:
>    - compatible
> diff --git a/Documentation/devicetree/bindings/regulator/richtek,rt4801-regulator.yaml b/Documentation/devicetree/bindings/regulator/richtek,rt4801-regulator.yaml
> index 091150c4e579..4a8a221bc902 100644
> --- a/Documentation/devicetree/bindings/regulator/richtek,rt4801-regulator.yaml
> +++ b/Documentation/devicetree/bindings/regulator/richtek,rt4801-regulator.yaml
> @@ -42,6 +42,7 @@ patternProperties:
>    "^DSV(P|N)$":
>      type: object
>      $ref: regulator.yaml#
> +    unevaluatedProperties: false
>      description:
>        Properties for single display bias regulator.
>
> diff --git a/Documentation/devicetree/bindings/regulator/rohm,bd71815-regulator.yaml b/Documentation/devicetree/bindings/regulator/rohm,bd71815-regulator.yaml
> index 7d0adb74a396..d61e8675f067 100644
> --- a/Documentation/devicetree/bindings/regulator/rohm,bd71815-regulator.yaml
> +++ b/Documentation/devicetree/bindings/regulator/rohm,bd71815-regulator.yaml
> @@ -27,6 +27,7 @@ properties:
>      description:
>        properties for wled regulator
>      $ref: regulator.yaml#
> +    unevaluatedProperties: false
>
>      properties:
>        regulator-name:
> --
> 2.34.1

For qcom,spmi-regulator.yaml:
Reviewed-by: Robert Marko <robimarko@...il.com>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ