Netdev List
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: sashiko-reviews@lists.linux.dev, Yangyu Chen <cyy@cyyself.name>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] net: atlantic: convert RX path to page_pool
Date: Thu, 23 Jul 2026 09:51:23 +0200	[thread overview]
Message-ID: <3678f78e-f2e7-4520-84fb-d78b10dc00c5@redhat.com> (raw)
In-Reply-To: <20260710173815.DE08B1F00A3A@smtp.kernel.org>

On 7/10/26 7:38 PM, sashiko-bot@kernel.org wrote:
>> +		return -ENOMEM;
>> +	}
>>  
>> -	if (!rxbuf->rxdata.page) {
>> -		ret = aq_alloc_rxpages(&rxbuf->rxdata, self);
>> -		if (ret) {
>> -			u64_stats_update_begin(&self->stats.rx.syncp);
>> -			self->stats.rx.alloc_fails++;
>> -			u64_stats_update_end(&self->stats.rx.syncp);
>> -		}
>> -		return ret;
>> -	}
>> +	rxbuf->rxdata.page = page;
>> +	rxbuf->rxdata.daddr = page_pool_get_dma_addr(page);
>> +	rxbuf->rxdata.pg_off = pg_off + self->page_offset;
> 
> [Severity: Critical]
> Can this cause severe DMA memory corruption during RX buffer refill?
> 
> The initialization of buff->pa appears to be missing or was removed here,
> but the hardware callback still executes immediately after and
> unconditionally overwrites the descriptor's physical address:
> 
> hw_atl_b0_hw_ring_rx_fill() {
>     ...
>     rxd->buf_addr = buff->pa;
>     rxd->hdr_addr = 0U;
>     ...
> }

FTR, AFAICS the above is AI sloop (and quite an unexpected one!) as
buff->pa is actually always initialized by:

	buff->pa = aq_buf_daddr(&buff->rxdata);

that comes after the aq_get_rxpages() call. All other issues are
pre-existing ones.

/P


  parent reply	other threads:[~2026-07-23  7:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09 17:36 [PATCH net-next 0/2] net: atlantic: convert RX path to page_pool Yangyu Chen
2026-07-09 17:37 ` [PATCH net-next 1/2] net: atlantic: free stranded TX buffers on ring deinit Yangyu Chen
2026-07-22 18:29   ` Mina Almasry
2026-07-23 14:15     ` Yangyu Chen
2026-07-09 17:37 ` [PATCH net-next 2/2] net: atlantic: convert RX path to page_pool Yangyu Chen
2026-07-22 18:43   ` Mina Almasry
     [not found]   ` <20260710173815.DE08B1F00A3A@smtp.kernel.org>
2026-07-23  7:51     ` Paolo Abeni [this message]
2026-07-21 19:18 ` [PATCH net-next 0/2] " Jakub Kicinski
2026-07-24 12:20   ` [EXTERNAL] " Sukhdeep Soni [C]

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=3678f78e-f2e7-4520-84fb-d78b10dc00c5@redhat.com \
    --to=pabeni@redhat.com \
    --cc=bpf@vger.kernel.org \
    --cc=cyy@cyyself.name \
    --cc=netdev@vger.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