From: Tadeusz Struk <tadeusz.struk at intel.com>
To: tpm2@lists.01.org
Subject: Re: [tpm2] best way to verify tpm is alive
Date: Mon, 01 Oct 2018 09:52:35 -0700 [thread overview]
Message-ID: <16c13855-0fc7-a2e3-e9ed-8adbf42963af@intel.com> (raw)
In-Reply-To: 3ca4069b2e3846fdba7e1d5d201b7e55@AZDC-MMB02.GD-MS.US
[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]
On 9/27/18 1:24 PM, Scheie, Peter M wrote:
> What is the best way to verify the TPM is available, that is, that it hasn’t died? I have a requirement to send an alert if the TPM stops working. We have snmp processes that run every five seconds, so I figure I can, say, check for something in /sys/class/tpm/tpm0 and as long as I get an expected response, I’ll report that everything is fine. But what exactly should I look for? Is the simple presence of /sys/class/tpm/tpm0 sufficient, because it means the kernel thinks the TPM is there? If I cat /sys/class/tpm/tpm0/dev I get the major and minor numbers; I could look at those, or just test for the presence of the dev file on the premise that if the TPM failed that file would disappear. Is that a good test? Suggestions?
I would say that the best test would be to send an actual command.
tpm2_get_random would be a good candidate. If the TPM responds
with a valid response it means that it is alive, if not it is dead.
The presence of the /sys/class/tpm/tpm0 file doesn't guarantee that
the TPM is still healthy.
Thanks,
--
Tadeusz
next reply other threads:[~2018-10-01 16:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 16:52 Tadeusz Struk [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-09-27 20:24 [tpm2] best way to verify tpm is alive Scheie, Peter M
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16c13855-0fc7-a2e3-e9ed-8adbf42963af@intel.com \
--to=tpm2@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox