From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: firmware: qcom: Add OP-TEE PAS service support Date: Mon, 09 Mar 2026 08:59:07 +1000 Message-ID: In-Reply-To: <20260306105027.290375-1-sumit.garg@kernel.org> References: <20260306105027.290375-1-sumit.garg@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: firmware: qcom: Add OP-TEE PAS service support Author: Sumit Garg Patches: 23 Reviewed: 2026-03-09T08:59:07.202306 --- This series introduces a generic Peripheral Authentication Service (PAS) abstraction layer (`qcom_pas`) that sits between Qualcomm firmware client drivers and the actual TrustZone backend (SCM or OP-TEE). The motivation is sound: decoupling client drivers from the specific TZ implementation to support OP-TEE as an alternative to QTEE/SCM. The series is well-structured with clear separation: generic API (patch 2), SCM backend migration (patch 3), TEE backend (patch 4), client driver conversions (patches 5-13), and cleanup (patch 14). However, the implementation has several architectural issues, primarily around the global singleton `ops_ptr` dispatch pattern which lacks proper synchronization and lifetime management, unsafe type casting between the old and new context structs, and a Kconfig `select` anti-pattern that can cause build failures. **Key issues:** 1. Race conditions in `ops_ptr` access (no locking, use-after-unregister possible) 2. Kconfig `select QCOM_PAS_TEE` violates dependency rules 3. Unsafe C-style casts between `qcom_scm_pas_context` and `qcom_pas_context` 4. Copy-paste error in TEE driver error messages 5. Return type inconsistency in `get_rsc_table` ops callback --- --- Generated by Claude Code Patch Reviewer