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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221201223309.GA1555093-robh@kernel.org>
Date:   Thu, 1 Dec 2022 16:33:09 -0600
From:   Rob Herring <robh@...nel.org>
To:     Colin Foster <colin.foster@...advantage.com>
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 04/10] dt-bindings: net: dsa: allow
 additional ethernet-port properties

On Mon, Nov 28, 2022 at 11:21:18PM -0800, Colin Foster wrote:
> On Mon, Nov 28, 2022 at 05:27:59PM -0600, Rob Herring wrote:
> > On Sun, Nov 27, 2022 at 02:47:28PM -0800, Colin Foster wrote:
> > > Explicitly allow additional properties for both the ethernet-port and
> > > ethernet-ports properties. This specifically will allow the qca8k.yaml
> > > binding to use shared properties.
> > > 
> > > Signed-off-by: Colin Foster <colin.foster@...advantage.com>
> > > ---
> > > 
> > > v2 -> v3
> > >   * No change
> > > 
> > > v1 -> v2
> > >   * New patch
> > > 
> > > ---
> > >  Documentation/devicetree/bindings/net/dsa/dsa.yaml | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> > > index bd1f0f7c14a8..87475c2ab092 100644
> > > --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> > > +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
> > > @@ -38,6 +38,8 @@ patternProperties:
> > >        '#size-cells':
> > >          const: 0
> > >  
> > > +    additionalProperties: true
> > > +
> > 
> > Where then do we restrict adding properties to ethernet-ports nodes?
> > 
> > >      patternProperties:
> > >        "^(ethernet-)?port@[0-9]+$":
> > >          type: object
> > > @@ -45,7 +47,7 @@ patternProperties:
> > >  
> > >          $ref: dsa-port.yaml#
> > >  
> > > -        unevaluatedProperties: false
> > > +        unevaluatedProperties: true
> > 
> > Same question for ethernet-port nodes.
> 
> For ethernet-port nodes, the qca8k has unevaluatedProperties: false. But
> the fact that you're asking this question means I probably misunderstood
> something...

The above is the case where you aren't adding extra properties (IIRC), 
so 'unevaluatedProperties: false' should be correct.

'unevaluatedProperties: true' is never correct in bindings. If you ref a
schema that sets it to true, you can't override it.

So qca8k, should reference dsa-port.yaml, define its extra properties 
and set 'unevaluatedProperties: false'.

> For the ethernet-ports node, I'm curious if my other follow-up answers
> that question where I realized dsa.yaml should, under the base
> definition, have additionalPrpoerties: false. But again, my guess is
> that isn't the case.

That one looks correct.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ