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: <3f050e96-8bd3-a77e-b1cf-1739a1be0c2d@pengutronix.de>
Date:   Mon, 2 Nov 2020 16:23:35 +0100
From:   Ahmad Fatoum <a.fatoum@...gutronix.de>
To:     Rob Herring <robh@...nel.org>,
        Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc:     devicetree@...r.kernel.org, ceggers@...i.de,
        linux-kernel@...r.kernel.org, kernel@...gutronix.de
Subject: Re: [PATCH v3 0/2] nvmem: skip nodes with compatibles other than
 "nvmem-cell"

Hello Rob,
Hello Srini,

On 10/12/20 5:36 PM, Ahmad Fatoum wrote:
> On 5/12/20 4:18 PM, Rob Herring wrote:

[snip]

>> I think instead, nvmem cells should be contained within a partition. 
>> The partition should then have a compatible to indicate it contains 
>> nvmem cells.
> 
> I thought I had understood what needs to be done, but now that I finally have time
> to do it, I see that this only solves the second issue "extending the NVMEM binding
> to nodes that already have other child nodes, e.g., MTD and its partitions".
> 
> The first issue: "future extension of e.g. eeprom nodes by any child nodes other than
> nvmem cells" isn't solved by having a containing partition.
> 
> 
> My issue is that the bootloader fixes up a partitions { compatible = "fixed-partitions"; }
> child node into the kernel device tree. The NVMEM core driver tries to parse all eeprom child
> nodes as cells and will make the driver probe of the EEPROM fail, because it can't parse that
> fixed-partitions node as a nvmem cell.
> 
> To allow for co-existence of NVMEM cells and other subnodes, would following patch be
> acceptable to you and Srini?

Gentle ping. Would the patch below be acceptable?

> 
> ---------------------------------------- 8< --------------------------------------
> --- a/Documentation/devicetree/bindings/nvmem/nvmem.yaml
> +++ b/Documentation/devicetree/bindings/nvmem/nvmem.yaml
> @@ -45,7 +45,15 @@ properties:
>  patternProperties:
>    "^.*@[0-9a-f]+$":
>      type: object
> -
> +    if:
> +      not:
> +        properties:
> +          compatible:
> +    then:
> +      $ref: "#/definitions/nvmem-cell"
> +
> +definitions:
> +  nvmem-cell:
>      properties:
>        reg:
>          maxItems: 1

Cheers,
Ahmad

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ