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]
Date:   Thu,  3 Feb 2022 17:16:32 +0100
From:   Alexander Lobakin <alexandr.lobakin@...el.com>
To:     Paolo Abeni <pabeni@...hat.com>
Cc:     Alexander Lobakin <alexandr.lobakin@...el.com>,
        netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net-next 1/3] net: gro: avoid re-computing truesize twice on recycle

From: Paolo Abeni <pabeni@...hat.com>
Date: Thu,  3 Feb 2022 16:48:21 +0100

> After commit 5e10da5385d2 ("skbuff: allow 'slow_gro' for skb
> carring sock reference") and commit af352460b465 ("net: fix GRO
> skb truesize update") the truesize of freed skb is properly updated

                                        ^^^^^

One nit here, I'd change this to "truesize of skb with stolen head"
or so. It took me a bit of time to get why we should update the
truesize of skb already freed (: Right, napi_reuse_skb() makes use
of stolen-data skbs.

> by the GRO engine, we don't need anymore resetting it at recycle time.
> 
> Signed-off-by: Paolo Abeni <pabeni@...hat.com>
> ---
>  net/core/gro.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/core/gro.c b/net/core/gro.c
> index a11b286d1495..d43d42215bdb 100644
> --- a/net/core/gro.c
> +++ b/net/core/gro.c
> @@ -634,7 +634,6 @@ static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb)
>  
>  	skb->encapsulation = 0;
>  	skb_shinfo(skb)->gso_type = 0;
> -	skb->truesize = SKB_TRUESIZE(skb_end_offset(skb));
>  	if (unlikely(skb->slow_gro)) {
>  		skb_orphan(skb);
>  		skb_ext_reset(skb);
> -- 
> 2.34.1

Thanks,
Al

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ