Re: [PATCH net V3 2/2] macvtap: signal truncated packets

2013-12-11 Thread David Miller
From: Jason Wang Date: Wed, 11 Dec 2013 13:08:34 +0800 > macvtap_put_user() never return a value grater than iov length, this in fact > bypasses the truncated checking in macvtap_recvmsg(). Fix this by always > returning the size of packet plus the possible vlan header to let the trunca >

Re: [PATCH net V3 2/2] macvtap: signal truncated packets

2013-12-11 Thread Michael S. Tsirkin
On Wed, Dec 11, 2013 at 01:08:34PM +0800, Jason Wang wrote: > macvtap_put_user() never return a value grater than iov length, this in fact > bypasses the truncated checking in macvtap_recvmsg(). Fix this by always > returning the size of packet plus the possible vlan header to let the trunca >

Re: [PATCH net V3 2/2] macvtap: signal truncated packets

2013-12-11 Thread Vlad Yasevich
On 12/11/2013 12:08 AM, Jason Wang wrote: > macvtap_put_user() never return a value grater than iov length, this in fact > bypasses the truncated checking in macvtap_recvmsg(). Fix this by always > returning the size of packet plus the possible vlan header to let the trunca > checking work. > >

Re: [PATCH net V3 2/2] macvtap: signal truncated packets

2013-12-11 Thread Vlad Yasevich
On 12/11/2013 12:08 AM, Jason Wang wrote: macvtap_put_user() never return a value grater than iov length, this in fact bypasses the truncated checking in macvtap_recvmsg(). Fix this by always returning the size of packet plus the possible vlan header to let the trunca checking work. Cc:

Re: [PATCH net V3 2/2] macvtap: signal truncated packets

2013-12-11 Thread Michael S. Tsirkin
On Wed, Dec 11, 2013 at 01:08:34PM +0800, Jason Wang wrote: macvtap_put_user() never return a value grater than iov length, this in fact bypasses the truncated checking in macvtap_recvmsg(). Fix this by always returning the size of packet plus the possible vlan header to let the trunca

Re: [PATCH net V3 2/2] macvtap: signal truncated packets

2013-12-11 Thread David Miller
From: Jason Wang jasow...@redhat.com Date: Wed, 11 Dec 2013 13:08:34 +0800 macvtap_put_user() never return a value grater than iov length, this in fact bypasses the truncated checking in macvtap_recvmsg(). Fix this by always returning the size of packet plus the possible vlan header to let the

[PATCH net V3 2/2] macvtap: signal truncated packets

2013-12-10 Thread Jason Wang
macvtap_put_user() never return a value grater than iov length, this in fact bypasses the truncated checking in macvtap_recvmsg(). Fix this by always returning the size of packet plus the possible vlan header to let the trunca checking work. Cc: Vlad Yasevich Cc: Zhi Yong Wu Cc: Michael S.

[PATCH net V3 2/2] macvtap: signal truncated packets

2013-12-10 Thread Jason Wang
macvtap_put_user() never return a value grater than iov length, this in fact bypasses the truncated checking in macvtap_recvmsg(). Fix this by always returning the size of packet plus the possible vlan header to let the trunca checking work. Cc: Vlad Yasevich vyasev...@gmail.com Cc: Zhi Yong Wu