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  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:   Thu, 27 Aug 2020 04:35:32 -0700
From:   Eric Dumazet <edumazet@...gle.com>
To:     Miaohe Lin <linmiaohe@...wei.com>
Cc:     David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Pravin B Shelar <pshelar@....org>,
        Florian Westphal <fw@...len.de>, martin.varghese@...ia.com,
        Davide Caratti <dcaratti@...hat.com>,
        Steffen Klassert <steffen.klassert@...unet.com>,
        Paolo Abeni <pabeni@...hat.com>, shmulik@...anetworks.com,
        kyk.segfault@...il.com, netdev <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: Set trailer iff skb1 is the last one

On Thu, Aug 27, 2020 at 4:31 AM Miaohe Lin <linmiaohe@...wei.com> wrote:
>
> Set trailer iff skb1 is the skbuff where the tailbits space begins.
>
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
> ---
>  net/core/skbuff.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index 0b24aed04060..18ed56316e56 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -4488,8 +4488,9 @@ int skb_cow_data(struct sk_buff *skb, int tailbits, struct sk_buff **trailer)
>                         skb1 = skb2;
>                 }
>                 elt++;
> -               *trailer = skb1;
>                 skb_p = &skb1->next;
> +               if (!*skb_p)
> +                       *trailer = skb1;
>

Why is adding a conditional test going to help ?

cpu will have hard time predicting this one, I doubt this kind of
change is a win.

Powered by blists - more mailing lists