<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/macvtap.c, branch v3.4.52</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.4.52</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.4.52'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2012-10-02T17:30:34+00:00</updated>
<entry>
<title>macvtap: zerocopy: set SKBTX_DEV_ZEROCOPY only when skb is built successfully</title>
<updated>2012-10-02T17:30:34+00:00</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2012-05-02T03:42:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2b3c7134014a200279e7ed31716e528cd009dfb0'/>
<id>urn:sha1:2b3c7134014a200279e7ed31716e528cd009dfb0</id>
<content type='text'>
commit 01d6657b388438def19c8baaea28e742b6ed32ec upstream.

Current the SKBTX_DEV_ZEROCOPY is set unconditionally after
zerocopy_sg_from_iovec(), this would lead NULL pointer when macvtap
fails to build zerocopy skb because destructor_arg was not
initialized. Solve this by set this flag after the skb were built
successfully.

Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>macvtap: zerocopy: put page when fail to get all requested user pages</title>
<updated>2012-10-02T17:30:34+00:00</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2012-05-02T03:41:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=61f26eb401b04a9312c422a5dcc7436246f37b58'/>
<id>urn:sha1:61f26eb401b04a9312c422a5dcc7436246f37b58</id>
<content type='text'>
commit 02ce04bb3d28c3333231f43bca677228dbc686fe upstream.

When get_user_pages_fast() fails to get all requested pages, we could not use
kfree_skb() to free it as it has not been put in the skb fragments. So we need
to call put_page() instead.

Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>macvtap: zerocopy: fix truesize underestimation</title>
<updated>2012-10-02T17:30:34+00:00</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2012-05-02T03:41:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bfd1678ca0143060686d87ae0c07bebab6f0245b'/>
<id>urn:sha1:bfd1678ca0143060686d87ae0c07bebab6f0245b</id>
<content type='text'>
commit 4ef67ebedffa44ed9939b34708ac2fee06d2f65f upstream.

As the skb fragment were pinned/built from user pages, we should
account the page instead of length for truesize.

Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>macvtap: zerocopy: fix offset calculation when building skb</title>
<updated>2012-10-02T17:30:33+00:00</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2012-05-02T03:41:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2b9ec261e3f247dc84b50263564778bcbefec79b'/>
<id>urn:sha1:2b9ec261e3f247dc84b50263564778bcbefec79b</id>
<content type='text'>
commit 3afc9621f15701c557e60f61eba9242bac2771dd upstream.

This patch fixes the offset calculation when building skb:

- offset1 were used as skb data offset not vector offset
- reset offset to zero only when we advance to next vector

Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>macvtap: zerocopy: validate vectors before building skb</title>
<updated>2012-07-16T16:04:42+00:00</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2012-05-02T03:42:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6d0535e8f0406ba353c06a5417e9caa498733372'/>
<id>urn:sha1:6d0535e8f0406ba353c06a5417e9caa498733372</id>
<content type='text'>
commit b92946e2919134ebe2a4083e4302236295ea2a73 upstream.

There're several reasons that the vectors need to be validated:

- Return error when caller provides vectors whose num is greater than UIO_MAXIOV.
- Linearize part of skb when userspace provides vectors grater than MAX_SKB_FRAGS.
- Return error when userspace provides vectors whose total length may exceed
- MAX_SKB_FRAGS * PAGE_SIZE.

Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Cc: Josh Boyer &lt;jwboyer@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>macvtap: restore vlan header on user read</title>
<updated>2012-05-11T22:16:57+00:00</updated>
<author>
<name>Basil Gor</name>
<email>basil.gor@gmail.com</email>
</author>
<published>2012-05-03T22:55:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f09e2249c4f5c7c13261ec73f5a7807076af0c8e'/>
<id>urn:sha1:f09e2249c4f5c7c13261ec73f5a7807076af0c8e</id>
<content type='text'>
Ethernet vlan header is not on the packet and kept in the skb-&gt;vlan_tci
when it comes from lower dev. This patch inserts vlan header in user
buffer during skb copy on user read.

Signed-off-by: Basil Gor &lt;basil.gor@gmail.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>security: trim security.h</title>
<updated>2012-02-13T23:45:42+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2012-02-13T03:58:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4040153087478993cbf0809f444400a3c808074c'/>
<id>urn:sha1:4040153087478993cbf0809f444400a3c808074c</id>
<content type='text'>
Trim security.h

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>macvtap: Fix macvtap_get_queue to use rxhash first</title>
<updated>2011-12-20T18:45:55+00:00</updated>
<author>
<name>Krishna Kumar</name>
<email>krkumar2@in.ibm.com</email>
</author>
<published>2011-11-23T22:17:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ef0002b577b52941fb147128f30bd1ecfdd3ff6d'/>
<id>urn:sha1:ef0002b577b52941fb147128f30bd1ecfdd3ff6d</id>
<content type='text'>
It was reported that the macvtap device selects a
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: treewide use of RCU_INIT_POINTER</title>
<updated>2011-11-23T23:48:19+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-11-23T07:09:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2cfa5a0471fef43fda0b7bd87e3a5e4dbadb7809'/>
<id>urn:sha1:2cfa5a0471fef43fda0b7bd87e3a5e4dbadb7809</id>
<content type='text'>
rcu_assign_pointer(ptr, NULL) can be safely replaced by
RCU_INIT_POINTER(ptr, NULL)

(old rcu_assign_pointer() macro was testing the NULL value and could
omit the smp_wmb(), but this had to be removed because of compiler
warnings)

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>macvtap: Fix the minor device number allocation</title>
<updated>2011-10-21T06:53:07+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2011-10-20T04:29:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e09eff7fc1c6f011f7bdb304e10d2ceef08c88ab'/>
<id>urn:sha1:e09eff7fc1c6f011f7bdb304e10d2ceef08c88ab</id>
<content type='text'>
On systems that create and delete lots of dynamic devices the
31bit linux ifindex fails to fit in the 16bit macvtap minor,
resulting in unusable macvtap devices.  I have systems running
automated tests that that hit this condition in just a few days.

Use a linux idr allocator to track which mavtap minor numbers
are available and and to track the association between macvtap
minor numbers and macvtap network devices.

Remove the unnecessary unneccessary check to see if the network
device we have found is indeed a macvtap device.  With macvtap
specific data structures it is impossible to find any other
kind of networking device.

Increase the macvtap minor range from 65536 to the full 20 bits
that is supported by linux device numbers.  It doesn't solve the
original problem but there is no penalty for a larger minor
device range.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
