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: <20211014120601.133e9a84@dellmb>
Date:   Thu, 14 Oct 2021 12:06:01 +0200
From:   Marek BehĂșn <kabel@...nel.org>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc:     robh+dt@...nel.org, devicetree@...r.kernel.org,
        U-Boot Mailing List <u-boot@...ts.denx.de>,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        Luka Kovacic <luka.kovacic@...tura.hr>
Subject: Re: [PATCH RFC linux] dt-bindings: nvmem: Add binding for U-Boot
 environment NVMEM provider

On Thu, 14 Oct 2021 09:26:27 +0100
Srinivas Kandagatla <srinivas.kandagatla@...aro.org> wrote:

> On 14/10/2021 00:20, Marek BehĂșn wrote:
> > Add device tree bindings for U-Boot environment NVMEM provider.
> > 
> > U-Boot environment can be stored at a specific offset of a MTD
> > device, EEPROM, MMC, NAND or SATA device, on an UBI volume, or in a
> > file on a filesystem.
> > 
> > The environment can contain information such as device's MAC
> > address, which should be used by the ethernet controller node.
> >   
> 
> Have you looked at 
> ./Documentation/devicetree/bindings/mtd/partitions/nvmem-cells.yaml ?

Hello srini,

yes, I have. What about it? :)

That binding won't work for u-boot-env, because the data are stored
in a different way. A cell does not have a constant predetermined
offset on the MTD.
The variables are stored as a sequence of values of format
"name=value", separated by '\0's, for example:
  board=turris_mox\0ethaddr=00:11:22:33:44:55\0bootcmd=run distro_bootcmd\0....
Chaning lengths of values of variables, or deleting variables, moves
the data around. Integers and MAC addresses are stored as strings, and so on.

Also the mtd/partitions/nvmem-cells.yaml doesn't take into account
u-boot-env stored on non-MTD devices.

Marek

  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ