Re: [PATCH v2 0/4] firmware: qcom: scm: fix potential race condition with tzmem

From: Bjorn Andersson
Date: Thu Jul 17 2025 - 00:31:49 EST



On Mon, 30 Jun 2025 14:12:01 +0200, Bartosz Golaszewski wrote:
> There's a race condition between the SCM call API consumers and the TZMem
> initialization in the SCM firmware driver. The internal __scm pointer is
> assigned - marking SCM as ready for accepting calls - before the tzmem
> memory pool is fully initialized. While the race is unlikely to be hit
> thanks to the SCM driver being initialized early, it still must be
> addressed.
>
> [...]

Applied, thanks!

[1/4] firmware: qcom: scm: remove unused arguments from SHM bridge routines
commit: 23972da96e1eee7f10c8ef641d56202ab9af8ba7
[2/4] firmware: qcom: scm: take struct device as argument in SHM bridge enable
commit: dc3f4e75c54c19bad9a70419afae00ce6baf3ebf
[3/4] firmware: qcom: scm: initialize tzmem before marking SCM as available
commit: 87be3e7a2d0030cda6314d2ec96b37991f636ccd
[4/4] firmware: qcom: scm: request the waitqueue irq *after* initializing SCM
commit: 7ab36b51c6bee56e1a1939063dd10d602fe49d13

Best regards,
--
Bjorn Andersson <andersson@xxxxxxxxxx>