public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Jarkko Sakkinen" <jarkko@kernel.org>
Cc: <x86@kernel.org>,
	"Daniel P. Smith" <dpsmith@apertussolutions.com>,
	"Ross Philipson" <ross.philipson@oracle.com>,
	"Ard Biesheuvel" <ardb@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Peter Huewe" <peterhuewe@gmx.de>,
	"Jason Gunthorpe" <jgg@ziepe.ca>,
	"open list:TPM DEVICE DRIVER" <linux-integrity@vger.kernel.org>,
	"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 0/4] Alternative TPM patches for Trenchboot
Date: Sat, 02 Nov 2024 20:00:31 +0200	[thread overview]
Message-ID: <D5BW0P0HH0QL.7Y4HBLJGEDL8@kernel.org> (raw)
In-Reply-To: <20241102152226.2593598-1-jarkko@kernel.org>

On Sat Nov 2, 2024 at 5:22 PM EET, Jarkko Sakkinen wrote:
> It is not really my problem but I'm also wondering how the
> initialization order is managed. What if e.g. IMA happens to
> initialize before slmodule?

The first obvious observation from Trenchboot implementation is that it
is 9/10 times worst idea ever to have splitted root of trust. Here it
is realized by an LKM for slmodule.

So based on that usually a literal and unquestionable truth, when it
comes to securing platforms, the next question is how to make a single
atomic root of trust for Trenchboot.

There is really only one answer I think of for this it to make slmodule
part of the tpm_tis_core and also init order will be sorted out.

I'll describe the steps forward.

Step 1: declare and refactor that module into
drivers/char/tpm/tpm_tis_slmodule.c and add this to the Makefile:

ifdef CONFIG_SECURE_LAUNCH
obj-$(CONFIG_TCG_TIS_CORE) += tpm_tis_slmodule.o
endif

Step 2: add 'int kernel_locality;' to struct tpm_tis_data.
Step 3: implement tpm_tis_set_locality() internal function.
Step 4: drop sysfs-patch completely (solution is not generic).

BR, Jarkko

  parent reply	other threads:[~2024-11-02 18:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-02 15:22 [RFC PATCH 0/4] Alternative TPM patches for Trenchboot Jarkko Sakkinen
2024-11-02 15:22 ` [RFC PATCH 1/4] tpm, tpm_tis: Close all localities Jarkko Sakkinen
2024-11-02 15:22 ` [RFC PATCH 2/4] tpm, tpm_tis: Address positive localities in tpm_tis_request_locality() Jarkko Sakkinen
2024-11-02 15:22 ` [RFC PATCH 3/4] tpm, tpm_tis: allow to set locality to a different value Jarkko Sakkinen
2024-11-02 15:22 ` [RFC PATCH 4/4] tpm: sysfs: Show locality used by kernel Jarkko Sakkinen
2024-11-02 18:00 ` Jarkko Sakkinen [this message]
2024-11-04 10:57   ` [RFC PATCH 0/4] Alternative TPM patches for Trenchboot Daniel P. Smith
2024-11-04 11:18     ` Jarkko Sakkinen
2024-11-04 11:19       ` Jarkko Sakkinen
2024-11-04 11:29         ` Jarkko Sakkinen
2024-11-04 11:27       ` Ard Biesheuvel
2024-11-04 11:47         ` Jarkko Sakkinen
2024-11-04 11:52         ` Daniel P. Smith
2024-11-04 11:55           ` Ard Biesheuvel
2024-11-04 12:06             ` Jarkko Sakkinen
2024-11-04 12:19             ` Daniel P. Smith
2024-11-04 13:21               ` James Bottomley
2024-11-04 16:34                 ` Daniel P. Smith
2024-11-04 20:36                   ` James Bottomley
2024-11-05  0:13                     ` Daniel P. Smith
2024-11-04 15:03       ` Jarkko Sakkinen
2024-11-04 20:40 ` ross.philipson
2024-11-05  0:51 ` ross.philipson
2024-11-05 16:24   ` Ard Biesheuvel
2024-11-05 18:21     ` ross.philipson

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=D5BW0P0HH0QL.7Y4HBLJGEDL8@kernel.org \
    --to=jarkko@kernel.org \
    --cc=ardb@kernel.org \
    --cc=dpsmith@apertussolutions.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=ross.philipson@oracle.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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