diff options
author | Jarkko Sakkinen <jarkko@kernel.org> | 2025-09-18 22:30:18 +0300 |
---|---|---|
committer | Jarkko Sakkinen <jarkko@kernel.org> | 2025-10-10 08:21:45 +0300 |
commit | 207696b17f38e869e59889b44d395ab24bb678d3 (patch) | |
tree | ae570eb47560cc138ffccfbc70245ab7bcf34f13 /net/unix/af_unix.c | |
parent | 8a81236f2cb0882c7ea6c621ce357f7f3f601fe5 (diff) |
tpm: use a map for tpm2_calc_ordinal_duration()
The current shenanigans for duration calculation introduce too much
complexity for a trivial problem, and further the code is hard to patch and
maintain.
Address these issues with a flat look-up table, which is easy to understand
and patch. If leaf driver specific patching is required in future, it is
easy enough to make a copy of this table during driver initialization and
add the chip parameter back.
'chip->duration' is retained for TPM 1.x.
As the first entry for this new behavior address TCG spec update mentioned
in this issue:
https://github.com/raspberrypi/linux/issues/7054
Therefore, for TPM_SelfTest the duration is set to 3000 ms.
This does not categorize a as bug, given that this is introduced to the
spec after the feature was originally made.
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions