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: <87y0wkmeik.fsf@toke.dk>
Date: Tue, 01 Apr 2025 11:12:35 +0200
From: Toke Høiland-Jørgensen <toke@...hat.com>
To: Paolo Abeni <pabeni@...hat.com>, "David S. Miller"
 <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Jesper Dangaard
 Brouer <hawk@...nel.org>, Saeed Mahameed <saeedm@...dia.com>, Leon
 Romanovsky <leon@...nel.org>, Tariq Toukan <tariqt@...dia.com>, Andrew
 Lunn <andrew+netdev@...n.ch>, Eric Dumazet <edumazet@...gle.com>, Ilias
 Apalodimas <ilias.apalodimas@...aro.org>, Simon Horman <horms@...nel.org>,
 Andrew Morton <akpm@...ux-foundation.org>, Mina Almasry
 <almasrymina@...gle.com>, Yonglong Liu <liuyonglong@...wei.com>, Yunsheng
 Lin <linyunsheng@...wei.com>, Pavel Begunkov <asml.silence@...il.com>,
 Matthew Wilcox <willy@...radead.org>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org, linux-rdma@...r.kernel.org,
 linux-mm@...ck.org, Qiuling Ren <qren@...hat.com>, Yuying Ma
 <yuma@...hat.com>
Subject: Re: [PATCH net-next v5 2/2] page_pool: Track DMA-mapped pages and
 unmap them when destroying the pool

Paolo Abeni <pabeni@...hat.com> writes:

> On 3/28/25 1:19 PM, Toke Høiland-Jørgensen wrote:
>> @@ -463,13 +462,21 @@ page_pool_dma_sync_for_device(const struct page_pool *pool,
>>  			      netmem_ref netmem,
>>  			      u32 dma_sync_size)
>>  {
>> -	if (pool->dma_sync && dma_dev_need_sync(pool->p.dev))
>> -		__page_pool_dma_sync_for_device(pool, netmem, dma_sync_size);
>> +	if (pool->dma_sync && dma_dev_need_sync(pool->p.dev)) {
>
> Lacking a READ_ONCE() here, I think it's within compiler's right do some
> unexpected optimization between this read and the next one. Also it will
> make the double read more explicit.

Right, good point; will respin!

-Toke


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ