<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/net/tun.c, branch v2.6.25.12</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>net: check for underlength tap writes</title>
<updated>2008-04-13T01:49:30+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2008-04-13T01:49:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e01bf1c83332c4653ffd30eed20a94a9c83d82b2'/>
<id>e01bf1c83332c4653ffd30eed20a94a9c83d82b2</id>
<content type='text'>
If the user gives a packet under 14 bytes, we'll end up reading off the end
of the skb (not oopsing, just reading off the end).

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Acked-by: Max Krasnyanskiy &lt;maxk@qualcomm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the user gives a packet under 14 bytes, we'll end up reading off the end
of the skb (not oopsing, just reading off the end).

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Acked-by: Max Krasnyanskiy &lt;maxk@qualcomm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: make struct tun_struct private to tun.c</title>
<updated>2008-04-13T01:48:58+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2008-04-13T01:48:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=14daa02139dcb3193b2b0250c0720a23ef610c49'/>
<id>14daa02139dcb3193b2b0250c0720a23ef610c49</id>
<content type='text'>
There's no reason for this to be in the header, and it just hurts
recompile time.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Acked-by: Max Krasnyanskiy &lt;maxk@qualcomm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's no reason for this to be in the header, and it just hurts
recompile time.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Acked-by: Max Krasnyanskiy &lt;maxk@qualcomm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[TUN]: Fix RTNL-locking in tun/tap driver</title>
<updated>2008-02-29T20:26:21+00:00</updated>
<author>
<name>Kim B. Heino</name>
<email>Kim.Heino@bluegiga.com</email>
</author>
<published>2008-02-29T20:26:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=401023710d73aaef1191ab4d6a79d39c51add828'/>
<id>401023710d73aaef1191ab4d6a79d39c51add828</id>
<content type='text'>
Current tun/tap driver sets also net device's hw address when asked to
change character device's hw address. This is a good idea, but it
misses RTLN-locking, resulting following error message in 2.6.25-rc3's
inetdev_event() function:

RTNL: assertion failed at net/ipv4/devinet.c (1050)

Attached patch fixes this problem.

Signed-off-by: Kim B. Heino &lt;Kim.Heino@bluegiga.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Current tun/tap driver sets also net device's hw address when asked to
change character device's hw address. This is a good idea, but it
misses RTLN-locking, resulting following error message in 2.6.25-rc3's
inetdev_event() function:

RTNL: assertion failed at net/ipv4/devinet.c (1050)

Attached patch fixes this problem.

Signed-off-by: Kim B. Heino &lt;Kim.Heino@bluegiga.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tun: impossible to deassert IFF_ONE_QUEUE or IFF_NO_PI</title>
<updated>2008-02-05T11:05:07+00:00</updated>
<author>
<name>Nathaniel Filardo</name>
<email>nwfilardo@gmail.com</email>
</author>
<published>2008-02-05T11:05:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a26af1e08a3a1e0f88e6f2685ac2313d713a59c9'/>
<id>a26af1e08a3a1e0f88e6f2685ac2313d713a59c9</id>
<content type='text'>
From: "Nathaniel Filardo" &lt;nwfilardo@gmail.com&gt;

Taken from http://bugzilla.kernel.org/show_bug.cgi?id=9806

The TUN/TAP driver only permits one-way transitions of IFF_NO_PI or
IFF_ONE_QUEUE during the lifetime of a tap/tun interface.  Note that
tun_set_iff contains

 541         if (ifr-&gt;ifr_flags &amp; IFF_NO_PI)
 542                 tun-&gt;flags |= TUN_NO_PI;
 543 
 544         if (ifr-&gt;ifr_flags &amp; IFF_ONE_QUEUE)
 545                 tun-&gt;flags |= TUN_ONE_QUEUE;

This is easily fixed by adding else branches which clear these bits.

Steps to reproduce:

This is easily reproduced by setting an interface persistant using tunctl then
attempting to open it as IFF_TAP or IFF_TUN, without asserting the IFF_NO_PI
flag.  The ioctl() will succeed and the ifr.flags word is not modified, but the
interface remains in IFF_NO_PI mode (as it was set by tunctl).

Acked-by: Maxim Krasnyansky &lt;maxk@qualcomm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From: "Nathaniel Filardo" &lt;nwfilardo@gmail.com&gt;

Taken from http://bugzilla.kernel.org/show_bug.cgi?id=9806

The TUN/TAP driver only permits one-way transitions of IFF_NO_PI or
IFF_ONE_QUEUE during the lifetime of a tap/tun interface.  Note that
tun_set_iff contains

 541         if (ifr-&gt;ifr_flags &amp; IFF_NO_PI)
 542                 tun-&gt;flags |= TUN_NO_PI;
 543 
 544         if (ifr-&gt;ifr_flags &amp; IFF_ONE_QUEUE)
 545                 tun-&gt;flags |= TUN_ONE_QUEUE;

This is easily fixed by adding else branches which clear these bits.

Steps to reproduce:

This is easily reproduced by setting an interface persistant using tunctl then
attempting to open it as IFF_TAP or IFF_TUN, without asserting the IFF_NO_PI
flag.  The ioctl() will succeed and the ifr.flags word is not modified, but the
interface remains in IFF_NO_PI mode (as it was set by tunctl).

Acked-by: Maxim Krasnyansky &lt;maxk@qualcomm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>annotate tun</title>
<updated>2008-01-28T23:07:57+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2007-12-22T17:52:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a3edb08311fc559652ffc959e93eb5be9294443f'/>
<id>a3edb08311fc559652ffc959e93eb5be9294443f</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[TUN]: Use iov_length()</title>
<updated>2008-01-28T22:54:34+00:00</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2007-11-20T06:46:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=52427c9d11477d5a2633d81050f52523decf9eff'/>
<id>52427c9d11477d5a2633d81050f52523decf9eff</id>
<content type='text'>
Use iov_length() instead of tun's homemade iov_total().

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use iov_length() instead of tun's homemade iov_total().

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[TUNTAP]: Fix wrong debug message.</title>
<updated>2007-12-27T03:36:34+00:00</updated>
<author>
<name>Toyo Abe</name>
<email>tabe@miraclelinux.com</email>
</author>
<published>2007-12-25T05:29:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c6e991de4bd22dcdf9b9d9035e18b63b0bf2d198'/>
<id>c6e991de4bd22dcdf9b9d9035e18b63b0bf2d198</id>
<content type='text'>
This is a trivial fix of debug message.
When a persist flag is set, the message should say "enabled".

Signed-off-by: Toyo Abe &lt;tabe@miraclelinux.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a trivial fix of debug message.
When a persist flag is set, the message should say "enabled".

Signed-off-by: Toyo Abe &lt;tabe@miraclelinux.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()</title>
<updated>2007-10-10T23:51:42+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2007-10-04T00:59:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0795af5729b18218767fab27c44b1384f72dc9ad'/>
<id>0795af5729b18218767fab27c44b1384f72dc9ad</id>
<content type='text'>
This is nicer than the MAC_FMT stuff.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is nicer than the MAC_FMT stuff.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[TAP]: Configurable interface MTU.</title>
<updated>2007-10-10T23:51:19+00:00</updated>
<author>
<name>Ed Swierk</name>
<email>eswierk@arastra.com</email>
</author>
<published>2007-09-16T19:21:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4885a50476b95fa0f4caad179a80783508c2fe86'/>
<id>4885a50476b95fa0f4caad179a80783508c2fe86</id>
<content type='text'>
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[NET] drivers/net: statistics cleanup #1 -- save memory and shrink code</title>
<updated>2007-10-10T23:51:16+00:00</updated>
<author>
<name>Jeff Garzik</name>
<email>jeff@garzik.org</email>
</author>
<published>2007-10-04T00:41:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=09f75cd7bf13720738e6a196cc0107ce9a5bd5a0'/>
<id>09f75cd7bf13720738e6a196cc0107ce9a5bd5a0</id>
<content type='text'>
We now have struct net_device_stats embedded in struct net_device,
and the default -&gt;get_stats() hook does the obvious thing for us.

Run through drivers/net/* and remove the driver-local storage of
statistics, and driver-local -&gt;get_stats() hook where applicable.

This was just the low-hanging fruit in drivers/net; plenty more drivers
remain to be updated.

[ Resolved conflicts with napi_struct changes and fix sunqe build
  regression... -DaveM ]

Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We now have struct net_device_stats embedded in struct net_device,
and the default -&gt;get_stats() hook does the obvious thing for us.

Run through drivers/net/* and remove the driver-local storage of
statistics, and driver-local -&gt;get_stats() hook where applicable.

This was just the low-hanging fruit in drivers/net; plenty more drivers
remain to be updated.

[ Resolved conflicts with napi_struct changes and fix sunqe build
  regression... -DaveM ]

Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
