[PATCH v2 0/2] firmware: qcom: scm: fix SMC calls on ARM32

Bartosz Golaszewski posted 2 patches 2 months, 2 weeks ago
drivers/firmware/qcom/qcom_scm-smc.c | 28 ++++++++++++++++++++++++----
drivers/firmware/qcom/qcom_scm.c     |  2 +-
2 files changed, 25 insertions(+), 5 deletions(-)
[PATCH v2 0/2] firmware: qcom: scm: fix SMC calls on ARM32
Posted by Bartosz Golaszewski 2 months, 2 weeks ago
The new TZ Mem allocator assumes the SCM driver is always probed which
apparently isn't the case on older platforms. Add a proper workaround.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Changes in v2:
- use likely() for the more likely branch in smc_args_free()
- Link to v1: https://lore.kernel.org/r/20240909-tzmem-null-ptr-v1-0-96526c421bac@linaro.org

---
Bartosz Golaszewski (2):
      firmware: qcom: scm: fix a NULL-pointer dereference
      firmware: qcom: scm: fall back to kcalloc() for no SCM device bound

 drivers/firmware/qcom/qcom_scm-smc.c | 28 ++++++++++++++++++++++++----
 drivers/firmware/qcom/qcom_scm.c     |  2 +-
 2 files changed, 25 insertions(+), 5 deletions(-)
---
base-commit: 6708132e80a2ced620bde9b9c36e426183544a23
change-id: 20240909-tzmem-null-ptr-2a9ddd9889aa

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Re: [PATCH v2 0/2] firmware: qcom: scm: fix SMC calls on ARM32
Posted by Linux regression tracking (Thorsten Leemhuis) 2 months ago
On 11.09.24 11:07, Bartosz Golaszewski wrote:
> The new TZ Mem allocator assumes the SCM driver is always probed which
> apparently isn't the case on older platforms. Add a proper workaround.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> Changes in v2:
> - use likely() for the more likely branch in smc_args_free()
> - Link to v1: https://lore.kernel.org/r/20240909-tzmem-null-ptr-v1-0-96526c421bac@linaro.org

Thx for working on this. This afaics is fixing a regression from the
6.11 cycle; we already missed fixing this for 6.11[1], but please allow
me to ask: is that something that bothers many people and thus should
maybe be fixed rather sooner than later? No pressure, just wondering, as
it seems the review is making slow progress.

Ciao, Thorsten

[1] a 'CC: stable...' thus might be wise, but of course that's up to you
Bartosz!

> ---
> Bartosz Golaszewski (2):
>       firmware: qcom: scm: fix a NULL-pointer dereference
>       firmware: qcom: scm: fall back to kcalloc() for no SCM device bound
> 
>  drivers/firmware/qcom/qcom_scm-smc.c | 28 ++++++++++++++++++++++++----
>  drivers/firmware/qcom/qcom_scm.c     |  2 +-
>  2 files changed, 25 insertions(+), 5 deletions(-)
> ---
> base-commit: 6708132e80a2ced620bde9b9c36e426183544a23
> change-id: 20240909-tzmem-null-ptr-2a9ddd9889aa
> 
> Best regards,
Re: [PATCH v2 0/2] firmware: qcom: scm: fix SMC calls on ARM32
Posted by Bartosz Golaszewski 2 months ago
On Wed, Sep 25, 2024 at 11:35 AM Linux regression tracking (Thorsten
Leemhuis) <regressions@leemhuis.info> wrote:
>
> On 11.09.24 11:07, Bartosz Golaszewski wrote:
> > The new TZ Mem allocator assumes the SCM driver is always probed which
> > apparently isn't the case on older platforms. Add a proper workaround.
> >
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > ---
> > Changes in v2:
> > - use likely() for the more likely branch in smc_args_free()
> > - Link to v1: https://lore.kernel.org/r/20240909-tzmem-null-ptr-v1-0-96526c421bac@linaro.org
>
> Thx for working on this. This afaics is fixing a regression from the
> 6.11 cycle; we already missed fixing this for 6.11[1], but please allow
> me to ask: is that something that bothers many people and thus should
> maybe be fixed rather sooner than later? No pressure, just wondering, as
> it seems the review is making slow progress.
>
> Ciao, Thorsten
>

Bjorn should pick up patch 1/2 from this series into the QCom branch.
If it doesn't happen by the end of the merge window, I'll resend it
separately on Monday.

Bart