From: sashiko-bot@kernel.org
To: "James Hilliard" <james.hilliard1@gmail.com>
Cc: linux-sunxi@lists.linux.dev
Subject: Re: [PATCH net-next 1/2] net: stmmac: dwmac-sun8i: deliver RX checksum errors to the stack
Date: Sat, 21 Nov 2026 15:32:38 +0000 [thread overview]
Message-ID: <sashiko-outbox-227126@kernel.org> (raw)
In-Reply-To: <20261120-submit-sun8i-rx-features-v1-v1-1-5058fecba6b3@gmail.com>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [Critical] net: stmmac: missing dma_rmb() in stmmac_rx() and
stmmac_rx_zc() [1]
--
commit 25a23f84c6a85e201c0ec27b3c3dd900c3d4ad68
Author: James Hilliard <james.hilliard1@gmail.com>
net: stmmac: dwmac-sun8i: deliver RX checksum errors to the stack
This commit enables error-frame forwarding on the sun8i MAC and adds a
custom RX status decoder so packets with IP or transport checksum failures
are delivered to the stack with CHECKSUM_NONE instead of being dropped.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index f256244ce0d11..2f33fc0126b11 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -5775,7 +5775,7 @@ static int stmmac_rx_zc(struct stmmac_priv *priv, int limit, u32 queue)
> p = stmmac_get_rx_desc(priv, rx_q, entry);
>
> /* read the status of the incoming frame */
> - status = stmmac_rx_status(priv, &priv->xstats, p);
> + status = priv->hw->rx_status(&priv->xstats, p);
> /* check if managed by the DMA otherwise go ahead */
> if (unlikely(status & dma_own))
> break;
> @@ -5978,7 +5978,7 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
> p = stmmac_get_rx_desc(priv, rx_q, entry);
>
> /* read the status of the incoming frame */
> - status = stmmac_rx_status(priv, &priv->xstats, p);
> + status = priv->hw->rx_status(&priv->xstats, p);
> /* check if managed by the DMA otherwise go ahead */
> if (unlikely(status & dma_own))
> break;
[Severity: Critical]
This problem wasn't introduced by this patch, but is a dma_rmb() missing
after the dma_own check in stmmac_rx() and stmmac_rx_zc() [1]?
Without a read barrier after observing that hardware cleared the ownership
bit, the CPU can speculatively read subsequent descriptor fields (such as
frame length via stmmac_rx_buf1_len()) before the ownership read retires,
operating on stale descriptor data and causing corrupted frames or
out-of-bounds accesses.
[1] https://sashiko.dev/#/bug/linux-fe348d69-cee9-4f10-9fbc-4d4c90731942
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120-submit-sun8i-rx-features-v1-v1-0-5058fecba6b3@gmail.com?part=1
next prev parent reply other threads:[~2026-11-21 15:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 15:32 [PATCH net-next 0/2] net: stmmac: handle RX checksum and wire errors on sun8i James Hilliard
2026-11-20 15:32 ` [PATCH net-next 1/2] net: stmmac: dwmac-sun8i: deliver RX checksum errors to the stack James Hilliard
2026-11-21 15:32 ` sashiko-bot [this message]
2026-11-20 15:32 ` [PATCH net-next 2/2] net: stmmac: dwmac-sun8i: support ethtool rx-all James Hilliard
2026-11-20 18:30 ` Maxime Chevallier
2026-11-20 18:46 ` James Hilliard
2026-11-21 15:32 ` sashiko-bot
2026-11-20 15:37 ` [PATCH net-next 0/2] net: stmmac: handle RX checksum and wire errors on sun8i netdev-bot+sinfo
2026-11-20 16:29 ` James Hilliard
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-227126@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=james.hilliard1@gmail.com \
--cc=linux-sunxi@lists.linux.dev \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.