mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Val Packett <val@packett.cool>
To: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Kees Cook <kees@kernel.org>, Tony Luck <tony.luck@intel.com>,
	"Guilherme G. Piccoli" <gpiccoli@igalia.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	linux-hardening@vger.kernel.org, linux-efi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] efi: pstore: Support late setup with TEE-backed efivars ops
Date: Thu, 4 Dec 2025 17:57:32 -0300	[thread overview]
Message-ID: <2294ac5b-6977-4f46-964e-b3a30b88efbd@packett.cool> (raw)
In-Reply-To: <CAC_iWjKHO3BGdaK=8a1A3Ps3U5Cqt2urJqL8PPfGcaqsMw1Qgg@mail.gmail.com>


On 12/4/25 6:49 AM, Ilias Apalodimas wrote:
> Hi Val,
>
> On Wed, 3 Dec 2025 at 06:29, Val Packett <val@packett.cool> wrote:
>> On some platforms, EFI variable services only become available when an
>> appropriate TEE driver is initialized such as qseecom, gsmi or stmm.
>>
>> This would work fine when efi_pstore was built as a module and loaded
>> late by userspace, but with CONFIG_EFI_VARS_PSTORE=y this driver would
>> quit due to non-writable efivars before the necessary driver had any
>> chance to load.
> The problem, at least for OP-TEE/StMM, is that writing the variables
> to an RPMB depends on a userspace application If CONFIG_RPMB is not
> selected. We have no guarantees that the app will still be alive.
> I don't know how gsmi or qseecom deal with writing variables. We can
> probably allow it for StMM if CONFIG_RPMB is enabled, but we'll have
> the right trigger to do so.

qseecom/uefisecapp does not have any userspace requirements and works 
fine with efi_pstore.

I don't think complicating efi_pstore with extra logic about which ops 
are fine would be worth it..

Either way, it currently *already* tries to use whatever ops that have 
been registered if it's loaded late as a module by systemd! The only 
thing this patch changes is the CONFIG_EFI_VARS_PSTORE=y case.


Thanks,
~val


  reply	other threads:[~2025-12-04 20:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-03  4:28 Val Packett
2025-12-04  9:49 ` Ilias Apalodimas
2025-12-04 20:57   ` Val Packett [this message]
2025-12-05 10:27     ` Ard Biesheuvel
2025-12-05 10:56       ` Ilias Apalodimas
2025-12-04 23:36 ` Kees Cook
2025-12-10  8:40 ` kernel test robot
2025-12-10  9:13   ` Ard Biesheuvel
2025-12-10 14:28     ` Kees Cook

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=2294ac5b-6977-4f46-964e-b3a30b88efbd@packett.cool \
    --to=val@packett.cool \
    --cc=ardb@kernel.org \
    --cc=gpiccoli@igalia.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=kees@kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.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

all inboxes | Powered by JetHome®