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, 4 Dec 2019 11:17:51 +0100
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Vignesh Raghavendra <vigneshr@...com>
Cc:     Richard Weinberger <richard@....at>,
        Tudor Ambarus <Tudor.Ambarus@...rochip.com>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        <linux-mtd@...ts.infradead.org>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Mark Brown <broonie@...nel.org>,
        Boris Brezillon <boris.brezillon@...labora.com>,
        Paul Kocialkowski <paul.kocialkowski@...tlin.com>,
        Bernhard Frauendienst <kernel@...pam.obeliks.de>
Subject: Re: [PATCH v5 4/4] mtd: Add driver for concatenating devices

Hi Vignesh,

Vignesh Raghavendra <vigneshr@...com> wrote on Wed, 4 Dec 2019 15:28:46
+0530:

> Hi Miquel,
> 
> On 27/11/19 4:25 pm, Miquel Raynal wrote:
> > Introduce a generic way to define concatenated MTD devices. This may
> > be very useful in the case of ie. stacked SPI-NOR. Partitions to
> > concatenate are described in an additional property of the partitions
> > subnode:
> > 
> >         flash0 {
> >                 partitions {
> >                         compatible = "fixed-partitions";
> >                         part-concat = <&flash0_part1>, <&flash1_part0>;
> > 
> > 			part0@0 {
> > 				label = "part0_0";
> > 				reg = <0x0 0x800000>;
> > 			};
> > 
> > 			flash0_part1: part1@...000 {
> > 				label = "part0_1";
> > 				reg = <0x800000 0x800000>;
> > 			};
> >                 };
> >         };  
> 
> IIUC flash0 and flash1 are subnodes of a SPI master node?
> And I believe flash0 node's compatible is "jedec,spi-nor"?

Indeed this is one possibility (probably the most common) but in theory
this should work for any kind of MTD device, hence I voluntarily
dropped the hardware-specific properties to focus on the partitions
description here.

> 
> 
> > 
> >         flash1 {
> >                 partitions {
> >                         compatible = "fixed-partitions";
> > 
> > 			flash0_part1: part1@0 {  
> 
> s/flash0_part1/flash1_part0?

Right!

> 
> > 				label = "part1_0";
> > 				reg = <0x0 0x800000>;
> > 			};
> > 
> > 			part0@...000 {
> > 				label = "part1_1";
> > 				reg = <0x800000 0x800000>;
> > 			};
> >                 };
> >         };
> >   
> 
> For my understanding, how many /dev/mtdX entries would this create?

If the master is retained (Kconfig option) and thanks to the common
partitioning scheme, we would have:
* flash0 (mtd0)
*   part0_0 (mtd1)
*   part0_1 (mtd2)
* flash1 (mtd3)
*   part1_0 (mtd4)
*   part1_1 (mtd5)

If we enable this driver, we would also get an additional device:
* mtd2-mtd4-concat (or part0_1-part1_0-concat, I don't recall the exact
  name) being mtd6.


Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ