lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241230084449.545b746f@kernel.org>
Date: Mon, 30 Dec 2024 08:44:49 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Yunsheng Lin <linyunsheng@...wei.com>
Cc: John Daley <johndale@...co.com>, <benve@...co.com>,
 <satishkh@...co.com>, <andrew+netdev@...n.ch>, <davem@...emloft.net>,
 <edumazet@...gle.com>, <pabeni@...hat.com>, <netdev@...r.kernel.org>,
 Nelson Escobar <neescoba@...co.com>
Subject: Re: [PATCH net-next v3 4/6] enic: Use the Page Pool API for RX when
 MTU is less than page size

On Mon, 30 Dec 2024 17:18:39 +0800 Yunsheng Lin wrote:
> On 2024/12/28 8:10, John Daley wrote:
> > +void enic_rq_free_page(struct vnic_rq *vrq, struct vnic_rq_buf *buf)
> > +{
> > +	struct enic *enic = vnic_dev_priv(vrq->vdev);
> > +	struct enic_rq *rq = &enic->rq[vrq->index];
> > +
> > +	if (!buf->os_buf)
> > +		return;
> > +
> > +	page_pool_put_page(rq->pool, (struct page *)buf->os_buf,
> > +			   get_max_pkt_len(enic), true);  
> 
> It seems the above has a similar problem of not using
> page_pool_put_full_page() when page_pool_dev_alloc() API is used and
> page_pool is created with PP_FLAG_DMA_SYNC_DEV flags.
> 
> It seems like a common mistake that a WARN_ON might be needed to catch
> this kind of problem.

Agreed. Maybe also add an alias to page_pool_put_full_page() called
something like page_pool_dev_put_page() to correspond to the alloc
call? I suspect people don't understand the internals and "releasing
full page" feels wrong when they only allocated a portion..

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ