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:	Thu, 27 Mar 2014 21:05:41 -0400
From:	Vlad Yasevich <vyasevic@...hat.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	netdev@...r.kernel.org
Subject: Re: [PATCH v2 net] net: Account for all vlan headers in skb_mac_gso_segment

On 03/27/2014 06:21 PM, Eric Dumazet wrote:
> On Thu, 2014-03-27 at 17:26 -0400, Vlad Yasevich wrote:
> 
>> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
>> index 869c7af..cac38ba 100644
>> --- a/net/core/skbuff.c
>> +++ b/net/core/skbuff.c
>> @@ -2866,8 +2866,9 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,
>>  	int err = -ENOMEM;
>>  	int i = 0;
>>  	int pos;
>> +	int dummy;
>>  
>> -	proto = skb_network_protocol(head_skb);
>> +	proto = skb_network_protocol(head_skb, &dummy);
>>  	if (unlikely(!proto))
>>  		return ERR_PTR(-EINVAL);
>>  
> 
> I am wondering if '&dummy' could be replaced by &doffset.
> 
> We have :
> 
> unsigned int doffset = head_skb->data - skb_mac_header(head_skb);
> 
> It looks like this is the same content than 'dummy', right ?
> 

No, that shouldn't be.  doffset is the offset of data past the
ip and tcp headers.  Dummy above will usually be the size of mac header
which at this point is useless to us.   The only time it might
be useful is if we have more encapsulations inside the tcp/udp
headers that skb_network_protocol would actually parse
(may be vlan on top of vxlan, so that vlan tagged frame is put
inside the UDP payload.  not sure if its possible).  But I think
this is already handled.

-vlad


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