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]
Date:   Wed, 26 May 2021 11:04:56 -0500
From:   Rob Herring <robh+dt@...nel.org>
To:     Nishanth Menon <nm@...com>
Cc:     Kishon Vijay Abraham I <kishon@...com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        PCI <linux-pci@...r.kernel.org>, devicetree@...r.kernel.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Lokesh Vutla <lokeshvutla@...com>
Subject: Re: [PATCH] dt-bindings: PCI: ti,am65: Convert PCIe host/endpoint
 mode dt-bindings to YAML

On Wed, May 26, 2021 at 9:09 AM Nishanth Menon <nm@...com> wrote:
>
> On 19:17-20210526, Kishon Vijay Abraham I wrote:
> > Convert PCIe host/endpoint mode dt-bindings for TI's AM65/Keystone SoC
> > to YAML binding.
> >
> > Signed-off-by: Kishon Vijay Abraham I <kishon@...com>
>
> [...]
> > diff --git a/Documentation/devicetree/bindings/pci/ti,am65-pci-ep.yaml b/Documentation/devicetree/bindings/pci/ti,am65-pci-ep.yaml
> > new file mode 100644
> > index 000000000000..419d48528105
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/pci/ti,am65-pci-ep.yaml
> > @@ -0,0 +1,80 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +# Copyright (C) 2021 Texas Instruments Incorporated - http://www.ti.com/
> > +%YAML 1.2
> > +---
> > +$id: "http://devicetree.org/schemas/pci/ti,am65-pci-ep.yaml#"
>
> drop the '"'?

Yes, though we haven't been consistent here...

> > +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
>
> drop the '"'?
> > +
> > +title: TI AM65 PCI Endpoint
> > +
> > +maintainers:
> > +  - Kishon Vijay Abraham I <kishon@...com>
> > +
> > +allOf:
> > +  - $ref: "pci-ep.yaml#"
>
> drop the '"' ?
>
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - ti,am654-pcie-ep
> > +
> > +  reg:
> > +    maxItems: 4
> > +
> > +  reg-names:
> > +    items:
> > +      - const: app
> > +      - const: dbics
> > +      - const: addr_space
> > +      - const: atu
> > +
> > +  power-domains:
> > +    maxItems: 1
> > +
> > +  ti,syscon-pcie-mode:
> > +    description: Phandle to the SYSCON entry required for configuring PCIe in RC or EP mode.
> > +    $ref: /schemas/types.yaml#/definitions/phandle
> > +
> > +  interrupts:
> > +    minItems: 1
> > +
> > +  dma-coherent: true
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - reg-names
> > +  - max-link-speed
> > +  - power-domains
> > +  - ti,syscon-pcie-mode
> > +  - dma-coherent
> > +
> > +unevaluatedProperties: false
>
> Is it possible to lock this down further with additionalProperties: false?

unevaluatedProperties is what we want here.

> I could add some ridiculous property like system-controller; to the
> example and the checks wont catch it.

Yes, because unevaluatedProperties is currently unimplemented. Once
the upstream jsonschema tool supports it[1], there will be warnings.
The other way we could address this is there are $ref resolving tools
that flatten schemas.

Rob

[1] https://github.com/Julian/jsonschema/issues/613#issuecomment-636026577

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ