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] [day] [month] [year] [list]
Date: Tue, 4 Jul 2023 12:54:08 +0800
From: Liang Chen <liangchen.linux@...il.com>
To: Yunsheng Lin <linyunsheng@...wei.com>
Cc: Jakub Kicinski <kuba@...nel.org>, ilias.apalodimas@...aro.org, hawk@...nel.org, 
	davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com, 
	netdev@...r.kernel.org
Subject: Re: [PATCH net-next] skbuff: Optimize SKB coalescing for page pool case

On Tue, Jul 4, 2023 at 8:50 AM Yunsheng Lin <linyunsheng@...wei.com> wrote:
>
> On 2023/7/4 2:53, Jakub Kicinski wrote:
> > On Mon, 3 Jul 2023 17:12:46 +0800 Liang Chen wrote:
> >> As for the "pp" reference, it has the test
> >> page_pool_is_pp_page_frag(head_page) there. So for a non-frag pp page,
> >> it will be a get_page call.
> >
> > You don't understand - you can't put a page from a page pool in two
> > skbs with pp_recycle set, unless the page is frag'ed.
>
> Agreed. I think we should disallow skb coaleasing for non-frag pp page
> instead of calling get_page(), as there is data race when calling
> page_pool_return_skb_page() concurrently for the same non-frag pp page.
>
> Even with my patchset, it may break the arch with
> PAGE_POOL_DMA_USE_PP_FRAG_COUNT being true.
>

Yeah, that's my fault. I thought __page_pool_put_page handles this
elevated refcnt, but overlooked that the second skb release would
enter page_pool_return_skb_page again, not directly calling put_page.

Disallowing skb coalescing for non-frag pp pages sounds good; we will
handle this problem on v2 after Yunsheng's changes are finalized.

> > .
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ