From: Jarkko Sakkinen <jarkko@kernel.org>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Peter Huewe <peterhuewe@gmx.de>,
linux-integrity@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Jens Wiklander <jens.wiklander@linaro.org>,
OP-TEE TrustedFirmware <op-tee@lists.trustedfirmware.org>,
linux-crypto@vger.kernel.org
Subject: Re: [PATCH] hwrng: tpm: Do not enable by default
Date: Mon, 27 Oct 2025 21:51:19 +0200 [thread overview]
Message-ID: <aP_NN3HwO4Hp0-9T@kernel.org> (raw)
In-Reply-To: <bbc41534-a2d9-42dc-ac8a-ff8a0b4fd41f@siemens.com>
On Tue, Oct 21, 2025 at 02:46:15PM +0200, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> As seen with optee_ftpm, which uses ms-tpm-20-ref [1], a TPM may write
> the current time epoch to its NV storage every 4 seconds if there are
> commands sent to it. The 60 seconds periodic update of the entropy pool
> that the hwrng kthread does triggers this, causing about 4 writes per
> requests. Makes 2 millions per year for a 24/7 device, and that is a lot
> for its backing NV storage.
>
> It is therefore better to make the user intentionally enable this,
> providing a chance to read the warning.
>
> [1] https://github.com/Microsoft/ms-tpm-20-ref
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Looking at DRBG_* from [1] I don't see anything you describe. If OPTEE
writes NVRAM, then the implementation is broken.
Also AFAIK, it is pre-seeded per power cycle. There's nothing that even
distantly relates on using NVRAM.
[1] https://trustedcomputinggroup.org/wp-content/uploads/TPM-2.0-1.83-Part-4-Supporting-Routines-Code.pdf
BR, Jarkko
WARNING: multiple messages have this Message-ID (diff)
From: Jarkko Sakkinen via OP-TEE <op-tee@lists.trustedfirmware.org>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Peter Huewe <peterhuewe@gmx.de>,
linux-integrity@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
OP-TEE TrustedFirmware <op-tee@lists.trustedfirmware.org>,
linux-crypto@vger.kernel.org
Subject: Re: [PATCH] hwrng: tpm: Do not enable by default
Date: Mon, 27 Oct 2025 21:51:19 +0200 [thread overview]
Message-ID: <aP_NN3HwO4Hp0-9T@kernel.org> (raw)
In-Reply-To: <bbc41534-a2d9-42dc-ac8a-ff8a0b4fd41f@siemens.com>
On Tue, Oct 21, 2025 at 02:46:15PM +0200, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> As seen with optee_ftpm, which uses ms-tpm-20-ref [1], a TPM may write
> the current time epoch to its NV storage every 4 seconds if there are
> commands sent to it. The 60 seconds periodic update of the entropy pool
> that the hwrng kthread does triggers this, causing about 4 writes per
> requests. Makes 2 millions per year for a 24/7 device, and that is a lot
> for its backing NV storage.
>
> It is therefore better to make the user intentionally enable this,
> providing a chance to read the warning.
>
> [1] https://github.com/Microsoft/ms-tpm-20-ref
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Looking at DRBG_* from [1] I don't see anything you describe. If OPTEE
writes NVRAM, then the implementation is broken.
Also AFAIK, it is pre-seeded per power cycle. There's nothing that even
distantly relates on using NVRAM.
[1] https://trustedcomputinggroup.org/wp-content/uploads/TPM-2.0-1.83-Part-4-Supporting-Routines-Code.pdf
BR, Jarkko
next prev parent reply other threads:[~2025-10-27 19:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 12:46 [PATCH] hwrng: tpm: Do not enable by default Jan Kiszka
2025-10-21 12:46 ` Jan Kiszka via OP-TEE
2025-10-21 16:15 ` James Bottomley
2025-10-21 16:15 ` James Bottomley via OP-TEE
2025-10-22 5:05 ` Jan Kiszka
2025-10-22 5:05 ` Jan Kiszka via OP-TEE
2025-10-27 19:51 ` Jarkko Sakkinen [this message]
2025-10-27 19:51 ` Jarkko Sakkinen via OP-TEE
2025-10-28 5:46 ` Jan Kiszka
2025-10-28 5:46 ` Jan Kiszka via OP-TEE
2025-11-09 4:43 ` Jarkko Sakkinen
2025-11-09 4:43 ` Jarkko Sakkinen via OP-TEE
2025-11-09 10:04 ` Jan Kiszka
2025-11-09 10:04 ` Jan Kiszka via OP-TEE
2026-04-29 14:33 ` Niedermayr, BENEDIKT
2026-04-29 14:33 ` Niedermayr, BENEDIKT via OP-TEE
2026-05-09 15:18 ` Jarkko Sakkinen
2026-05-09 15:18 ` Jarkko Sakkinen via OP-TEE
2026-05-10 20:42 ` Jan Kiszka
2026-05-10 20:42 ` Jan Kiszka via OP-TEE
2026-05-11 3:31 ` James Bottomley
2026-05-11 3:31 ` James Bottomley via OP-TEE
2026-05-15 21:10 ` Jarkko Sakkinen
2026-05-15 21:10 ` Jarkko Sakkinen via OP-TEE
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=aP_NN3HwO4Hp0-9T@kernel.org \
--to=jarkko@kernel.org \
--cc=ilias.apalodimas@linaro.org \
--cc=jan.kiszka@siemens.com \
--cc=jens.wiklander@linaro.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=op-tee@lists.trustedfirmware.org \
--cc=peterhuewe@gmx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.