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]
Message-ID: <20200630103335.63de7098@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Tue, 30 Jun 2020 10:33:35 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc:     Oliver Herms <oliver.peter.herms@...il.com>,
        netdev@...r.kernel.org, davem@...emloft.net, kuznet@....inr.ac.ru,
        yoshfuji@...ux-ipv6.org
Subject: Re: [PATCH v3] IPv4: Tunnel: Fix effective path mtu calculation

On Tue, 30 Jun 2020 17:51:41 +0200 Nicolas Dichtel wrote:
> Le 30/06/2020 à 08:22, Jakub Kicinski a écrit :
> [snip]
> > My understanding is that for a while now tunnels are not supposed to use
> > dev->hard_header_len to reserve skb space, and use dev->needed_headroom, 
> > instead. sit uses hard_header_len and doesn't even copy needed_headroom
> > of the lower device.  
> 
> I missed this. I was wondering why IPv6 tunnels uses hard_header_len, if there
> was a "good" reason:
> 
> $ git grep "hard_header_len.*=" net/ipv6/
> net/ipv6/ip6_tunnel.c:                  dev->hard_header_len =
> tdev->hard_header_len + t_hlen;
> net/ipv6/ip6_tunnel.c:  dev->hard_header_len = LL_MAX_HEADER + t_hlen;
> net/ipv6/sit.c:         dev->hard_header_len = tdev->hard_header_len +
> sizeof(struct iphdr);
> net/ipv6/sit.c: dev->hard_header_len    = LL_MAX_HEADER + t_hlen;
> 
> A cleanup would be nice ;-)

I did some archaeological investigatin' yesterday, and I saw
c95b819ad75b ("gre: Use needed_headroom") which converted GRE.
Then I think Pravin used GRE as a base for better ip_tunnel infra 
and the no-hard_header_len-abuse gospel has spread to other IPv4
tunnels. AFAICT IPv6 tunnels were not as lucky, and SIT just got
missed in the IPV4 conversion..

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ