linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Jens Wiklander <jens.wiklander@linaro.org>
Cc: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Sumit Garg" <sumit.garg@kernel.org>,
	"Olivia Mackall" <olivia@selenic.com>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	"Clément Léger" <clement.leger@bootlin.com>,
	"Ard Biesheuvel" <ardb@kernel.org>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	"Sumit Garg" <sumit.garg@oss.qualcomm.com>,
	"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
	"Jan Kiszka" <jan.kiszka@siemens.com>,
	"Sudeep Holla" <sudeep.holla@arm.com>,
	"Christophe JAILLET" <christophe.jaillet@wanadoo.fr>,
	"Rafał Miłecki" <zajec5@gmail.com>,
	"Michael Chan" <michael.chan@broadcom.com>,
	"Pavan Chebbi" <pavan.chebbi@broadcom.com>,
	"James Bottomley" <James.Bottomley@hansenpartnership.com>,
	"Jarkko Sakkinen" <jarkko@kernel.org>,
	"Mimi Zohar" <zohar@linux.ibm.com>,
	"David Howells" <dhowells@redhat.com>,
	"Paul Moore" <paul@paul-moore.com>,
	"James Morris" <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	"Peter Huewe" <peterhuewe@gmx.de>,
	op-tee@lists.trustedfirmware.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-crypto@vger.kernel.org,
	linux-rtc@vger.kernel.org, linux-efi@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	"Cristian Marussi" <cristian.marussi@arm.com>,
	arm-scmi@vger.kernel.org, linux-mips@vger.kernel.org,
	netdev@vger.kernel.org, linux-integrity@vger.kernel.org,
	keyrings@vger.kernel.org, linux-security-module@vger.kernel.org,
	"Jason Gunthorpe" <jgg@ziepe.ca>
Subject: Re: [PATCH v2 00/17] tee: Use bus callbacks instead of driver callbacks
Date: Thu, 18 Dec 2025 14:53:32 +0100	[thread overview]
Message-ID: <20251218135332f323fa91@mail.local> (raw)
In-Reply-To: <CAHUa44FrDZbvRvfN8obf80_k=Eqxe9YxHpjaE5jU7nkxPUwfag@mail.gmail.com>

On 18/12/2025 08:21:27+0100, Jens Wiklander wrote:
> Hi,
> 
> On Mon, Dec 15, 2025 at 3:17 PM Uwe Kleine-König
> <u.kleine-koenig@baylibre.com> wrote:
> >
> > Hello,
> >
> > the objective of this series is to make tee driver stop using callbacks
> > in struct device_driver. These were superseded by bus methods in 2006
> > (commit 594c8281f905 ("[PATCH] Add bus_type probe, remove, shutdown
> > methods.")) but nobody cared to convert all subsystems accordingly.
> >
> > Here the tee drivers are converted. The first commit is somewhat
> > unrelated, but simplifies the conversion (and the drivers). It
> > introduces driver registration helpers that care about setting the bus
> > and owner. (The latter is missing in all drivers, so by using these
> > helpers the drivers become more correct.)
> >
> > v1 of this series is available at
> > https://lore.kernel.org/all/cover.1765472125.git.u.kleine-koenig@baylibre.com
> >
> > Changes since v1:
> >
> >  - rebase to v6.19-rc1 (no conflicts)
> >  - add tags received so far
> >  - fix whitespace issues pointed out by Sumit Garg
> >  - fix shutdown callback to shutdown and not remove
> >
> > As already noted in v1's cover letter, this series should go in during a
> > single merge window as there are runtime warnings when the series is
> > only applied partially. Sumit Garg suggested to apply the whole series
> > via Jens Wiklander's tree.
> > If this is done the dependencies in this series are honored, in case the
> > plan changes: Patches #4 - #17 depend on the first two.
> >
> > Note this series is only build tested.
> >
> > Uwe Kleine-König (17):
> >   tee: Add some helpers to reduce boilerplate for tee client drivers
> >   tee: Add probe, remove and shutdown bus callbacks to tee_client_driver
> >   tee: Adapt documentation to cover recent additions
> >   hwrng: optee - Make use of module_tee_client_driver()
> >   hwrng: optee - Make use of tee bus methods
> >   rtc: optee: Migrate to use tee specific driver registration function
> >   rtc: optee: Make use of tee bus methods
> >   efi: stmm: Make use of module_tee_client_driver()
> >   efi: stmm: Make use of tee bus methods
> >   firmware: arm_scmi: optee: Make use of module_tee_client_driver()
> >   firmware: arm_scmi: Make use of tee bus methods
> >   firmware: tee_bnxt: Make use of module_tee_client_driver()
> >   firmware: tee_bnxt: Make use of tee bus methods
> >   KEYS: trusted: Migrate to use tee specific driver registration
> >     function
> >   KEYS: trusted: Make use of tee bus methods
> >   tpm/tpm_ftpm_tee: Make use of tee specific driver registration
> >   tpm/tpm_ftpm_tee: Make use of tee bus methods
> >
> >  Documentation/driver-api/tee.rst             | 18 +----
> >  drivers/char/hw_random/optee-rng.c           | 26 ++----
> >  drivers/char/tpm/tpm_ftpm_tee.c              | 31 +++++---
> >  drivers/firmware/arm_scmi/transports/optee.c | 32 +++-----
> >  drivers/firmware/broadcom/tee_bnxt_fw.c      | 30 ++-----
> >  drivers/firmware/efi/stmm/tee_stmm_efi.c     | 25 ++----
> >  drivers/rtc/rtc-optee.c                      | 27 ++-----
> >  drivers/tee/tee_core.c                       | 84 ++++++++++++++++++++
> >  include/linux/tee_drv.h                      | 12 +++
> >  security/keys/trusted-keys/trusted_tee.c     | 17 ++--
> >  10 files changed, 164 insertions(+), 138 deletions(-)
> >
> > base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
> > --
> > 2.47.3
> >
> 
> Thank you for the nice cleanup, Uwe.
> 
> I've applied patch 1-3 to the branch tee_bus_callback_for_6.20 in my
> tree at https://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee.git/
> 
> The branch is based on v6.19-rc1, and I'll try to keep it stable for
> others to depend on, if needed. Let's see if we can agree on taking
> the remaining patches via that branch.

6 and 7 can go through your branch.

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2025-12-18 13:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-15 14:16 [PATCH v2 00/17] tee: Use bus callbacks instead of driver callbacks Uwe Kleine-König
2025-12-15 14:16 ` [PATCH v2 14/17] KEYS: trusted: Migrate to use tee specific driver registration function Uwe Kleine-König
2025-12-15 22:01   ` Jarkko Sakkinen
2025-12-15 14:16 ` [PATCH v2 15/17] KEYS: trusted: Make use of tee bus methods Uwe Kleine-König
2025-12-15 22:04   ` Jarkko Sakkinen
2025-12-18  7:21 ` [PATCH v2 00/17] tee: Use bus callbacks instead of driver callbacks Jens Wiklander
2025-12-18 13:53   ` Alexandre Belloni [this message]
2025-12-18 16:29     ` Jens Wiklander

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=20251218135332f323fa91@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=ardb@kernel.org \
    --cc=arm-scmi@vger.kernel.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=clement.leger@bootlin.com \
    --cc=corbet@lwn.net \
    --cc=cristian.marussi@arm.com \
    --cc=dhowells@redhat.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jan.kiszka@siemens.com \
    --cc=jarkko@kernel.org \
    --cc=jens.wiklander@linaro.org \
    --cc=jgg@ziepe.ca \
    --cc=jmorris@namei.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=olivia@selenic.com \
    --cc=op-tee@lists.trustedfirmware.org \
    --cc=paul@paul-moore.com \
    --cc=pavan.chebbi@broadcom.com \
    --cc=peterhuewe@gmx.de \
    --cc=serge@hallyn.com \
    --cc=sudeep.holla@arm.com \
    --cc=sumit.garg@kernel.org \
    --cc=sumit.garg@oss.qualcomm.com \
    --cc=u.kleine-koenig@baylibre.com \
    --cc=zajec5@gmail.com \
    --cc=zohar@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).