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: <54F7C26E.3040704@plumgrid.com>
Date:	Wed, 04 Mar 2015 18:41:50 -0800
From:	Alexei Starovoitov <ast@...mgrid.com>
To:	Toshiaki Makita <makita.toshiaki@....ntt.co.jp>,
	Michal Sekletar <msekleta@...hat.com>, netdev@...r.kernel.org
CC:	Jiri Pirko <jpirko@...hat.com>
Subject: Re: [PATCH] filter: introduce SKF_AD_VLAN_PROTO BPF extension

On 3/4/15 6:28 PM, Toshiaki Makita wrote:
> On 2015/03/05 6:03, Alexei Starovoitov wrote:
>> On 3/4/15 12:41 PM, Michal Sekletar wrote:
>>> This commit introduces new BPF extension. It makes possible to load
>>> value of
>>> skb->vlan_proto (vlan tpid) to register A.
>>>
>>> Currently, vlan header is removed from frame and information is
>>> available to
>>> userspace only via tpacket interface. Hence, it is not possible to
>>> install
>>> filter which uses value of vlan tpid field.
>>>
>>> AFAICT only way how to filter based on tpid value is to reconstruct
>>> original
>>> frame encapsulation and interpret BPF filter code in userspace. Doing
>>> that is
>>> way slower than doing filtering in kernel.
>>>
>>> Cc: Alexei Starovoitov <ast@...mgrid.com>
>>> Cc: Jiri Pirko <jpirko@...hat.com>
>>> Signed-off-by: Michal Sekletar <msekleta@...hat.com>
>>> ---
>>> @@ -282,6 +282,7 @@ Possible BPF extensions are shown in the following
>>> table:
>>>      vlan_tci                              skb_vlan_tag_get(skb)
>>>      vlan_pr                               skb_vlan_tag_present(skb)
>>>      rand                                  prandom_u32()
>>> +  vlan_proto                            skb->vlan_proto
>>
>> the patch is correct and looks clean, but I don't understand
>> the motivation for the patch.
>> There is already SKF_AD_VLAN_TAG_PRESENT. If it is set then only
>> two possible values of vlan_proto are ETH_P_8021Q or ETH_P_8021AD.
>> If there another vlan header inside the packet, it's AD.
>
> 802.1ad can be used without an inner vlan tag.
> Also, we can send/receive QinQ frames with 802.1Q outer tags.
> (We can create vlan interface on 802.1Q vlan interface.)

yes, but I think existing 'vlan_tag_present' would be enough
to address the issue mentioned in two bugs reports.

--
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