Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Til Kaiser" <mail@tk154.de>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH net-next v2 3/3] net: ethernet: qualcomm: ppe: Add IPQ5332 support
Date: Sat, 17 Oct 2026 15:25:23 +0000	[thread overview]
Message-ID: <sashiko-outbox-175580@kernel.org> (raw)
In-Reply-To: <20261016152449.934312-4-mail@tk154.de>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] net: qualcomm: ppe: out-of-bounds register write for multicast queue config
--

commit 685879ecd74a6118d193f93282001e1b28945b42
Author: Til Kaiser <mail@tk154.de>

net: ethernet: qualcomm: ppe: Add IPQ5332 support

IPQ5332 shares the IPQ9574 PPE architecture, but has only two front
panel ports and uses a different clock rate, interconnect paths, buffer
limits and scheduler arbitration.

> diff --git a/drivers/net/ethernet/qualcomm/ppe/ppe_config.c b/drivers/net/ethernet/qualcomm/ppe/ppe_config.c
> index 65ac6c0841d5a..91e6ee9524a60 100644
> --- a/drivers/net/ethernet/qualcomm/ppe/ppe_config.c
> +++ b/drivers/net/ethernet/qualcomm/ppe/ppe_config.c
[ ... ]
> @@ -264,6 +298,30 @@ static const struct ppe_qm_queue_config ipq9574_ppe_qm_queue_config[] = {
>  	},
>  };
>  
> +/* IPQ5332 unicast and multicast queue thresholds. */
> +static const struct ppe_qm_queue_config ipq5332_ppe_qm_queue_config[] = {
> +	{
> +		/* QM settings for unicast queues 0 to 255. */
> +		.queue_start	= 0,
> +		.queue_end	= 255,
> +		.prealloc_buf	= 0,
> +		.ceil		= 300,
> +		.weight		= 7,
> +		.resume_offset	= 18,
> +		.dynamic	= true,
> +	},
> +	{
> +		/* QM settings for multicast queues 256 to 299. */
> +		.queue_start	= 256,
> +		.queue_end	= 299,

[Severity: High]
Does ppe_config_qm() calculate the multicast queue register address correctly
when queue_id is >= 256?

In ppe_config_qm(), the code calculates the address like this:

			} else {
				reg = PPE_AC_MULTICAST_QUEUE_CFG_TBL_ADDR +
				      PPE_AC_MULTICAST_QUEUE_CFG_TBL_INC * queue_id;

Since queue_id ranges from 256 to 299 for multicast queues, and is not offset
by 256 (PPE_AC_UNICAST_QUEUE_CFG_TBL_ENTRIES) before multiplication, does this
result in an out-of-bounds address calculation?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261016152449.934312-1-mail@tk154.de?part=3

  reply	other threads:[~2026-10-17 15:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 15:24 [PATCH net-next v2 0/3] net: ethernet: qualcomm: ppe: Add IPQ5332 support Til Kaiser
2026-10-16 15:24 ` [PATCH net-next v2 1/3] net: ethernet: qualcomm: ppe: Select hardware configuration by SoC Til Kaiser
2026-10-16 15:24 ` [PATCH net-next v2 2/3] dt-bindings: net: qcom,ipq9574-ppe: Add IPQ5332 support Til Kaiser
2026-10-16 15:24 ` [PATCH net-next v2 3/3] net: ethernet: qualcomm: ppe: " Til Kaiser
2026-10-17 15:25   ` sashiko-bot [this message]
2026-10-17 18:37     ` Til Kaiser

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-175580@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=mail@tk154.de \
    --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