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] [day] [month] [year] [list]
Message-ID: <Y4pSkOFaGQKc7j/6@euler>
Date:   Fri, 2 Dec 2022 11:31:28 -0800
From:   Colin Foster <colin.foster@...advantage.com>
To:     Rob Herring <robh@...nel.org>
Cc:     linux-renesas-soc@...r.kernel.org,
        linux-mediatek@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org, netdev@...r.kernel.org,
        John Crispin <john@...ozen.org>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Marek Vasut <marex@...x.de>,
        Sean Wang <sean.wang@...iatek.com>,
        DENG Qingfang <dqfext@...il.com>,
        Landen Chao <Landen.Chao@...iatek.com>,
        nç ÜNAL <arinc.unal@...nc9.com>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Clément Léger <clement.leger@...tlin.com>,
        Alvin Šipraga <alsi@...g-olufsen.dk>,
        Linus Walleij <linus.walleij@...aro.org>,
        UNGLinuxDriver@...rochip.com,
        Woojung Huh <woojung.huh@...rochip.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Kurt Kanzenbach <kurt@...utronix.de>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        "David S. Miller" <davem@...emloft.net>,
        Vladimir Oltean <olteanv@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        George McCollister <george.mccollister@...il.com>
Subject: Re: [PATCH v3 net-next 05/10] dt-bindings: net: dsa: qca8k: utilize
 shared dsa.yaml

Hi Rob,

On Thu, Dec 01, 2022 at 04:42:40PM -0600, Rob Herring wrote:
> On Sun, Nov 27, 2022 at 02:47:29PM -0800, Colin Foster wrote:
> > The dsa.yaml binding contains duplicated bindings for address and size
> > cells, as well as the reference to dsa-port.yaml. Instead of duplicating
> > this information, remove the reference to dsa-port.yaml and include the
> > full reference to dsa.yaml.
> > 
> > Signed-off-by: Colin Foster <colin.foster@...advantage.com>
> > Suggested-by: Vladimir Oltean <olteanv@...il.com>
> > ---
> > 
> > v2 -> v3
> >   * Remove #address-cells and #size-cells from v2. The examples were
> >     incorrect and fixed elsewhere.
> >   * Remove erroneous unevaluatedProperties: true under Ethernet Port.
> >   * Add back ref: dsa-port.yaml#.
> > 
> > v1 -> v2
> >   * Add #address-cells and #size-cells to the switch layer. They aren't
> >     part of dsa.yaml.
> >   * Add unevaluatedProperties: true to the ethernet-port layer so it can
> >     correctly read properties from dsa.yaml.
> > 
> > ---
> >  Documentation/devicetree/bindings/net/dsa/qca8k.yaml | 11 +++--------
> >  1 file changed, 3 insertions(+), 8 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
> > index 6fc9bc985726..93a9ddebcac8 100644
> > --- a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
> > +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml
> > @@ -66,20 +66,15 @@ properties:
> >                   With the legacy mapping the reg corresponding to the internal
> >                   mdio is the switch reg with an offset of -1.
> >  
> > +$ref: "dsa.yaml#"
> > +
> >  patternProperties:
> >    "^(ethernet-)?ports$":
> >      type: object
> > -    properties:
> > -      '#address-cells':
> > -        const: 1
> > -      '#size-cells':
> > -        const: 0
> > -
> >      patternProperties:
> >        "^(ethernet-)?port@[0-6]$":
> >          type: object
> >          description: Ethernet switch ports
> > -
> >          $ref: dsa-port.yaml#
> 
> So here you need 'unevaluatedProperties: false'.
> 
> unevaluatedProperties only applies to the properties defined in a single 
> node level, and child nodes properties from 2 schemas can't 'see' each 
> other. IOW, what dsa.yaml has in child nodes has no effect on this node. 

I'm buttoning up v4 right now and removing this line deletion.
unevaluatedProperties: false exists under the etherent-port node, just
at the end of the properties list.

Since the etherent-ports node in net/dsa/dsa.yaml has
unevaluatedProperties: false, I understand that isn't necessary here.

> 
> >  
> >          properties:
> > @@ -116,7 +111,7 @@ required:
> >    - compatible
> >    - reg
> >  
> > -additionalProperties: true
> > +unevaluatedProperties: false
> 
> So this has no effect on anything within "^(ethernet-)?port@[0-6]$" and 
> below.
> 
> Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ