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: <c7ac9e7d-2311-46cb-8c34-aba2f010c2c0@nvidia.com>
Date: Thu, 18 Sep 2025 12:51:42 +0300
From: Dragos Tatulea <dtatulea@...dia.com>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Jesper Dangaard Brouer <hawk@...nel.org>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Simon Horman <horms@...nel.org>,
 Ilias Apalodimas <ilias.apalodimas@...aro.org>,
 Clark Williams <clrkwllms@...nel.org>, Steven Rostedt <rostedt@...dmis.org>,
 netdev@...r.kernel.org, Tariq Toukan <tariqt@...dia.com>,
 linux-kernel@...r.kernel.org, linux-rt-devel@...ts.linux.dev
Subject: Re: [PATCH net-next] page_pool: add debug for release to cache from
 wrong CPU



On 18.09.25 12:13, Sebastian Andrzej Siewior wrote:
> On 2025-09-18 11:48:21 [+0300], Dragos Tatulea wrote:
>> diff --git a/net/core/page_pool.c b/net/core/page_pool.c
>> index ba70569bd4b0..404064d893d6 100644
>> --- a/net/core/page_pool.c
>> +++ b/net/core/page_pool.c
>> @@ -768,6 +795,18 @@ static bool page_pool_recycle_in_cache(netmem_ref netmem,
>>  		return false;
>>  	}
>>  
>> +#ifdef CONFIG_DEBUG_PAGE_POOL_CACHE_RELEASE
>> +	if (unlikely(!page_pool_napi_local(pool))) {
> 
> if you do IS_ENABLED(CONFIG_DEBUG_PAGE_POOL_CACHE_RELEASE) you could
> avoid the ifdef.
>
Ack. Makes sense. 
> A quick question, where is this allow_direct argument supposed to come
> from? I just noticed that mlx5 does
>    page_pool_put_unrefed_netmem(, true);
> 
> which then does not consider page_pool_napi_local(). But your proposed
> change here will complain as it should.
>

Good point and an oversight on my behalf. It will indeed complain during
rq teardown. If there is agreement on the approach proposed here then the
mlx5 driver will be changed to set the flag to false during teardown.
We used to do that but removed it for simplicity.

Thanks,
Dragos

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ