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: <20230309141920.1d3f774e@xps-13>
Date:   Thu, 9 Mar 2023 14:19:20 +0100
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Rafał Miłecki <zajec5@...il.com>
Cc:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        Hector Martin <marcan@...can.st>,
        Sven Peter <sven@...npeter.dev>,
        Alyssa Rosenzweig <alyssa@...enzweig.io>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        Neil Armstrong <neil.armstrong@...aro.org>,
        Kevin Hilman <khilman@...libre.com>,
        Jerome Brunet <jbrunet@...libre.com>,
        Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
        Claudiu Beznea <claudiu.beznea@...rochip.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        Heiko Stuebner <heiko@...ech.de>,
        Orson Zhai <orsonzhai@...il.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        Chunyan Zhang <zhang.lyra@...il.com>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Vincent Shih <vincent.sunplus@...il.com>,
        Chen-Yu Tsai <wens@...e.org>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        Samuel Holland <samuel@...lland.org>,
        Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Michal Simek <michal.simek@...inx.com>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Evgeniy Polyakov <zbr@...emap.net>,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
        asahi@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
        linux-amlogic@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
        linux-rockchip@...ts.infradead.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-sunxi@...ts.linux.dev, linux-rtc@...r.kernel.org,
        Michael Walle <michael@...le.cc>,
        Rafał Miłecki <rafal@...ecki.pl>
Subject: Re: [PATCH V3] nvmem: add explicit config option to read OF fixed
 cells

Hi Rafał,

zajec5@...il.com wrote on Thu, 9 Mar 2023 13:01:19 +0100:

> On 9.03.2023 12:35, Miquel Raynal wrote:
> >> diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
> >> index 0262b86194eb..b3c14ce87a65 100644
> >> --- a/include/linux/nvmem-provider.h
> >> +++ b/include/linux/nvmem-provider.h
> >> @@ -73,6 +73,7 @@ struct nvmem_cell_info {
> >>    * @owner:	Pointer to exporter module. Used for refcounting.
> >>    * @cells:	Optional array of pre-defined NVMEM cells.
> >>    * @ncells:	Number of elements in cells.
> >> + * @use_fixed_of_cells:	Read fixed NVMEM cells from OF.  
> > 
> > I'm still unhappy with the naming, especially since you explained in
> > more details the whole plan which involves using a container to put
> > these fixed cells from now on. In both cases you extract cells from
> > fixed OF nodes but this boolean needs to be set to true in one
> > case, and false in the other, which would not make sense.
> > 
> > Also, regarding the bindings changes, I'm fairly happy with the idea,
> > but if we go this way I would prefer a full series instead of
> > individual changes with:
> > 
> > - the boolean you introduce here (renamed, at the very least)
> > - the new bindings  
> 
> I assume you mean fixed-layout.yaml?

Yes!

> > - the update of the current provider bindings to take the new bindings
> >    into account and deprecate the old ones officially  
> 
> What has to be updated in current proceds? It seems to me that:
> 1. Current NVMEM providers reference nvmem.yaml
> 2. nvmem.yaml references nvmem-layout.yaml
> 3. nvmem-layout.yaml references fixed-layout.yaml
> 
> what else is missing?

That's the theory, but then provider bindings should reflect the
changes as well in their own binding documents.

IOW, this one (and all its cousins) becomes legacy and must be updated:

https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml#L92

(and there are many files to update then)

> 
> 
> > - support for the new bindings in the core  
> 
> Please, don't get me wrong, but I'm not going to spend more hours on
> actual coding without approval of chosen path.

Well, you want to make the bindings evolve. Just updating a single
binding file is not enough, I believe we should at least provide full
support for the new description. But of course I'm fine discussing what
description we want first.

> I'll need to have
> [PATCH V2] dt-bindings: nvmem: layouts: add fixed-layout
> reviewed/acked first. If you can do that that's great.
> 
> 
> >>    * @keepout:	Optional array of keepout ranges (sorted ascending by start).
> >>    * @nkeepout:	Number of elements in the keepout array.
> >>    * @type:	Type of the nvmem storage
> >> @@ -103,6 +104,7 @@ struct nvmem_config {
> >>   	struct module		*owner;
> >>   	const struct nvmem_cell_info	*cells;
> >>   	int			ncells;
> >> +	bool			use_fixed_of_cells;
> >>   	const struct nvmem_keepout *keepout;
> >>   	unsigned int		nkeepout;
> >>   	enum nvmem_type		type;  
> > 
> > Thanks,
> > Miquèl  
> 


Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ