From: sashiko-bot@kernel.org
To: "Sumit Garg" <sumit.garg@kernel.org>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v6 06/16] remoteproc: qcom_q6v5_mss: Switch to generic PAS TZ APIs
Date: Tue, 19 May 2026 07:33:51 +0000 [thread overview]
Message-ID: <20260519073351.AF471C2BCB3@smtp.kernel.org> (raw)
In-Reply-To: <20260518072856.22790-7-sumit.garg@kernel.org>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] Incorrect dependency check replacement leads to potential NULL pointer dereference
- [High] Missing probe deferral for PAS availability causes runtime firmware load failures
- [High] The modified PAS memory setup feature is dead code due to missing initialization
--
commit f2a63e3caa15c50ea25aa5e07776a62f41d75add
Author: Sumit Garg <sumit.garg@oss.qualcomm.com>
remoteproc: qcom_q6v5_mss: Switch to generic PAS TZ APIs
This commit switches the qcom_q6v5_mss client driver over to the generic PAS
TZ APIs to support multiple backends like QTEE based SCM and OP-TEE.
> diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
> index ae78f5c7c1b69..96888007faa88 100644
> --- a/drivers/remoteproc/qcom_q6v5_mss.c
> +++ b/drivers/remoteproc/qcom_q6v5_mss.c
[ ... ]
> @@ -1480,7 +1481,7 @@ static int q6v5_mpss_load(struct q6v5 *qproc)
> }
>
> if (qproc->need_pas_mem_setup) {
> - ret = qcom_scm_pas_mem_setup(MPSS_PAS_ID, qproc->mpss_phys, qproc->mpss_size);
> + ret = qcom_pas_mem_setup(MPSS_PAS_ID, qproc->mpss_phys, qproc->mpss_size);
While this isn't a regression from this commit, is qproc->need_pas_mem_setup
ever initialized from desc in probe?
Looking at q6v5_probe(), several flags are copied from the match data to the
device instance:
qproc->need_mem_protection = desc->need_mem_protection;
qproc->has_mba_logs = desc->has_mba_logs;
Since qproc is zero-initialized by devm_rproc_alloc(), does the missing
copy of need_pas_mem_setup leave the flag permanently false and make
this modified qcom_pas_mem_setup() block unreachable?
[ ... ]
> @@ -2077,7 +2078,7 @@ static int q6v5_probe(struct platform_device *pdev)
> if (!desc)
> return -EINVAL;
>
> - if (desc->need_mem_protection && !qcom_scm_is_available())
> + if (desc->need_mem_protection && !qcom_pas_is_available())
Does replacing this probe deferral check cause issues if the generic PAS
backend is available (like OP-TEE) but SCM is not initialized?
The need_mem_protection flag dictates whether q6v5_xfer_mem_ownership() is
called. That function unconditionally relies on qcom_scm_assign_mem() which
directly accesses the SCM backend. If qcom_pas_is_available() allows probe
to succeed without SCM, could this result in a NULL pointer dereference
when qcom_scm_assign_mem() accesses the backend?
Additionally, what happens for platforms where desc->need_mem_protection is
false, but desc->need_pas_mem_setup is true?
It appears probe will skip checking if PAS is available and register the
remoteproc immediately. Later during firmware load, wouldn't
qcom_pas_mem_setup() fail with -ENODEV if the PAS backend has not yet probed?
Should probe also defer when desc->need_pas_mem_setup is true and PAS is
not available?
> return -EPROBE_DEFER;
>
> mba_image = desc->hexagon_mba_image;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260518072856.22790-1-sumit.garg@kernel.org?part=6
next prev parent reply other threads:[~2026-05-19 7:33 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 7:28 [PATCH v6 00/16] firmware: qcom: Add OP-TEE PAS service support Sumit Garg
2026-05-18 7:28 ` Sumit Garg via OP-TEE
2026-05-18 7:28 ` [PATCH v6 01/16] arm64: dts: qcom: kodiak: Add EL2 overlay Sumit Garg
2026-05-18 7:28 ` Sumit Garg via OP-TEE
2026-05-19 7:33 ` sashiko-bot
2026-05-22 8:00 ` Sumit Garg
2026-05-18 7:28 ` [PATCH v6 02/16] firmware: qcom: Add a generic PAS service Sumit Garg
2026-05-18 7:28 ` Sumit Garg via OP-TEE
2026-05-19 7:33 ` sashiko-bot
2026-05-22 8:13 ` Sumit Garg
2026-05-18 7:28 ` [PATCH v6 03/16] firmware: qcom_scm: Migrate to " Sumit Garg
2026-05-18 7:28 ` Sumit Garg via OP-TEE
2026-05-19 7:33 ` sashiko-bot
2026-05-22 8:02 ` Sumit Garg
2026-05-18 7:28 ` [PATCH v6 04/16] firmware: qcom: Add a PAS TEE service Sumit Garg
2026-05-18 7:28 ` Sumit Garg via OP-TEE
2026-05-19 7:33 ` sashiko-bot
2026-05-22 10:39 ` Sumit Garg
2026-05-18 7:28 ` [PATCH v6 05/16] remoteproc: qcom_q6v5_pas: Switch over to generic PAS TZ APIs Sumit Garg
2026-05-18 7:28 ` Sumit Garg via OP-TEE
2026-05-19 7:33 ` sashiko-bot
2026-05-22 10:44 ` Sumit Garg
2026-05-18 7:28 ` [PATCH v6 06/16] remoteproc: qcom_q6v5_mss: Switch " Sumit Garg
2026-05-18 7:28 ` Sumit Garg via OP-TEE
2026-05-19 7:33 ` sashiko-bot [this message]
2026-05-18 7:28 ` [PATCH v6 07/16] soc: qcom: mdtloader: " Sumit Garg
2026-05-18 7:28 ` Sumit Garg via OP-TEE
2026-05-19 7:33 ` sashiko-bot
2026-05-18 7:28 ` [PATCH v6 08/16] remoteproc: qcom_wcnss: " Sumit Garg
2026-05-18 7:28 ` Sumit Garg via OP-TEE
2026-05-19 7:33 ` sashiko-bot
2026-05-18 7:28 ` [PATCH v6 09/16] remoteproc: qcom: Select QCOM_PAS generic service Sumit Garg
2026-05-18 7:28 ` Sumit Garg via OP-TEE
2026-05-18 7:28 ` [PATCH v6 10/16] drm/msm: Switch to generic PAS TZ APIs Sumit Garg
2026-05-18 7:28 ` Sumit Garg via OP-TEE
2026-05-19 7:34 ` sashiko-bot
2026-05-18 7:28 ` [PATCH v6 11/16] media: qcom: " Sumit Garg
2026-05-18 7:28 ` Sumit Garg via OP-TEE
2026-05-19 7:34 ` sashiko-bot
2026-05-22 7:14 ` Sumit Garg
2026-05-21 6:40 ` Vikash Garodia
2026-05-22 7:25 ` Sumit Garg
2026-05-22 7:25 ` Sumit Garg via OP-TEE
2026-05-18 7:28 ` [PATCH v6 12/16] media: qcom: Pass proper PAS ID to set_remote_state API Sumit Garg
2026-05-18 7:28 ` Sumit Garg via OP-TEE
2026-05-19 7:34 ` sashiko-bot
2026-05-22 7:28 ` Sumit Garg
2026-05-21 6:30 ` Vikash Garodia
2026-05-18 7:28 ` [PATCH v6 13/16] net: ipa: Switch to generic PAS TZ APIs Sumit Garg
2026-05-18 7:28 ` Sumit Garg via OP-TEE
2026-05-18 7:28 ` [PATCH v6 14/16] wifi: ath12k: " Sumit Garg
2026-05-18 7:28 ` Sumit Garg via OP-TEE
2026-05-19 7:34 ` sashiko-bot
2026-05-22 10:51 ` Sumit Garg
2026-05-18 7:28 ` [PATCH v6 15/16] firmware: qcom_scm: Remove SCM PAS wrappers Sumit Garg
2026-05-18 7:28 ` Sumit Garg via OP-TEE
2026-05-18 7:28 ` [PATCH v6 16/16] MAINTAINERS: Add maintainer entry for Qualcomm PAS TZ service Sumit Garg
2026-05-18 7:28 ` Sumit Garg via OP-TEE
2026-05-19 19:29 ` [PATCH v6 00/16] firmware: qcom: Add OP-TEE PAS service support Vignesh Viswanathan
2026-05-19 19:29 ` Vignesh Viswanathan via OP-TEE
2026-05-20 16:27 ` Jeff Johnson
2026-05-20 16:27 ` Jeff Johnson via OP-TEE
2026-05-22 7:43 ` Sumit Garg
2026-05-22 7:43 ` Sumit Garg via OP-TEE
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=20260519073351.AF471C2BCB3@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sumit.garg@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.