Re: [PATCH v3 0/4] TPM 2.0 fixes in IMA tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/6/2020 11:55 AM, Jarkko Sakkinen wrote:
On Tue, Oct 06, 2020 at 12:01:30PM +0200, Petr Vorel wrote:
If I understand James's commit fdc915f7f719 ("tpm: expose spaces via a device link /dev/tpmrm<n>")
from v4.12-rc1 correctly /dev/tpmrm0 is really for TPM 2.0. But how to detect it
for v4.0 - v4.11 when /sys/class/tpm detection fails?

I'd send an idempotent TPM2 command to /dev/tpm0. I.e. if it works,
it does not change the state. If it doesn't, you know that it is
not TPM2 device.

See the kernel function tpm2_probe() as an example of this approach.


As good candidate is getcapability, because it is guaranteed never to
require authorization.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux