Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Kathiravan Thirumoorthy" <kathiravan.thirumoorthy@oss.qualcomm.com>
Cc: krzk+dt@kernel.org, conor+dt@kernel.org, robh@kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v10 2/3] arm64: dts: qcom: ipq5424: Add the IMEM node
Date: Thu, 14 May 2026 02:20:03 +0000	[thread overview]
Message-ID: <20260514022004.66E99C19425@smtp.kernel.org> (raw)
In-Reply-To: <20260513-wdt_reset_reason-v10-2-cebda08ab1ef@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The device tree node maps the full 112KB IMEM region, exposing inaccessible memory to the generic SRAM allocator.
--

commit d275aea75b5a17a008a9020c79777d0cc37ddedc
Author: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>

arm64: dts: qcom: ipq5424: Add the IMEM node

This commit adds the IMEM node to the device tree for the IPQ5424 SoC to
extract debugging information. It defines the IMEM region as 112KB, noting
that only the first 4KB is accessible by all masters.

> diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
> --- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
[ ... ]
> +		sram@8600000 {
> +			compatible = "qcom,ipq5424-imem", "mmio-sram";
> +			reg = <0 0x08600000 0 0x1c000>;
> +			ranges = <0 0 0x08600000 0x1c000>;

Could mapping the full 112KB region cause XPU violations?

The commit message notes that only the initial 4KB is accessible by all
masters in the SoC. Since this node uses the mmio-sram compatible, the
generic SRAM driver will map the entire 0x1c000 region and add the
unreserved portion to a gen_pool for dynamic allocation.

If a driver requests memory from this pool, could it receive an address
within the restricted region and trigger an SError upon access?

Additionally, is there a risk of speculative execution or memory debugging
tools accessing the restricted region and causing a kernel panic?

Should the reg and ranges sizes be limited strictly to the safely
accessible 4KB (0x1000) region?

> +
> +			no-memory-wc;
> +
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +		};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260513-wdt_reset_reason-v10-0-cebda08ab1ef@oss.qualcomm.com?part=2

  reply	other threads:[~2026-05-14  2:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13  5:00 [PATCH v10 0/3] Add support to read the watchdog bootstatus from IMEM Kathiravan Thirumoorthy
2026-05-13  5:00 ` [PATCH v10 1/3] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram Kathiravan Thirumoorthy
2026-05-13  5:00 ` [PATCH v10 2/3] arm64: dts: qcom: ipq5424: Add the IMEM node Kathiravan Thirumoorthy
2026-05-14  2:20   ` sashiko-bot [this message]
2026-05-13  5:00 ` [PATCH v10 3/3] arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM Kathiravan Thirumoorthy
2026-05-14  2:48   ` 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=20260514022004.66E99C19425@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kathiravan.thirumoorthy@oss.qualcomm.com \
    --cc=krzk+dt@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