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]
Date:   Wed, 23 Sep 2020 15:54:59 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Vladimir Oltean <vladimir.oltean@....com>
Cc:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        open list <linux-kernel@...r.kernel.org>,
        "olteanv@...il.com" <olteanv@...il.com>,
        "nikolay@...dia.com" <nikolay@...dia.com>
Subject: Re: [PATCH net-next v3 1/2] net: dsa: untag the bridge pvid from rx
 skbs

On 9/23/20 2:48 PM, Vladimir Oltean wrote:
> On Wed, Sep 23, 2020 at 02:40:37PM -0700, Florian Fainelli wrote:
>> From: Vladimir Oltean <vladimir.oltean@....com>
>> +	/* The sad part about attempting to untag from DSA is that we
>> +	 * don't know, unless we check, if the skb will end up in
>> +	 * the bridge's data path - br_allowed_ingress() - or not.
>> +	 * For example, there might be an 8021q upper for the
>> +	 * default_pvid of the bridge, which will steal VLAN-tagged traffic
>> +	 * from the bridge's data path. This is a configuration that DSA
>> +	 * supports because vlan_filtering is 0. In that case, we should
>> +	 * definitely keep the tag, to make sure it keeps working.
>> +	 */
>> +	netdev_for_each_upper_dev_rcu(dev, upper_dev, iter) {
>> +		if (!is_vlan_dev(upper_dev))
>> +			continue;
>> +
>> +		if (vid == vlan_dev_vlan_id(upper_dev))
>> +			return skb;
>> +	}
> 
> Argh...
> So I wanted to ask you how's performance with a few 8021q uppers, then I
> remembered that vlan_do_receive() probably does something more efficient
> here than a complete lookup, like hashing or something, then I found the
> vlan_find_dev() helper function.... Sorry for not noticing it in the
> first place.

Not having much luck with using  __vlan_find_dev_deep_rcu() for a reason
I don't understand we trip over the proto value being neither of the two
support Ethertype and hit the BUG().

+       upper_dev = __vlan_find_dev_deep_rcu(br, htons(proto), vid);
+       if (upper_dev)
+               return skb;

Any ideas?
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ