mtd: otp: Put factory OTP/NVRAM into the entropy pool
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 6 Jun 2023 14:29:31 +0000 (16:29 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 9 Jun 2023 15:27:16 +0000 (17:27 +0200)
commit3b270fac84439cbd036c98e189d17f2bc3c85494
tree6fb481a0c389f65bd66745929bb91936028dd446
parent6db02fdfdca0cf39b4d66950451d7f22b72a9031
mtd: otp: Put factory OTP/NVRAM into the entropy pool

The factory OTP, if supported, contains factory-programmed
information such as typically the serial number or production
week for the chip.

As this is device-unique information, submit it into the
system entropy pool.

This does not count as improvement of the entropy as such
but in practice it makes it a bit more random to mix in these
numbers.

Cc: Michael Walle <michael@walle.cc>
Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230606142931.3721374-1-linus.walleij@linaro.org
drivers/mtd/mtdcore.c