Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH v2 0/6] firmware: qcom: scm: Fixes for concurrency
@ 2024-12-09 14:27 Krzysztof Kozlowski
  2024-12-09 14:27 ` [PATCH v2 1/6] firmware: qcom: scm: Fix missing read barrier in qcom_scm_is_available() Krzysztof Kozlowski
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-09 14:27 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Mukesh Ojha, Dmitry Baryshkov,
	Stephan Gerhold, Bartosz Golaszewski, Kuldeep Singh,
	Elliot Berman, Andrew Halaney, Avaneesh Kumar Dwivedi, Andy Gross
  Cc: linux-arm-msm, linux-kernel, stable, Krzysztof Kozlowski

Changes in v2:
- Patch #2: Extend commit msg
- Patch #4: Store NULL
- Add Rb tags
- Link to v1: https://lore.kernel.org/r/20241119-qcom-scm-missing-barriers-and-all-sort-of-srap-v1-0-7056127007a7@linaro.org

Description
===========
SCM driver looks messy in terms of handling concurrency of probe.  The
driver exports interface which is guarded by global '__scm' variable
but:
1. Lacks proper read barrier (commit adding write barriers mixed up
   READ_ONCE with a read barrier).
2. Lacks barriers or checks for '__scm' in multiple places.
3. Lacks probe error cleanup.

All the issues here are non-urgent, IOW, they were here for some time
(v6.10-rc1 and earlier).

Best regards,
Krzysztof

---
Krzysztof Kozlowski (6):
      firmware: qcom: scm: Fix missing read barrier in qcom_scm_is_available()
      firmware: qcom: scm: Fix missing read barrier in qcom_scm_get_tzmem_pool()
      firmware: qcom: scm: Handle various probe ordering for qcom_scm_assign_mem()
      firmware: qcom: scm: Cleanup global '__scm' on probe failures
      firmware: qcom: scm: smc: Handle missing SCM device
      firmware: qcom: scm: smc: Narrow 'mempool' variable scope

 drivers/firmware/qcom/qcom_scm-smc.c |  6 +++-
 drivers/firmware/qcom/qcom_scm.c     | 55 +++++++++++++++++++++++++-----------
 2 files changed, 44 insertions(+), 17 deletions(-)
---
base-commit: d1486dca38afd08ca279ae94eb3a397f10737824
change-id: 20241119-qcom-scm-missing-barriers-and-all-sort-of-srap-a25d59074882

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-01-08 11:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-09 14:27 [PATCH v2 0/6] firmware: qcom: scm: Fixes for concurrency Krzysztof Kozlowski
2024-12-09 14:27 ` [PATCH v2 1/6] firmware: qcom: scm: Fix missing read barrier in qcom_scm_is_available() Krzysztof Kozlowski
2024-12-09 14:27 ` [PATCH v2 2/6] firmware: qcom: scm: Fix missing read barrier in qcom_scm_get_tzmem_pool() Krzysztof Kozlowski
2024-12-09 14:27 ` [PATCH v2 3/6] firmware: qcom: scm: Handle various probe ordering for qcom_scm_assign_mem() Krzysztof Kozlowski
2024-12-09 20:25   ` Bartosz Golaszewski
2025-01-07  0:42   ` Bjorn Andersson
2025-01-08 11:12     ` Krzysztof Kozlowski
2024-12-09 14:27 ` [PATCH v2 4/6] firmware: qcom: scm: Cleanup global '__scm' on probe failures Krzysztof Kozlowski
2024-12-09 14:27 ` [PATCH v2 5/6] firmware: qcom: scm: smc: Handle missing SCM device Krzysztof Kozlowski
2024-12-09 15:14   ` Bartosz Golaszewski
2024-12-09 14:27 ` [PATCH v2 6/6] firmware: qcom: scm: smc: Narrow 'mempool' variable scope Krzysztof Kozlowski
2025-01-07 16:38 ` (subset) [PATCH v2 0/6] firmware: qcom: scm: Fixes for concurrency Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox