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: <79c7891a-9a68-a111-094d-be9804071a9e@pengutronix.de>
Date:   Wed, 4 May 2022 11:23:06 +0200
From:   Ahmad Fatoum <a.fatoum@...gutronix.de>
To:     Rafał Miłecki <zajec5@...il.com>,
        Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>
Cc:     Tom Rini <trini@...sulko.com>, linux-mtd@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        u-boot@...ts.denx.de, devicetree@...r.kernel.org,
        Rafał Miłecki <rafal@...ecki.pl>,
        Pengutronix Kernel Team <kernel@...gutronix.de>
Subject: Re: [PATCH V2] nvmem: add driver handling U-Boot environment
 variables

Hello Rafał,

On 03.05.22 18:56, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@...ecki.pl>
> 
> U-Boot stores its setup as environment variables. It's a list of
> key-value pairs stored on flash device with a custom header.
> 
> This commit adds an NVMEM driver that:
> 1. Provides NVMEM access to environment vars binary data
> 2. Extracts variables as NVMEM cells
> 
> It can be used for:
> 1. Accessing env variables from user-space

Is this already possible? The only interface I know of is the /nvmem
file in sysfs, but that one is not per cell, but per device.

> +	label = of_get_property(np->parent, "label", NULL);
> +	if (!label)
> +		label = np->parent->name;
> +
> +	priv->mtd = get_mtd_device_nm(label);
> +	if (IS_ERR(priv->mtd)) {
> +		dev_err(dev, "Failed to find \"%s\" MTD device: %ld\n", label, PTR_ERR(priv->mtd));
> +		return PTR_ERR(priv->mtd);
> +	}

I am trying to make sense of this using the binding, but I can't.
Do you have an example device tree fragment?

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