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: <bMQIWNWpqi1JM4GpszHDFF2THiN226YLT1l0j2oh08@cp7-web-042.plabs.ch>
Date:   Mon, 09 Nov 2020 23:38:32 +0000
From:   Alexander Lobakin <alobakin@...me>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Alexander Lobakin <alobakin@...me>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Miaohe Lin <linmiaohe@...wei.com>,
        Martin Varghese <martin.varghese@...ia.com>,
        Pravin B Shelar <pshelar@....org>,
        Willem de Bruijn <willemb@...gle.com>,
        Guillaume Nault <gnault@...hat.com>,
        Al Viro <viro@...iv.linux.org.uk>,
        Florian Westphal <fw@...len.de>,
        Steffen Klassert <steffen.klassert@...unet.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Yadu Kishore <kyk.segfault@...il.com>,
        Vladimir Oltean <vladimir.oltean@....com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: skb_vlan_untag(): don't reset transport offset if set by GRO layer

From: Jakub Kicinski <kuba@...nel.org>
Date: Mon, 9 Nov 2020 15:29:13 -0800

> On Thu, 05 Nov 2020 21:29:01 +0000 Alexander Lobakin wrote:
>> Similar to commit fda55eca5a33f
>> ("net: introduce skb_transport_header_was_set()"), avoid resetting
>> transport offsets that were already set by GRO layer. This not only
>> mirrors the behavior of __netif_receive_skb_core(), but also makes
>> sense when it comes to UDP GSO fraglists forwarding: transport offset
>> of such skbs is set only once by GRO receive callback and remains
>> untouched and correct up to the xmitting driver in 1:1 case, but
>> becomes junk after untagging in ingress VLAN case and breaks UDP
>> GSO offload. This does not happen after this change, and all types
>> of forwarding of UDP GSO fraglists work as expected.
>>
>> Signed-off-by: Alexander Lobakin <alobakin@...me>
>> ---
>>  net/core/skbuff.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
>> index c5e6c0b83a92..39c13b9cf79d 100644
>> --- a/net/core/skbuff.c
>> +++ b/net/core/skbuff.c
>> @@ -5441,9 +5441,11 @@ struct sk_buff *skb_vlan_untag(struct sk_buff *skb)
>>  		goto err_free;
>>
>>  	skb_reset_network_header(skb);
>> -	skb_reset_transport_header(skb);
>>  	skb_reset_mac_len(skb);
>>
>> +	if (!skb_transport_header_was_set(skb))
>> +		skb_reset_transport_header(skb);
>> +
>
> Patch looks fine, thanks, but I don't understand why you decided to
> move the reset?  It's not like it's not in order of headers, either.
> Let's keep the series of resets identical to __netif_receive_skb_core(),
> shall we?

Pure cosmetics, but yeah, let's keep. Will submit v2 in just a minute.

>>  	return skb;
>>
>>  err_free:

Thanks,
Al

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ