public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: "Thierry Reding" <treding@nvidia.com>,
	"Tom Warren" <twarren@nvidia.com>,
	"Tom Rini" <trini@konsulko.com>, "Simon Glass" <sjg@chromium.org>,
	"Jonas Schwöbel" <jonasschwoebel@yahoo.de>,
	u-boot@lists.denx.de
Subject: Re: [PATCH v7 3/7] ARM: tegra: add SoC UID calculation function
Date: Fri, 23 Jun 2023 16:25:32 +0200	[thread overview]
Message-ID: <ZJWrXPiHU4-77IBQ@orome> (raw)
In-Reply-To: <9FFB6FC9-8375-4004-875E-BE1CCA17F61B@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2391 bytes --]

On Fri, Jun 23, 2023 at 02:46:54PM +0300, Svyatoslav Ryhel wrote:
> 
> 
> 23 червня 2023 р. 14:24:37 GMT+03:00, Thierry Reding <thierry.reding@gmail.com> написав(-ла):
> >On Fri, Jun 23, 2023 at 08:55:56AM +0300, Svyatoslav Ryhel wrote:
> >> This is a small tool for calculation of SoC UID based on the same
> >> Linux function. It can be further used for generation of device
> >> unique data like mac address or exposing it as serial number.
> >
> >It's a very bad idea to use the SoC UID as a MAC address. There are
> >better ways (such as MAC address randomization) to generate one if for
> >some reason you don't have a real MAC address or are concerned about
> >privacy.
> 
> SoC UID is not used directly as MAC but it is used as a device
> specific base to generate device specific one. You can check LG board
> to see what I mean.

Is this something that originates from the original vendor code? My
primary concern is that this might end up reusing MAC addresses which
were assigned to other devices.

> 
> >The SoC UID is also not very well suited as a serial number because it
> >identifies only the SoC, but doesn't say anything about any of the other
> >components of a device. Many devices have serial numbers in some EEPROM
> >chip, so those would be more appropriate.
> 
> That is not the case of devices in patches and IIRC SoC UID is used as
> fastboot ID on transformers by vendor.

That doesn't really make this a better idea, but I also understand that
your options are limited given the information you have.

> >I suppose not all devices have such a system-wide serial number, so
> >perhaps there are cases where this would be better than nothing.
> 
> Vendors usually do not expose serial in any device hardware, or at
> least do not bother to inform, where to find it.

My experience differs. There's usually some serial number somewhere
because vendors need some way of tracking these devices. But yeah, if
you get an OEM device they typically don't tell you where to find it.
One thing you might want to do is probe the various I2C busses to see
if there's an EEPROM on any of them. They are often found at addresses
0x50-0x58 or so.

Again, I'm not strongly objecting to this, but I'd prefer some better
way to identify system than by chip UID, because it's not meant for this
purpose.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-06-23 14:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-23  5:55 [PATCH v7 0/7] Tegra: add ASUS/Google Nexus 7 (2012) support Svyatoslav Ryhel
2023-06-23  5:55 ` [PATCH v7 1/7] configs: tegra-common-post: add GPIO keyboard as STDIN device Svyatoslav Ryhel
2023-06-23  5:55 ` [PATCH v7 2/7] configs: tegra-common-post: make PXE and DHCP boot targets optional Svyatoslav Ryhel
2023-06-23  5:55 ` [PATCH v7 3/7] ARM: tegra: add SoC UID calculation function Svyatoslav Ryhel
2023-06-23 11:24   ` Thierry Reding
2023-06-23 11:46     ` Svyatoslav Ryhel
2023-06-23 14:25       ` Thierry Reding [this message]
2023-06-23 14:45         ` Svyatoslav Ryhel
2023-06-23  5:55 ` [PATCH v7 4/7] board: asus: transformer: add ASUS Transformer T30 family support Svyatoslav Ryhel
2023-06-23 11:32   ` Thierry Reding
2023-06-23 11:51     ` Svyatoslav Ryhel
2023-06-23 14:11       ` Thierry Reding
2023-06-23 14:19         ` Svyatoslav Ryhel
2023-06-23 14:26           ` Thierry Reding
2023-06-23  5:55 ` [PATCH v7 5/7] board: asus: grouper: add Google Nexus 7 (2012) support Svyatoslav Ryhel
2023-06-23  5:55 ` [PATCH v7 6/7] board: lg: x3: add Optimus 4X HD and Optimus Vu support Svyatoslav Ryhel
2023-06-23  5:56 ` [PATCH v7 7/7] board: htc: endeavoru: add One X support Svyatoslav Ryhel
2023-06-27 15:15   ` Svyatoslav Ryhel

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=ZJWrXPiHU4-77IBQ@orome \
    --to=thierry.reding@gmail.com \
    --cc=clamor95@gmail.com \
    --cc=jonasschwoebel@yahoo.de \
    --cc=sjg@chromium.org \
    --cc=treding@nvidia.com \
    --cc=trini@konsulko.com \
    --cc=twarren@nvidia.com \
    --cc=u-boot@lists.denx.de \
    /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