From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: firmware: qcom: Add a PAS TEE service
Date: Tue, 28 Apr 2026 14:49:23 +1000 [thread overview]
Message-ID: <review-patch4-20260427095603.1157963-5-sumit.garg@kernel.org> (raw)
In-Reply-To: <20260427095603.1157963-5-sumit.garg@kernel.org>
Patch Review
The TEE backend implementation using OP-TEE.
**`qcom_pas_tee_get_rsc_table()` -- `output_rt_size` may not be set.** When the first `tee_client_invoke_func` call returns with `param[1].u.memref.size == 0`, the function skips the second call and returns `NULL`. But `*output_rt_size` is never written in this path, leaving it with whatever the caller initialized it to. The caller in `qcom_q6v5_pas.c` passes `&output_rt_size` which is likely uninitialized. If the caller checks `output_rt_size` after getting a NULL return, it could use garbage. Consider initializing `*output_rt_size = 0` at the top of the function.
**`qcom_pas_tee_get_rsc_table()` -- first call has no shm but passes size.** The first invocation sets `param[1].u.memref.size = input_rt_size` but `param[1].u.memref.shm` is NULL (zeroed by the initializer). This seems like a protocol detail where the TEE-side uses the size parameter to report back the needed buffer size without actually reading from the memref. This is fine if the OP-TEE TA implements it that way, but should be documented.
**Copy-paste error in error message.** In `qcom_pas_tee_set_remote_state()`:
```c
dev_err(dev, "PAS shutdown failed, pas_id: %d, ret: %d, err: 0x%x\n",
```
The message says "shutdown" but this is the `set_remote_state` function. Should say "PAS set remote state failed".
**`qcom_pas_tee_auth_and_reset` ignores mem_phys/mem_size for non-context path.** Passing `0, 0` for `mem_phys` and `mem_size` when called from `qcom_pas_tee_auth_and_reset()` (without context) seems intentional but means the TEE-side must handle the case where no memory region is provided. Worth a comment.
**Kconfig: `default m if ARCH_QCOM`.** This means `QCOM_PAS_TEE` auto-enables on all Qualcomm platforms even if OP-TEE isn't being used. This might pull in unnecessary dependencies. Consider making it depend on user selection or a more specific config.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-04-28 4:49 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 9:55 [PATCH v4 00/15] firmware: qcom: Add OP-TEE PAS service support Sumit Garg
2026-04-27 9:55 ` [PATCH v4 01/15] arm64: dts: qcom: kodiak: Add EL2 overlay Sumit Garg
2026-04-28 4:49 ` Claude review: " Claude Code Review Bot
2026-04-27 9:55 ` [PATCH v4 02/15] firmware: qcom: Add a generic PAS service Sumit Garg
2026-04-28 4:49 ` Claude review: " Claude Code Review Bot
2026-04-27 9:55 ` [PATCH v4 03/15] firmware: qcom_scm: Migrate to " Sumit Garg
2026-04-28 4:49 ` Claude review: " Claude Code Review Bot
2026-04-27 9:55 ` [PATCH v4 04/15] firmware: qcom: Add a PAS TEE service Sumit Garg
2026-04-28 4:49 ` Claude Code Review Bot [this message]
2026-04-27 9:55 ` [PATCH v4 05/15] remoteproc: qcom_q6v5_pas: Switch over to generic PAS TZ APIs Sumit Garg
2026-04-28 4:49 ` Claude review: " Claude Code Review Bot
2026-04-27 9:55 ` [PATCH v4 06/15] remoteproc: qcom_q6v5_mss: Switch " Sumit Garg
2026-04-28 4:49 ` Claude review: " Claude Code Review Bot
2026-04-27 9:55 ` [PATCH v4 07/15] soc: qcom: mdtloader: " Sumit Garg
2026-04-28 4:49 ` Claude review: " Claude Code Review Bot
2026-04-27 9:55 ` [PATCH v4 08/15] remoteproc: qcom_wcnss: " Sumit Garg
2026-04-28 4:49 ` Claude review: " Claude Code Review Bot
2026-04-27 9:55 ` [PATCH v4 09/15] remoteproc: qcom: Select QCOM_PAS generic service Sumit Garg
2026-04-28 4:49 ` Claude review: " Claude Code Review Bot
2026-04-27 9:55 ` [PATCH v4 10/15] drm/msm: Switch to generic PAS TZ APIs Sumit Garg
2026-04-28 4:49 ` Claude review: " Claude Code Review Bot
2026-04-27 9:55 ` [PATCH v4 11/15] media: qcom: " Sumit Garg
2026-04-28 4:49 ` Claude review: " Claude Code Review Bot
2026-04-27 9:56 ` [PATCH v4 12/15] net: ipa: " Sumit Garg
2026-04-28 4:49 ` Claude review: " Claude Code Review Bot
2026-04-27 9:56 ` [PATCH v4 13/15] wifi: ath12k: " Sumit Garg
2026-04-28 4:49 ` Claude review: " Claude Code Review Bot
2026-04-27 9:56 ` [PATCH v4 14/15] firmware: qcom_scm: Remove SCM PAS wrappers Sumit Garg
2026-04-28 4:49 ` Claude review: " Claude Code Review Bot
2026-04-27 9:56 ` [PATCH v4 15/15] MAINTAINERS: Add maintainer entry for Qualcomm PAS TZ service Sumit Garg
2026-04-28 4:49 ` Claude review: " Claude Code Review Bot
2026-04-28 4:49 ` Claude review: firmware: qcom: Add OP-TEE PAS service support Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-05-04 13:05 [PATCH v5 00/16] " Sumit Garg
2026-05-04 13:05 ` [PATCH v5 04/16] firmware: qcom: Add a PAS TEE service Sumit Garg
2026-05-04 22:22 ` Claude review: " Claude Code Review Bot
2026-03-12 6:27 [PATCH v2 00/15] firmware: qcom: Add OP-TEE PAS service support Sumit Garg
2026-03-12 6:27 ` [PATCH v2 04/15] firmware: qcom: Add a PAS TEE service Sumit Garg
2026-03-13 4:26 ` Claude review: " Claude Code Review Bot
2026-03-06 10:50 [PATCH 00/14] firmware: qcom: Add OP-TEE PAS service support Sumit Garg
2026-03-06 10:50 ` [PATCH 04/14] firmware: qcom: Add a PAS TEE service Sumit Garg
2026-03-08 22:59 ` Claude review: " Claude Code Review Bot
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=review-patch4-20260427095603.1157963-5-sumit.garg@kernel.org \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.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