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: <YbtC2I49D0pdcyLY@orome>
Date:   Thu, 16 Dec 2021 14:44:56 +0100
From:   Thierry Reding <thierry.reding@...il.com>
To:     Dmitry Osipenko <digetx@...il.com>
Cc:     David Heidelberg <david@...t.cz>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Jonathan Hunter <jonathanh@...dia.com>,
        ~okias/devicetree@...ts.sr.ht, alsa-devel@...a-project.org,
        devicetree@...r.kernel.org, linux-tegra@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] dt-bindings: sound: nvidia,tegra-audio: Convert
 multiple txt bindings to yaml

On Thu, Dec 16, 2021 at 05:52:12AM +0300, Dmitry Osipenko wrote:
> 12.12.2021 01:49, David Heidelberg пишет:
> > +unevaluatedProperties: false
> > +
> > +examples:
> > +  - |
> > +    sound {
> > +        compatible = "nvidia,tegra-audio-rt5677-ryu",
> > +                     "nvidia,tegra-audio-rt5677";
> > +        nvidia,model = "NVIDIA Tegra Ryu";
> > +
> > +        nvidia,audio-routing =
> > +                "Headphone", "LOUT2",
> > +                "Headphone", "LOUT1",
> > +                "Headset Mic", "MICBIAS1",
> > +                "IN1P", "Headset Mic",
> > +                "IN1N", "Headset Mic",
> > +                "DMIC L1", "Internal Mic 1",
> > +                "DMIC R1", "Internal Mic 1",
> > +                "DMIC L2", "Internal Mic 2",
> > +                "DMIC R2", "Internal Mic 2",
> > +                "Speaker", "PDM1L",
> > +                "Speaker", "PDM1R";
> > +
> > +        nvidia,i2s-controller = <&tegra_i2s1>;
> > +        nvidia,audio-codec = <&rt5677>;
> > +
> > +        nvidia,hp-det-gpios = <&gpio 143 0>;
> > +        nvidia,mic-present-gpios = <&gpio 132 1>;
> > +        nvidia,hp-en-gpios = <&rt5677 1 0>;
> > +        nvidia,dmic-clk-en-gpios = <&rt5677 2 1>;
> 
> I spotted that nvidia,dmic-clk-en-gpios is undocumented, but DTs and
> binding are passing the validation. We will make another patch to fix it.
> 
> Rob, could you please tell whether this is because unevaluatedProperties
> doesn't work yet or we're missing something?

If you update dt-schema.git to the latest "main" branch you should have
most of what's needed to make unevaluatedProperties work. However, there
seems to be an issue with some $referenced schemas setting
additionalProperties to true and then that gets propogated to the schema
that included it.

Rob came up with the patch below to fix that:

--- >8 ---
diff --git a/dtschema/lib.py b/dtschema/lib.py
index 3cc5e428b0eb..a0f22aab935a 100644
--- a/dtschema/lib.py
+++ b/dtschema/lib.py
@@ -367,6 +367,9 @@ def fixup_sub_schema(schema, is_prop):
     if not isinstance(schema, dict):
         return

+    if 'additionalProperties' in schema and schema['additionalProperties'] == True:
+        schema.pop('additionalProperties', None)
+
     schema.pop('description', None)
     fixup_interrupts(schema)
     if is_prop:
--- >8 ---

I'm currently running the tools based on that and it's indeed been
flagging some properties as unevaluated that weren't there before.

Thierry

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ