From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>,
linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rt-devel@lists.linux.dev, Ard Biesheuvel <ardb@kernel.org>,
John Ogness <john.ogness@linutronix.de>,
Lai Jiangshan <jiangshanlai@gmail.com>, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH 0/2] efi: Expose the runtime-services workqueue via sysfs
Date: Thu, 12 Feb 2026 17:20:41 +0100 [thread overview]
Message-ID: <20260212162041.acU_rljT@linutronix.de> (raw)
In-Reply-To: <CAC_iWjLt-CzTkmnVMHidnMFWkE9NPzVLo6g8FUgMu0gAUJ0KtQ@mail.gmail.com>
On 2026-02-12 09:09:51 [+0200], Ilias Apalodimas wrote:
> Hi Sebastian,
Hi Ilias,
> Late to the party but ...
glad to have you.
> On Mon, 9 Feb 2026 at 17:55, Sebastian Andrzej Siewior
> > What I don't know is if this is a problem, i.e. is it possible to
> > interrupt the secure monitor and continue in Linux before heading back
> > to the secure environment or not.
>
> In theory yes. In practice, at least for arm & OP-TEE, the
> communication between the TEE and the secure-world app doing the
> variable chekcs & authentication is via the MM protocol [0].
> IIRC that requires to run to completion. So what happens is that you
> enter OP-TEE and right before the StMM is invoked (the app that
> handles EFI variables) all exceptions are masked and it must run to
> completion.
> The period of masking does not include writing the variables to
> storage. That's handled differently and is interruptible.
There it RTC and variables which is the most common thing. If you can
somehow outsource variable read/ write then fine but I guess you need to
wait somehow to ensure the data is written. Anyway.
That referenced document describes the protocol but not the
implementation of how communication works. What I found is that most
interfaces in the TEE world end up either in "SMCCC_1_2 hvc" or
"SMCCC_1_2 smc". The smc command in terms of arguments is described in
https://documentation-service.arm.com/static/5f8ea482f86e16515cdbe3c6
but it does not say if the interrupts are masked. I would assume that it
transfers the execution control to the secure monitor which is then
entered with disabled interrupts similar to an exception on the linux
side. In that case it would mandate a workqueue kind of solution so it
can be pinned to a CPU.
The only exception here seems to be the amdtee driver
(psp_tee_process_cmd()) which sends a command and waits for an answer.
Sebastian
next prev parent reply other threads:[~2026-02-12 16:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-05 11:55 [PATCH 0/2] efi: Expose the runtime-services workqueue via sysfs Sebastian Andrzej Siewior
2026-02-05 11:55 ` [PATCH 1/2] workqueue: Allow to expose ordered workqueues " Sebastian Andrzej Siewior
2026-02-05 13:39 ` Sebastian Andrzej Siewior
2026-02-05 21:59 ` Tejun Heo
2026-02-05 11:55 ` [PATCH 2/2] efi: Allow to expose the workqueue " Sebastian Andrzej Siewior
2026-02-09 15:17 ` [PATCH 0/2] efi: Expose the runtime-services " Luis Claudio R. Goncalves
2026-02-09 15:55 ` Sebastian Andrzej Siewior
2026-02-12 7:09 ` Ilias Apalodimas
2026-02-12 16:20 ` Sebastian Andrzej Siewior [this message]
2026-02-13 6:28 ` Ilias Apalodimas
2026-02-09 17:10 ` Ard Biesheuvel
2026-02-12 15:18 ` Sebastian Andrzej Siewior
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=20260212162041.acU_rljT@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=ardb@kernel.org \
--cc=ilias.apalodimas@linaro.org \
--cc=jiangshanlai@gmail.com \
--cc=john.ogness@linutronix.de \
--cc=lgoncalv@redhat.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=tj@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