From: sashiko-bot@kernel.org
To: "Anvesh Jain P" <anvesh.p@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 3/4] remoteproc: qcom: pas: Add coredump support for secondary processors
Date: Thu, 26 Nov 2026 07:37:27 +0000 [thread overview]
Message-ID: <sashiko-outbox-234963@kernel.org> (raw)
In-Reply-To: <20261126-oob-support-glymur-v4-3-ad4ec5dd4b0a@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] remoteproc: qcom: pas: secondary coredump after masked
qcom_pas_stop() error
--
commit b35e3edb6dd10b71c4535134032bc2aa2b922d43
Author: Anvesh Jain P <anvesh.p@oss.qualcomm.com>
remoteproc: qcom: pas: Add coredump support for secondary processors
This commit adds coredump support for secondary processors by registering
their dump segments, translating secondary carveout addresses in
qcom_pas_da_to_va(), and mapping the secondary carveout during
qcom_pas_coredump().
> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
> index 1e51371e445f3..1e55b00357c80 100644
> --- a/drivers/remoteproc/qcom_q6v5_pas.c
> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
[ ... ]
> @@ -748,11 +800,27 @@ static void qcom_pas_coredump(struct rproc *rproc)
> {
> struct qcom_pas *pas = rproc->priv;
>
> + if (list_empty(&rproc->dump_segments))
> + return;
> +
> pas->mem_region = qcom_pas_ctx_map(pas->pas_ctx);
> if (!pas->mem_region)
> return;
>
> + if (qcom_pas_has_secondary(pas) && !pas->secondary_mem_region) {
> + pas->secondary_mem_region =
> + qcom_pas_ctx_map(pas->secondary_pas_ctx);
> + if (!pas->secondary_mem_region)
> + dev_err(pas->dev, "unable to map secondary memory for coredump\n");
> + }
> +
> rproc_coredump(rproc);
[Severity: Medium]
Can rproc_coredump() read a still-locked secondary carveout if shutting
down pas->secondary_pas_id fails during crash recovery?
In rproc_boot_recovery(), rproc_stop() runs before rproc->ops->coredump()
and aborts recovery before the coredump only when rproc_stop() returns a
non-zero error. However, qcom_pas_stop() overwrites the return value from
shutting down pas->secondary_pas_id and pas->secondary_dtb_pas_id with the
result of shutting down pas->pas_id:
drivers/remoteproc/qcom_q6v5_pas.c:qcom_pas_stop() {
...
if (pas->secondary_pas_id) {
ret = qcom_pas_shutdown(pas->secondary_pas_id);
if (ret && pas->decrypt_shutdown)
ret = qcom_pas_shutdown_poll_decrypt(pas->secondary_pas_id);
if (ret)
dev_err(pas->dev, "failed to shutdown secondary: %d\n", ret);
...
if (pas->secondary_dtb_pas_id) {
ret = qcom_pas_shutdown(pas->secondary_dtb_pas_id);
...
ret = qcom_pas_shutdown(pas->pas_id);
...
}
If the secondary PAS shutdown fails while the primary PAS shutdown
succeeds, qcom_pas_stop() returns 0 and qcom_pas_coredump() proceeds to
map and read the secondary dump segments while the secondary carveout is
still locked by TrustZone or the hypervisor, triggering an XPU or Stage-2
access violation. Preserving secondary shutdown errors in qcom_pas_stop()
(as done for dtb_ret) would prevent rproc_boot_recovery() from dumping a
locked secondary region.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126-oob-support-glymur-v4-0-ad4ec5dd4b0a@oss.qualcomm.com?part=3
next prev parent reply other threads:[~2026-11-26 7:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 7:13 [PATCH v4 0/4] Add Glymur OOBMSS support Anvesh Jain P
2026-11-26 7:13 ` [PATCH v4 1/4] dt-bindings: remoteproc: qcom: Add Glymur OOBMSS PAS Anvesh Jain P
2026-11-26 7:20 ` sashiko-bot
2026-11-26 7:13 ` [PATCH v4 2/4] remoteproc: qcom: pas: Support secondary images Anvesh Jain P
2026-11-26 7:29 ` sashiko-bot
2026-11-26 7:13 ` [PATCH v4 3/4] remoteproc: qcom: pas: Add coredump support for secondary processors Anvesh Jain P
2026-11-26 7:37 ` sashiko-bot [this message]
2026-11-26 7:13 ` [PATCH v4 4/4] remoteproc: qcom: pas: Add Glymur OOBMSS PAS parameters Anvesh Jain P
2026-11-26 7:28 ` sashiko-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=sashiko-outbox-234963@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=anvesh.p@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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