git: 5ec268d09a2e - main - dev/psci: Use the correct SMCCC TRNG field
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 25 Jun 2025 11:22:52 UTC
The branch main has been updated by andrew:
URL: https://cgit.FreeBSD.org/src/commit/?id=5ec268d09a2e33736339bb43dac5062e64b6af45
commit 5ec268d09a2e33736339bb43dac5062e64b6af45
Author: Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2025-06-24 16:48:55 +0000
Commit: Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2025-06-24 17:45:42 +0000
dev/psci: Use the correct SMCCC TRNG field
The TRNG service will return random data in x3. Use the correct field
when filling the buffer in trng_read.
This driver has not been in any release, so no security advisory is
needed.
Reviewed by: bz
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D50979
---
sys/dev/psci/smccc_trng.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/psci/smccc_trng.c b/sys/dev/psci/smccc_trng.c
index bf8c95a81c83..ab98837d3841 100644
--- a/sys/dev/psci/smccc_trng.c
+++ b/sys/dev/psci/smccc_trng.c
@@ -122,7 +122,7 @@ trng_read(void *buf, unsigned usz)
if (ret < 0)
return (0);
- memcpy(buf, &res.a0, len);
+ memcpy(buf, &res.a3, len);
return (len);
}