Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Atul Akella <atul.akella@gmail.com>
To: gopikrishna.garmidi@oss.qualcomm.com, andersson@kernel.org,
	mathieu.poirier@linaro.org, konrad.dybcio@oss.qualcomm.com,
	abelvesa@kernel.org
Cc: niklas.cassel@linaro.org, rohitkr@codeaurora.org,
	sibi.sankar@oss.qualcomm.com, robh@kernel.org,
	quic_srichara@quicinc.com, konradybcio@kernel.org,
	rajendra.nayak@oss.qualcomm.com, linux-arm-msm@vger.kernel.org,
	linux-remoteproc@vger.kernel.org
Subject: Re: [PATCH] remoteproc: qcom: Fix da_to_va() offset truncation
Date: Fri, 27 Nov 2026 14:58:33 +0530	[thread overview]
Message-ID: <20261127092834.731-1-atul.akella@gmail.com> (raw)
In-Reply-To: <20261127090750.2059755-1-gopikrishna.garmidi@oss.qualcomm.com>

On Fri, Nov 27, 2026 at 01:07:50AM -0800, Gopikrishna Garmidi wrote:
> The da_to_va() callbacks compute the offset into the carveout as an int
> from a u64 device address. An address such as mem_reloc + 0x100000010
> truncates to 0x10, passes the bounds check and gets mapped to the wrong
> place. The check "offset + len > mem_size" can also overflow.
>
> Use a u64 offset, reject addresses below the carveout base and compare
> without risking overflow. Apply the same change to the pas, adsp, wcss
> and wcnss drivers, which all share this pattern.

Hi Gopikrishna,

This overlaps with a series I sent on Nov 7 covering the same four
drivers and the same root cause (int offset truncating the u64
da base subtraction):

https://lore.kernel.org/linux-remoteproc/20261106184312.100-1-atul.akella@gmail.com/

Mine's still awaiting review, so happy to defer or let the maintainers
pick whichever they'd rather carry forward. Wanted to flag the overlap
before there's duplicate review effort on both sides.

Atul

  reply	other threads:[~2026-11-27  9:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27  9:07 [PATCH] remoteproc: qcom: Fix da_to_va() offset truncation Gopikrishna Garmidi
2026-11-27  9:28 ` Atul Akella [this message]
2026-11-27  9:41   ` Gopikrishna Garmidi
2026-11-27 10:06     ` Atul Akella

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=20261127092834.731-1-atul.akella@gmail.com \
    --to=atul.akella@gmail.com \
    --cc=abelvesa@kernel.org \
    --cc=andersson@kernel.org \
    --cc=gopikrishna.garmidi@oss.qualcomm.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=niklas.cassel@linaro.org \
    --cc=quic_srichara@quicinc.com \
    --cc=rajendra.nayak@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=rohitkr@codeaurora.org \
    --cc=sibi.sankar@oss.qualcomm.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