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: <CACRpkdan-iG9po88btAndwTz_VRu0ccUAQDxyZeoBH1jCumUJQ@mail.gmail.com>
Date:   Tue, 23 May 2023 15:19:12 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Miquel Raynal <miquel.raynal@...tlin.com>
Cc:     Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Florian Fainelli <f.fainelli@...il.com>,
        Hauke Mehrtens <hauke@...ke-m.de>,
        Rafał Miłecki <zajec5@...il.com>,
        Broadcom internal kernel review list 
        <bcm-kernel-feedback-list@...adcom.com>,
        linux-mtd@...ts.infradead.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 0/2] Add SEAMA partition types

On Mon, May 22, 2023 at 4:46 PM Miquel Raynal <miquel.raynal@...tlin.com> wrote:

> > The mtdsplit code uses different magic numbers to identify where
> > the different partitions start.
>
> Is mtdsplit acting on a device or on a partition?

It acts on a partition, usually you use a fixed-partitition scheme to point
out the different chunks in the flash and then mtdsplit comes in to
do its job.

> Right now you define
> a partition to be compatible with seama, I would have imagined the
> partitions container should be compatible with seama instead of
> fixed-partitions, but I haven't looked at the whole implementation, so
> maybe my comment is just wrong.

The NAND flash on my device needs it to be a partition, it looks
like so:

&nandcs {
        /* Spansion S34ML01G2, 128MB with 128KB erase blocks */
        partitions {
                compatible = "fixed-partitions";
                #address-cells = <1>;
                #size-cells = <1>;

                firmware@0 {
                        compatible = "seama";
                        label = "firmware";
                        reg = <0x00000000 0x08000000>;
                };
        };
};

The reason is mainly that other devices may put eraseblocks
aside for other things, and the SEAMA format itself does not
know its extents (it needs to be told where the end of the
partition is).

> > One such type of partition is seama, so the code needs to know
> > that it should look for seama magic to determine the size and
> > split this partition in a kernel and rootfs part. This is the code:
> > https://git.openwrt.org/?p=openwrt/openwrt.git;a=tree;f=target/linux/generic/files/drivers/mtd/mtdsplit;h=3e0df856713a84b1decf17190f171cb10ce7a757;hb=HEAD
>
> That's very informative, thanks for all the context. I believe this
> could actually be part of the binding description (not the "this is an
> openWRT stuff", of course).

Hm I'll think about what I can put in there...

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ