From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BCAD32DECB4; Mon, 27 Oct 2025 19:51:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761594683; cv=none; b=SwFqoLVdOsPVnUGT8Hk/OLcXnNOPj5B3QllxarTdYz95zctdHKNOyvQWYYnZ6by9eLwfAIGMlvkQGak+O1GOLXex1OujHI/AZ2CUiX1cohbIhO0+mrYwVFlYESPxJbAT4AC9PwSsueYII1FlaLl09gV56yzZ9/2Kw+vDcEZXU3Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761594683; c=relaxed/simple; bh=Pk4X+7GFkmLsnGR/SwJNrClCir6ovgFLwHy360kWcBY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Hd0s0KPMGUYGCqOC77IubU68oWXkPC1NBd16+kdZ8tnHanQwrTU+GqSsU5syWhlwvZ6PPWhgy1fqWG5yZj44iMcbztMtaA2fzhxRwYvJxKPPwYdPDHqnX/SCHkX4gYiEwu2WrHDdExjThFOQ6Tz4WkiQ+35olIn/UutOlf0xjDc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WQ62Njui; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WQ62Njui" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF68BC4CEF1; Mon, 27 Oct 2025 19:51:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761594683; bh=Pk4X+7GFkmLsnGR/SwJNrClCir6ovgFLwHy360kWcBY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WQ62Njuijfkcq9Yzi/L+qU6Gb1+aLtA7bFCHwa2oGLNiBe73pwQ9dd6k0LcgJmUeT jvfTU93ykAt+iwV0YmENlCqN3dxzc18OR5d1jz+RGjI9zag6jVPbkHKaP+BDZSxcmy Ih5yTXi44Gp0yGhrAv3s1ckPc5EkONGBmJMTqBANJ/tdjcN0Q5wEd9By4z/b3SFv3S yszA2vYDGPQZSDsk7LTJwll3MCtr6fWm1ba5QXgcD1MewYRCyFpmCs6HeZ7DDxD/Pq M1bFn+eBM/2WKzmHSgTdMD6aNTlWQQF1vYRdt/Xzi2A3PEnwNyDQmQGLQZ0eSrBHFi +E2UDAHJB7b2g== Date: Mon, 27 Oct 2025 21:51:19 +0200 From: Jarkko Sakkinen To: Jan Kiszka Cc: Peter Huewe , linux-integrity@vger.kernel.org, Linux Kernel Mailing List , Ilias Apalodimas , Jens Wiklander , OP-TEE TrustedFirmware , linux-crypto@vger.kernel.org Subject: Re: [PATCH] hwrng: tpm: Do not enable by default Message-ID: References: Precedence: bulk X-Mailing-List: linux-integrity@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Oct 21, 2025 at 02:46:15PM +0200, Jan Kiszka wrote: > From: Jan Kiszka > > 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 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