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:   Fri, 13 May 2022 22:35:34 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Vladimir Oltean <vladimir.oltean@....com>
Cc:     netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next 1/5] net: dsa: tag_rtl4_a: __skb_put_padto() can
 never fail

On Wed, May 11, 2022 at 5:14 PM Vladimir Oltean <vladimir.oltean@....com> wrote:

> One of the purposes of the central dsa_realloc_skb() is to ensure that
> the skb has a geometry which does not need to be adjusted by tagging
> protocol drivers for most cases. This includes making sure that the skb
> is not cloned (otherwise pskb_expand_head() is called).
>
> So there is no reason why __skb_put_padto() is going to return an error,
> otherwise it would have returned the error in dsa_realloc_skb().
>
> Use the simple eth_skb_pad() which passes "true" to "free_on_error"
> (which does not matter) and save a conditional in the TX data path.
> With this, also remove the uninformative comment.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>

This looks correct to me!
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>

Yours,
Linus Walleij

Powered by blists - more mailing lists