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: <aEGEM3Snkl8z8v4N@hyeyoo>
Date: Thu, 5 Jun 2025 20:49:07 +0900
From: Harry Yoo <harry.yoo@...cle.com>
To: Pavel Begunkov <asml.silence@...il.com>
Cc: Byungchul Park <byungchul@...com>, willy@...radead.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, kernel_team@...ynix.com, kuba@...nel.org,
        almasrymina@...gle.com, ilias.apalodimas@...aro.org, hawk@...nel.org,
        akpm@...ux-foundation.org, davem@...emloft.net,
        john.fastabend@...il.com, andrew+netdev@...n.ch, toke@...hat.com,
        tariqt@...dia.com, edumazet@...gle.com, pabeni@...hat.com,
        saeedm@...dia.com, leon@...nel.org, ast@...nel.org,
        daniel@...earbox.net, david@...hat.com, lorenzo.stoakes@...cle.com,
        Liam.Howlett@...cle.com, vbabka@...e.cz, rppt@...nel.org,
        surenb@...gle.com, mhocko@...e.com, horms@...nel.org,
        linux-rdma@...r.kernel.org, bpf@...r.kernel.org,
        vishal.moola@...il.com
Subject: Re: [RFC v4 18/18] page_pool: access ->pp_magic through struct
 netmem_desc in page_pool_page_is_pp()

On Thu, Jun 05, 2025 at 11:56:14AM +0100, Pavel Begunkov wrote:
> On 6/4/25 03:52, Byungchul Park wrote:
> > To simplify struct page, the effort to separate its own descriptor from
> > struct page is required and the work for page pool is on going.
> > 
> > To achieve that, all the code should avoid directly accessing page pool
> > members of struct page.
> 
> Just to clarify, are we leaving the corresponding struct page fields
> for now until the final memdesc conversion is done?

Yes, that's correct.

> If so, it might be better to leave the access in page_pool_page_is_pp()
> to be "page->pp_magic", so that once removed the build fails until
> the helper is fixed up to use the page->type or so.

When we truly separate netmem from struct page, we won't have 'lru' field
in memdesc (because not all types of memory are on LRU list),
so NETMEM_DESC_ASSERT_OFFSET(lru, pp_magic) should fail.

And then page_pool_page_is_pp() should be changed to check lower bits
of memdesc pointer to identify its type.

https://kernelnewbies.org/MatthewWilcox/Memdescs/Path

-- 
Cheers,
Harry / Hyeonggon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ