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:   Mon, 21 Mar 2022 09:17:15 +0100
From:   Krzysztof Kozlowski <krzk@...nel.org>
To:     Chris Packham <Chris.Packham@...iedtelesis.co.nz>,
        "huziji@...vell.com" <huziji@...vell.com>,
        "ulf.hansson@...aro.org" <ulf.hansson@...aro.org>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>
Cc:     "linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] dt-bindings: mmc: xenon: Convert to JSON schema

On 20/03/2022 20:51, Chris Packham wrote:
> 

(...)

>>> +
>>> +patternProperties:
>>> +  "^sdhci@[0-9a-f]+$":
>>> +    type: object
>>> +    $ref: mmc-controller.yaml
>> This is unusual schema... What are you matching here? Are these children
>> of this device?
> I was going for compatibility with existing uses. The 
> mmc-controller.yaml schema expects these nodes to be mmc@... . But all 
> of the existing usages of these bindings use sdhci@... as the primary 
> node. I could make my example use mmc@ to squash the warning but I was 
> hoping to be able to do something that didn't make the existing usages 
> invalid.

Please do not create inconsistent bindings because some DTS are
inconsistent. Change the DTS and align them with generic MMC schema.
Node name should not be considered an ABI, so it can be changed in DTS.
Some systems unfortunately break (usually Android and Chrome like to
encode node names), so then it would have to be individually discussed.

>> Looks like you wanted allOf. See some existing examples, like:
>> Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
>>
>>> +
>>> +    properties:
>>> +      compatible:
>>> +        oneOf:
>>> +          - const: marvell,armada-3700-sdhci
>>> +            description: |
>>> +              Must provide a second register area and marvell,pad-type
>>> +          - const: marvell,armada-ap806-sdhci
>>> +          - const: marvell,armada-ap807-sdhci
>> This looks wrong. Either these can be standalone properties or in a list
>> like in your last items below.
> I was trying to allow 'compatible = "marvell,armada-ap806-sdhci";' or 
> 'compatible = "marvell,armada-ap807-sdhci", "marvell,armada-ap806-sdhci";'

But you have here 807! Both 806 and 807.  So is 807 compatible with 806
or not?

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ