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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 28 Nov 2014 20:10:03 -0200
From:	Marcelo Ricardo Leitner <mleitner@...hat.com>
To:	Al Viro <viro@...IV.linux.org.uk>
CC:	herbert@...dor.apana.org.au, netdev <netdev@...r.kernel.org>
Subject: Re: tun issue after e0b46d0ee9c: tun: Use iovec iterators

On 28-11-2014 18:37, Al Viro wrote:
> On Fri, Nov 28, 2014 at 05:25:27PM -0200, Marcelo Ricardo Leitner wrote:
>> Hi,
>>
>> I saw there are tun updates on Dave's queue but none seemed to handle this.
>>
>> I can't use current net-next
>> (799d2fff1858004526ad75d66a5dd8a5cce6ad40) on a kvm hypervisor
>> because tun got clogged somehow. Bisected down to:
>
> Umm...  In host, presumably?
>

Exactly

>> And net/core/datagram.c, skb_copy_datagram_from_iter():
>>          if (copy > 0) {
>>                  int ret;
>>                  if (copy > len)
>>                          copy = len;
>>                  ret = copy_from_iter(skb->data + offset, copy, from);
>>                  if (ret != copy) {
>>                          pr_err("%d ret=%d copy=%d offset=%d
>> len=%d\n", __LINE__, ret, copy, offset, len);
>>                          goto fault;
>>                  }
>>
>>
>> I get, for tun interfaces:
>> [   75.435552] 506 ret=80 copy=90 offset=0 len=90
>> [   75.435563] tun: 1124 0 -14           (null)
>> [   75.499528] 506 ret=80 copy=90 offset=0 len=90
>> [   75.499540] tun: 1124 0 -14           (null)
>>
>> These were 1 drop on 1 interface each
>>
>> And for tap interfaces:
>> [  301.982639] 506 ret=80 copy=90 offset=0 len=90
>> [  301.982649] tun: 1124 0 -14           (null)
>> [  301.988625] 506 ret=80 copy=90 offset=0 len=90
>> [  301.988635] tun: 1124 0 -14           (null)
>> [  301.994762] 506 ret=80 copy=90 offset=0 len=90
>> [  301.994773] tun: 1124 0 -14           (null)
>> [  302.229962] 506 ret=332 copy=342 offset=0 len=342
>> [  302.229972] tun: 1124 0 -14           (null)
>> [  302.230621] 506 ret=332 copy=342 offset=0 len=342
>> [  302.230627] tun: 1124 0 -14           (null)
>> [  302.239065] 506 ret=332 copy=342 offset=0 len=342
>> [  302.239071] tun: 1124 0 -14           (null)
>>
>> It's returning 10 bytes less than the expected... ideas?
>
> Could you print vnet_hdr_sz and sizeof(gso) right after that
> copy_from_iter(&gso, ...)?

Did a:
         else {
                 err = skb_copy_datagram_from_iter(skb, 0, from, len);
+               pr_err("vnet_hdr_sz=%d sizeof(gso)=%lu\n", tun->vnet_hdr_sz, 
sizeof(gso));
                 if (!err && msg_control) {

Got, for tun:
[   50.514165] tun: vnet_hdr_sz=12 sizeof(gso)=10

for tap:
[   82.911840] tun: vnet_hdr_sz=10 sizeof(gso)=10

other values were just as before.

Marcelo

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