linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: linux-kernel@vger.kernel.org, keyrings@vger.kernel.org,
	linux-integrity@vger.kernel.org,
	Stefan Berger <stefanb@linux.ibm.com>,
	Jarkko Sakkinen <jarkko.sakkinen@opinsys.com>,
	Jonathan Corbet <corbet@lwn.net>, Peter Huewe <peterhuewe@gmx.de>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>,
	"Borislav Petkov (AMD)" <bp@alien8.de>,
	Arnd Bergmann <arnd@arndb.de>,
	Frank van der Linden <fvdl@google.com>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>
Subject: Re: [RFC PATCH] tpm, tpm_vtpm_proxy: boot-time TPM
Date: Sat, 19 Jul 2025 17:17:20 +0300	[thread overview]
Message-ID: <aHuo8Fh_S8aEi7VM@kernel.org> (raw)
In-Reply-To: <bfcc3a24-b48c-48a6-8280-07f7a2669e6b@infradead.org>

On Wed, Jul 16, 2025 at 11:44:02AM -0700, Randy Dunlap wrote:
> (mostly nits, along with Paul's comments)
> 
> 
> On 7/16/25 5:18 AM, Jarkko Sakkinen wrote:
> > From: Jarkko Sakkinen <jarkko.sakkinen@opinsys.com>
> > 
> > Provide a kernel command-line parameter named as `supplicant`, which
> > contains a path to an TPM emulator binary. When defind, the kernel will
> 
>                   to a TPM
> 
> > launch the program during boot-time.
> > 
> > This feature is most useful in feature testing e.g., in environments
> 
>                                          testing, e.g.,
> 
> > where other means are not possible, such as CI runners. Its original use
> > case highlights also quite well of its applicability for pre-production
> > hardware: it was used to provide a TPM implemnentation for a RISC-V SoC
> > running on FPGA with no TPM HW implementation at the time.
> > 
> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@opinsys.com>
> > ---
> > Bumped into this in my archives so thought to make it available just in
> > case anyone is interested.
> > ---
> >  .../admin-guide/kernel-parameters.txt         | 14 +++++
> >  drivers/char/tpm/tpm_vtpm_proxy.c             | 51 +++++++++++++++++++
> >  2 files changed, 65 insertions(+)
> > 
> > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> > index f1f2c0874da9..e062de99480e 100644
> > --- a/Documentation/admin-guide/kernel-parameters.txt
> > +++ b/Documentation/admin-guide/kernel-parameters.txt
> > @@ -7230,6 +7230,20 @@
> >  			defined by Trusted Computing Group (TCG) see
> >  			https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profile-ptp-specification/
> >  
> > +	tpm_vtpm_proxy.supplicant= [TPM]
> > +			When defined, this field must contain a legit path to a
> 
> 			                                        legitimate
> or			                                        valid
> 
> > +			program emulating a TPM chip, which will be started
> > +			during the driver initialization, thus providing a
> > +			mechanism for the user space have an emulated TPM from
> > +			the get go. Kernel prepares the process with a file
> 
> 			    get-go.
> or just don't use slang terms.
> 
> > +			pre-opened file descriptor in the index 3 for
> > +			/dev/vtpmx.
> > +
> > +			An emulator can optionally provide support for
> > +			localities by reacting to the vendor command defined
> > +			by the driver: 0x20001000. Its payload is a single
> > +			byte containing the new locality.
> > +
> >  	tp_printk	[FTRACE]
> >  			Have the tracepoints sent to printk as well as the
> >  			tracing ring buffer. This is useful for early boot up
> 
> thanks.
> -- 
> ~Randy
> 

Thank you for reviewing this (especially given how bad shape it was)!

BR, Jarkko

      reply	other threads:[~2025-07-19 14:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-16 12:18 [RFC PATCH] tpm, tpm_vtpm_proxy: boot-time TPM Jarkko Sakkinen
2025-07-16 12:23 ` Paul Menzel
2025-07-19 14:16   ` Jarkko Sakkinen
2025-07-16 18:44 ` Randy Dunlap
2025-07-19 14:17   ` Jarkko Sakkinen [this message]

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=aHuo8Fh_S8aEi7VM@kernel.org \
    --to=jarkko@kernel.org \
    --cc=Neeraj.Upadhyay@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=fvdl@google.com \
    --cc=jarkko.sakkinen@opinsys.com \
    --cc=jgg@ziepe.ca \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=stefanb@linux.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).