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:   Fri, 5 Mar 2021 16:23:00 -0600
From:   Rob Herring <robh@...nel.org>
To:     Rafał Miłecki <zajec5@...il.com>
Cc:     Ansuel Smith <ansuelsmth@...il.com>,
        Richard Weinberger <richard@....at>,
        devicetree@...r.kernel.org, Vignesh Raghavendra <vigneshr@...com>,
        Boris Brezillon <bbrezillon@...nel.org>,
        linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org,
        Miquel Raynal <miquel.raynal@...tlin.com>
Subject: Re: [PATCH v2 3/3] dt-bindings: mtd: Document use of
 nvmem-partitions compatible

On Wed, Mar 03, 2021 at 11:01:55AM +0100, Rafał Miłecki wrote:
> [Rob: please advise]
> 
> On 16.02.2021 22:26, Ansuel Smith wrote:
> > Document nvmem-partitions compatible used to treat mtd partitions as a
> > nvmem provider.
> 
> Until now we were using "compatible" string in partition node only for
> parsers (looking for subpartitions). We need to think if this change can
> break anything from DT / Linux perspective.
> 
> Compatible strings should be unique, so there is no risk of conflict
> between NVMEM and parsers.
> 
> Now: can we ever need mtd partition to:
> 1. Contain subpartitions
> 2. Provide NVMEM
> at the same time?
> 
> Let's say:
> 
> partition@0 {
> 	compatible = "vendor,dynamic-firmware-partitions", "nvmem-partitions";

I think you'd want the "vendor,dynamic-firmware-partitions" parser/code 
to serve up any nvmem regions. Whether you have a fallback here depends 
if an OS could make use of the regions knowing nothing about 
"vendor,dynamic-firmware-partitions".

> 	label = "firmware";
> 	reg = <0x0 0x100000>;
> 	#address-cells = <1>;
> 	#size-cells = <1>;
> 	ranges = <0 0x0 0x100000>;
> 
> 	firmware-version@10 {
> 		reg = <0x10 0x4>;
> 	};
> 
> 	firmware-date@10 {
> 		reg = <0x20 0x4>;
> 	};
> };
> 
> Is that allowed to respect both "compatible" strings and have:
> 1. Linux parser parse "firmware" for subpartitions
> 2. Linux MTD register "firmware" as NVMEM device
> ?
> 
> If not, what other options do we have? Is that allowed to have a
> dangling MTD NVMEM node with phandle to MTD partition?
> 
> firmware: partition@0 {
> 	compatible = "vendor,dynamic-firmware-partitions";
> 	label = "firmware";
> 	reg = <0x0 0x100000>;
> };
> 
> (...)
> 
> firmware-version@10 {
> 	compatible = "mtd-nvmem";
> 	reg = <0x10 0x4>;
> 	mtd = <&firmware>;
> };
> 
> firmware-date@10 {
> 	compatible = "mtd-nvmem";
> 	reg = <0x20 0x4>;
> 	mtd = <&firmware>;
> };

This, I would not like to see.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ