]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
tpm: Fix entropy harvesting logic
authorKornel Dulęba <kd@FreeBSD.org>
Fri, 2 Sep 2022 11:07:03 +0000 (13:07 +0200)
committerKornel Dulęba <kd@FreeBSD.org>
Fri, 2 Sep 2022 11:09:41 +0000 (13:09 +0200)
commite23ad9c4ba2d2fd235fc3dc988ca422ef4e7ca3b
tree78f9e2807b98e87349023d6e712324d312cf0834
parent2486b446db8270a7d6dc7f3c6df0a88c4745b527
tpm: Fix entropy harvesting logic

Use a taskqueue instead of a callout.
Callout functions mustn't sleep, where as the TPM driver
uses a sx lock in order to serialize accesses to the device.
Since the entropy harvesting feature is not enabled by default,
this commit should not bring any functional changes to the GENERIC
kernel.

Approved by: mw(mentor)
Sponsored by: Stormshield
Obtained from: Semihalf
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36412
sys/dev/tpm/tpm20.c
sys/dev/tpm/tpm20.h