From: Jarkko Sakkinen <jarkko@kernel.org>
To: Yeoreum Yun <yeoreum.yun@arm.com>
Cc: sudeep.holla@arm.com, peterhuewe@gmx.de, jgg@ziepe.ca,
stuart.yoder@arm.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org
Subject: Re: [PATCH v2 0/2] fix failure of integration IMA with tpm_crb_ffa
Date: Thu, 12 Jun 2025 13:30:55 +0300 [thread overview]
Message-ID: <aEqsX0hBKb7ZC1qZ@kernel.org> (raw)
In-Reply-To: <aEm+gqyp0aa4ULYa@e129823.arm.com>
On Wed, Jun 11, 2025 at 06:36:02PM +0100, Yeoreum Yun wrote:
> Hi Jarkko,
>
> > On Tue, Jun 10, 2025 at 04:22:04PM +0100, Yeoreum Yun wrote:
> > > > OK, if ffa_init() is leveled up in the initcall hierarchy, shouldn't
> > > > that be enough as long as ko's can be found from initramfs?
> > >
> > > As you mentioned, this is handled in Patch #1.
> > > However, although ffa_init() is called first,
> > > unless tpm_crb_ffa_init() is also invoked,
> > > crb_acpi_driver_init() will fail with -EPROBE_DEFER.
> > >
> > > Please note that IMA is always built-in and cannot be built as a module.
> >
> > Sure but if one needs IMA, then tpm_crb_ffa can be compiled as built-in
> > with zero code changes.
>
> All of my describtion based on all things are built as "built-in".
> in case of ffa_init() changes the init level to root_initcall,
> so, the ffa_device will be produced first before the trial of TPM probe.
>
> Note that tpm_crb_ffa_init() which is the "ffa_driver" is called in
> device_initcall level. I mean
>
> ffa_init() -> arm_ffa -> root_initcall
> tpm_crb_ffa_init() -> device_initcall
> crb_acpi_driver_init() -> device_initcall
>
> therefore, "crb_acpi_driver_init()" can be call first before
> tpm_crb_ffa_init() since they're deployed in device_initcall.
> If this happen, "crb_acpi_driver_init()" failed with -EPROBE_DEFER.
>
> That's why this patch is required to probe "tpm_crb_ffa" when
> crb_acpi_driver_init() called to complete the TPM device probe before
> IMA subsystem initailization.
Yep, and you sort it out by not compiling it as a module.
+ ret = ffa_register(&tpm_crb_ffa_driver);
+ BUG_ON(!ret && !tpm_crb_ffa);
These lines struck me in your patch. The commit message has nothing
about ffa_register().
Also, please remove BUG_ON(). That said, I don't think 2/2 is needed.
>
> Thanks.
>
> --
> Sincerely,
> Yeoreum Yun
BR, Jarkko
next prev parent reply other threads:[~2025-06-12 13:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 6:03 [PATCH v2 0/2] fix failure of integration IMA with tpm_crb_ffa Yeoreum Yun
2025-06-10 6:03 ` [PATCH v2 1/2] firmware: arm_ffa: Change initcall level of ffa_init() to rootfs_initcall Yeoreum Yun
2025-06-10 6:03 ` [PATCH v2 2/2] tpm: tpm_crb_ffa: manually register tpm_crb_ffa driver when it's built-in Yeoreum Yun
2025-06-10 12:35 ` [PATCH v2 0/2] fix failure of integration IMA with tpm_crb_ffa Jarkko Sakkinen
2025-06-10 13:18 ` Yeoreum Yun
2025-06-10 13:58 ` Jarkko Sakkinen
2025-06-10 14:38 ` Yeoreum Yun
2025-06-10 14:59 ` Jarkko Sakkinen
2025-06-10 15:22 ` Yeoreum Yun
2025-06-11 16:40 ` Jarkko Sakkinen
2025-06-11 17:36 ` Yeoreum Yun
2025-06-12 10:30 ` Jarkko Sakkinen [this message]
2025-06-12 13:25 ` Yeoreum Yun
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=aEqsX0hBKb7ZC1qZ@kernel.org \
--to=jarkko@kernel.org \
--cc=jgg@ziepe.ca \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=stuart.yoder@arm.com \
--cc=sudeep.holla@arm.com \
--cc=yeoreum.yun@arm.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).