Re: [RFC net-next v2 4/6] ptp: ocp: Validate EEPROM board IDs
[email protected] Tue, 04 Aug 2026 20:50:55 +0000
| Newsgroups | org.kernel.vger.linux-leds,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
> The EEPROM board ID is a fixed 13-byte field. It is stored without room
> for a terminator and passed to devlink as a C string. An erased EEPROM
> therefore exposes 0xff bytes and can make devlink read beyond the field
> while formatting board.id.
>=20
> Reserve a trailing byte, classify erased and malformed contents, and
> publish board.id only when the field contains printable text with valid
> padding. Continue reporting the serial number when the board ID is
> absent.
>=20
> Fixes: 0cfcdd1ebcfe1a9b262f6ad8419580720dc843c4 ("ptp: ocp: add nvmem int=
erface for accessing eeprom")
> Cc: [email protected]
> Signed-off-by: Ahmad Byagowi <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
--=20
Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260803205011.1249=
[email protected]?part=3D4