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]
Date:   Tue, 26 Dec 2017 12:21:53 -0500 (EST)
From:   David Miller <davem@...emloft.net>
To:     alexey.kodanev@...cle.com
Cc:     netdev@...r.kernel.org, alexander.h.duyck@...el.com
Subject: Re: [PATCH net] ip6_gre: fix device features for ioctl setup

From: Alexey Kodanev <alexey.kodanev@...cle.com>
Date: Wed, 20 Dec 2017 19:36:03 +0300

> When ip6gre is created using ioctl, its features, such as
> scatter-gather, GSO and tx-checksumming will be turned off:
> 
>   # ip -f inet6 tunnel add gre6 mode ip6gre remote fd00::1
>   # ethtool -k gre6 (truncated output)
>     tx-checksumming: off
>     scatter-gather: off
>     tcp-segmentation-offload: off
>     generic-segmentation-offload: off [requested on]
> 
> But when netlink is used, they will be enabled:
>   # ip link add gre6 type ip6gre remote fd00::1
>   # ethtool -k gre6 (truncated output)
>     tx-checksumming: on
>     scatter-gather: on
>     tcp-segmentation-offload: on
>     generic-segmentation-offload: on
> 
> This results in a loss of performance when gre6 is created via ioctl.
> The issue was found with LTP/gre tests.
> 
> Fix it by moving the setup of device features to a separate function
> and invoke it with ndo_init callback because both netlink and ioctl
> will eventually call it via register_netdevice():
> 
>    register_netdevice()
>        - ndo_init() callback -> ip6gre_tunnel_init() or ip6gre_tap_init()
>            - ip6gre_tunnel_init_common()
>                 - ip6gre_tnl_init_features()
> 
> The moved code also contains two minor style fixes:
>   * removed needless tab from GRE6_FEATURES on NETIF_F_HIGHDMA line.
>   * fixed the issue reported by checkpatch: "Unnecessary parentheses around
>     'nt->encap.type == TUNNEL_ENCAP_NONE'"
> 
> Fixes: ac4eb009e477 ("ip6gre: Add support for basic offloads offloads excluding GSO")
> Signed-off-by: Alexey Kodanev <alexey.kodanev@...cle.com>

Looks good, applied and queued up for -stable.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ