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]
Message-ID: <88cf34f5-7bdf-7ea6-f162-9302820a54ce@huawei.com>
Date:   Mon, 15 May 2023 12:59:27 +0800
From:   Yunsheng Lin <linyunsheng@...wei.com>
To:     <davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>
CC:     <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Pavel Begunkov <asml.silence@...il.com>
Subject: Re: [PATCH net-next] net: skbuff: update commemt about pfmemalloc
 propagating

commemt should be comment in the title, please ignore this
patch.

On 2023/5/15 12:55, Yunsheng Lin wrote:
> __skb_fill_page_desc_noacc() is not doing any pfmemalloc
> propagating, and yet it has a comment about that, commit
> 84ce071e38a6 ("net: introduce __skb_fill_page_desc_noacc")
> may have accidentally move to __skb_fill_page_desc_noacc(),
> so move it back to __skb_fill_page_desc() which is supposed
> to be doing pfmemalloc propagating.
> 
> Signed-off-by: Yunsheng Lin <linyunsheng@...wei.com>
> CC: Pavel Begunkov <asml.silence@...il.com>
> ---
> Also maybe we need a better name for 'noacc' or add some
> comment about that, as 'noacc' seems a little confusing
> for __skb_fill_page_desc_noacc().
> ---
>  include/linux/skbuff.h | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index 00e8c435fa1a..4b8d55247198 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -2426,11 +2426,6 @@ static inline void __skb_fill_page_desc_noacc(struct skb_shared_info *shinfo,
>  {
>  	skb_frag_t *frag = &shinfo->frags[i];
>  
> -	/*
> -	 * Propagate page pfmemalloc to the skb if we can. The problem is
> -	 * that not all callers have unique ownership of the page but rely
> -	 * on page_is_pfmemalloc doing the right thing(tm).
> -	 */
>  	skb_frag_fill_page_desc(frag, page, off, size);
>  }
>  
> @@ -2463,6 +2458,11 @@ static inline void __skb_fill_page_desc(struct sk_buff *skb, int i,
>  					struct page *page, int off, int size)
>  {
>  	__skb_fill_page_desc_noacc(skb_shinfo(skb), i, page, off, size);
> +
> +	/* Propagate page pfmemalloc to the skb if we can. The problem is
> +	 * that not all callers have unique ownership of the page but rely
> +	 * on page_is_pfmemalloc doing the right thing(tm).
> +	 */
>  	page = compound_head(page);
>  	if (page_is_pfmemalloc(page))
>  		skb->pfmemalloc	= true;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ