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: <20150911.153059.459077104316140368.davem@davemloft.net>
Date:	Fri, 11 Sep 2015 15:30:59 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	kafai@...com
Cc:	netdev@...r.kernel.org, eric.dumazet@...il.com,
	hannes@...essinduktion.org, kernel-team@...com
Subject: Re: [PATCH v3 net 1/5] ipv6: Refactor common ip6gre_tunnel_init
 codes

From: Martin KaFai Lau <kafai@...com>
Date: Fri, 11 Sep 2015 11:06:17 -0700

> @@ -1460,19 +1474,16 @@ static void ip6gre_netlink_parms(struct nlattr *data[],
>  static int ip6gre_tap_init(struct net_device *dev)
>  {
>  	struct ip6_tnl *tunnel;
> +	int ret;
>  
> -	tunnel = netdev_priv(dev);
> +	ret = ip6gre_tunnel_init_common(dev);
> +	if (ret)
> +		return ret;
>  
> -	tunnel->dev = dev;
> -	tunnel->net = dev_net(dev);
> -	strcpy(tunnel->parms.name, dev->name);
> +	tunnel = netdev_priv(dev);
>  
>  	ip6gre_tnl_link_config(tunnel, 1);
>  
> -	dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
> -	if (!dev->tstats)
> -		return -ENOMEM;
> -
>  	return 0;
>  }

Is this really equivalent?

The existing code for GRE tap device initialization would use whatever
ether_setup() left in the broadcast address, it would leave
dev->dev_addr alone, and unconditionally use eth_header_ops.

You are changing behavior here, and it's been like this has been this
way long enough that I can't see clearly whether this is a valid
change or not.  It probably is not.

Either way, even if it is valid, you have to document what is happening
here and why it's ok.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ