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] [day] [month] [year] [list]
Message-ID: <CAFBinCDcDYtdOdikc2ieXjRUkrjgwNKaPYvYZb_v84gh66q=bw@mail.gmail.com>
Date:   Wed, 22 Feb 2023 22:14:55 +0100
From:   Martin Blumenstingl <martin.blumenstingl@...glemail.com>
To:     Rafał Miłecki <zajec5@...il.com>
Cc:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        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>,
        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,
        Rafał Miłecki <rafal@...ecki.pl>
Subject: Re: [PATCH] nvmem: add explicit config option to read OF fixed cells

Hello Rafał,

On Tue, Feb 21, 2023 at 11:29 PM Rafał Miłecki <zajec5@...il.com> wrote:
[...]
> > I am not familiar with the recent changes around dynamic cells.
> > Is there any discussion/summary that I can read to get up to speed?
>
> Some NVMEM devices don't store specific data at hardcoded offsets. For
> such devices we have drivers (to become: layouts) that parse their magic
> content. They discover cells and register them and provide matching with
> proper DT nodes.
>
> For bindings see:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=084973e944bec21804f8afb0515b25434438699a
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a607a850ba1fa966cbb035544c1588e24a6307df
>
> For example driver see:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6e977eaa8280e957b87904b536661550f2a6b3e8
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=207775f7e17b8fd0426a2ac4a5b81e4e1d71849e
>
> For usage see:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c8442f0fb09ca3d842b9b23d1d0650f649fd10f8
Thanks, that makes things clearer for me!

> > My main thought is: if there are many "fixed OF cells" implementations
> > and only a few "dynamic" ones - does it make sense to flip the logic
> > and introduce a new "use_dynamic_of_cells" flag instead?
>
> The problem is that there are more cases than just two. We can have:
> 1. No cells at all
> 2. Fixed cells in DT
> 3. Dynamic cells with references in DT
> 4. Driver specified cells (specified within config)
> 5. Cells defined in a global table
>
> So we need to reference DT cells explicitly (we can't just confirm /
> deny *dynamic* cells).
>
> Another solution would be to have "no_fixed_of_cells" but:
>
> 1. Personally I think negation is less clear / easy to follow
>
> 2. There may be actually more drivers with no fixed cells.
> I think I modified 18 drivers. It seems devm_nvmem_register() is
> referenced in 44 places. Few of them may be not actual users but it
> still seems to be about equal.
Thanks for this overview of all the special cases. Please add my:
Acked-by: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
for the following two drivers:
- drivers/nvmem/meson-efuse.c
- drivers/nvmem/meson-mx-efuse.c


Best regards,
Martin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ