Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Krishna Chaitanya Chundru" <krishna.chundru@oss.qualcomm.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org,
	linux-pci@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v5 3/3] arm64: dts: qcom: eliza-evk: Add PCIe1 with TC9563 PCIe switch
Date: Wed, 29 Jul 2026 15:09:09 +0000	[thread overview]
Message-ID: <20260729150910.2B2171F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260729-eliza_evk-v5-3-41790a5a24de@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Critical] Buffer overflow in the `pwrctrl-tc9563` driver triggered by the addition of the `pcie@0,1` node.
- [Medium] The Ethernet endpoint nodes `pcie@0,0` and `pcie@0,1` under downstream port `pcie@3,0` incorrectly specify PCI bridge properties.
- [Low] Misleading comment regarding shared GPIO pins.
--

--- Patch [3]: [PATCH v5 3/3] arm64: dts: qcom: eliza-evk: Add PCIe1 with TC9563 PCIe switch ---
commit afe372355fdb42a2ae6e1af16238819812ac2af7
Author: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>

arm64: dts: qcom: eliza-evk: Add PCIe1 with TC9563 PCIe switch

The Eliza EVK board connects PCIe1 (8GT/s x2) to a Toshiba TC9563
PCIe switch. Enable PCIe1 and its QMP PHY nodes.

> diff --git a/arch/arm64/boot/dts/qcom/eliza-evk.dtsi b/arch/arm64/boot/dts/qcom/eliza-evk.dtsi
> index b35fffb509765..419e737c54e6f 100644
> --- a/arch/arm64/boot/dts/qcom/eliza-evk.dtsi
> +++ b/arch/arm64/boot/dts/qcom/eliza-evk.dtsi
[ ... ]
> @@ -99,6 +119,99 @@ pcieport0_ep: endpoint {
>  	};
>  };
>  
[ ... ]
> +&pcie1_port0 {
> +	wake-gpios = <&tlmm 53 GPIO_ACTIVE_LOW>;
> +	/* Same GPIO is used for both PERST# and resx-gpio */

[Severity: Low]
This isn't a bug, but this comment states that the same GPIO is used for both
PERST# and resx-gpio, however resx-gpios is assigned to GPIO 54 below.

Should this comment be updated or moved?

> +
> +	tc9563: pcie@0,0 {
> +		compatible = "pci1179,0623";
[ ... ]
> +		resx-gpios = <&tlmm 54 GPIO_ACTIVE_LOW>;
> +
[ ... ]
> +		pcie@3,0 {
> +			reg = <0x21800 0x0 0x0 0x0 0x0>;
> +			#address-cells = <3>;
> +			#size-cells = <2>;
> +			device_type = "pci";
> +			ranges;
> +			bus-range = <0x5 0xff>;
> +
> +			pcie@0,0 {
> +				reg = <0x50000 0x0 0x0 0x0 0x0>;
> +				#address-cells = <3>;
> +				#size-cells = <2>;
> +				device_type = "pci";
> +				ranges;
> +			};

[Severity: Medium]
Do these integrated Ethernet MAC endpoints incorrectly specify PCI bridge
properties?

The OF framework may parse device_type = "pci", ranges, #address-cells, and
#size-cells on endpoint nodes during boot, which can cause the PCI core to
misidentify them as PCI-to-PCI bridges.

> +
> +			pcie@0,1 {
> +				reg = <0x50100 0x0 0x0 0x0 0x0>;
> +				#address-cells = <3>;
> +				#size-cells = <2>;
> +				device_type = "pci";
> +				ranges;
> +			};

[Severity: Critical]
Does the addition of this second child node trigger a buffer overflow
regression in the pwrctrl-tc9563 driver?

The tc9563_pwrctrl_probe() function loops over all children of the pcie@3,0
node and increments a shared port index for each child. Since the driver's
tc9563->cfg array is sized to 5, the addition of this node causes the port
index to reach 5.

This results in an out-of-bounds write when of_property_read_bool() writes to
cfg[5].disable_dfe, which can corrupt the tc9563->adapter pointer on 64-bit
platforms and cause a panic.

> +		};
> +	};
> +};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260729-eliza_evk-v5-0-41790a5a24de@oss.qualcomm.com?part=3

  reply	other threads:[~2026-07-29 15:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29 14:48 [PATCH v5 0/3] arm64: dts: qcom: eliza-evk: Enable PCIe0 and PCIe1 with M.2 and TC9563 switch Krishna Chaitanya Chundru
2026-07-29 14:48 ` [PATCH v5 1/3] arm64: dts: qcom: eliza: Add PCIe PHY and controller nodes Krishna Chaitanya Chundru
2026-07-29 15:10   ` Abel Vesa
2026-07-29 15:13   ` sashiko-bot
2026-07-29 15:19   ` Manivannan Sadhasivam
2026-07-29 14:48 ` [PATCH v5 2/3] arm64: dts: qcom: eliza-evk: Add PCIe0 with M.2 E key connector Krishna Chaitanya Chundru
2026-07-29 14:59   ` sashiko-bot
2026-07-29 14:48 ` [PATCH v5 3/3] arm64: dts: qcom: eliza-evk: Add PCIe1 with TC9563 PCIe switch Krishna Chaitanya Chundru
2026-07-29 15:09   ` sashiko-bot [this message]
2026-07-29 15:20   ` Manivannan Sadhasivam
2026-07-29 15:32   ` Abel Vesa

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=20260729150910.2B2171F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krishna.chundru@oss.qualcomm.com \
    --cc=linux-pci@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