From: Andrew Lunn <andrew@lunn.ch>
To: Ryan Leung <untilscour@protonmail.com>
Cc: "Alexey Charkov" <alchark@flipper.net>,
"Srinivas Kandagatla" <srini@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Heiko Stuebner" <heiko@sntech.de>,
"Rafał Miłecki" <rafal@milecki.pl>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@kernel.org>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Willem de Bruijn" <willemb@google.com>,
"Simon Horman" <horms@kernel.org>,
"Ricardo Pardini" <ricardo@pardini.net>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 3/5] nvmem: rockchip-otp: Derive MAC addresses from the CPU ID
Date: Wed, 25 Nov 2026 15:21:00 +0100 [thread overview]
Message-ID: <2f8da604-36af-4944-8168-02b046e97699@lunn.ch> (raw)
In-Reply-To: <0aH4P5VH9HNiTXpCUTaTlvGaoUDQBnvv-0cSXtipSDkLOGjzGy96jDqsVtU0DJTWrocgoMcGFEgd0JUlF5mljVvCzGKVz4yUgDQ0s6HaDLg=@protonmail.com>
> > +static int rockchip_otp_cpuid_pp(void *priv, const char *id, int index,
> > + unsigned int offset, void *buf, size_t bytes)
> > +{
> > + char cpuid[ROCKCHIP_CPUID_LEN * 2];
> > + u8 digest[SHA256_DIGEST_SIZE];
> > + u8 *mac = buf;
> > +
> > + if (!id || strcmp(id, "mac-address"))
> > + return 0;
I don't know OTP drivers. But to me, a function called
rockchip_otp_cpuid_pp() which does not actually return the CPU ID is
architecturally wrong.
I would probably not mangle the CPU ID in the OTP driver, but in the
MAC driver. The MAC driver should ask for the CPU ID and then hash it.
Andrew
next prev parent reply other threads:[~2026-11-25 14:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 12:04 [PATCH v4 0/5] nvmem: Derive Rockchip MAC addresses from the OTP " Alexey Charkov
2026-11-24 12:04 ` [PATCH v4 1/5] dt-bindings: nvmem: fixed-cell: Add Rockchip " Alexey Charkov
2026-11-24 12:04 ` [PATCH v4 2/5] net: Accept MAC addresses from longer NVMEM cells Alexey Charkov
2026-11-24 12:04 ` [PATCH v4 3/5] nvmem: rockchip-otp: Derive MAC addresses from the CPU ID Alexey Charkov
2026-11-25 13:49 ` Ryan Leung
2026-11-25 13:55 ` Alexey Charkov
2026-11-25 14:21 ` Andrew Lunn [this message]
2026-11-25 14:41 ` Alexey Charkov
2026-11-25 15:23 ` Andrew Lunn
2026-11-25 15:58 ` Alexey Charkov
2026-11-25 16:41 ` Andrew Lunn
2026-11-25 18:01 ` Alexey Charkov
2026-11-24 12:04 ` [PATCH v4 4/5] arm64: dts: rockchip: Move RK3576 OTP cells into a fixed layout Alexey Charkov
2026-11-24 12:04 ` [PATCH v4 5/5] arm64: dts: rockchip: Derive GMAC MAC addresses from OTP on RK3576 Alexey Charkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2f8da604-36af-4944-8168-02b046e97699@lunn.ch \
--to=andrew@lunn.ch \
--cc=alchark@flipper.net \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@kernel.org \
--cc=heiko@sntech.de \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rafal@milecki.pl \
--cc=ricardo@pardini.net \
--cc=robh@kernel.org \
--cc=srini@kernel.org \
--cc=untilscour@protonmail.com \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®