<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/tun.c, branch linux-2.6.34.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.34.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.34.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-02-10T21:10:57Z</updated>
<entry>
<title>tun: Fix formatting.</title>
<updated>2014-02-10T21:10:57Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2012-07-30T21:52:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f3e0756522c9f15dd6cba70feb9aa760cb05a028'/>
<id>urn:sha1:f3e0756522c9f15dd6cba70feb9aa760cb05a028</id>
<content type='text'>
commit 8bbb181308bc348e02bfdbebdedd4e4ec9d452ce upstream.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>net/tun: fix ioctl() based info leaks</title>
<updated>2014-02-10T21:10:57Z</updated>
<author>
<name>Mathias Krause</name>
</author>
<published>2012-07-29T19:45:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c1968274b39f8e5696baebcba04076678449628d'/>
<id>urn:sha1:c1968274b39f8e5696baebcba04076678449628d</id>
<content type='text'>
commit a117dacde0288f3ec60b6e5bcedae8fa37ee0dfc upstream.

The tun module leaks up to 36 bytes of memory by not fully initializing
a structure located on the stack that gets copied to user memory by the
TUNGETIFF and SIOCGIFHWADDR ioctl()s.

Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>tun: Don't add sysfs attributes to devices without sysfs directories</title>
<updated>2011-01-06T23:07:55Z</updated>
<author>
<name>Ben Hutchings</name>
</author>
<published>2010-09-09T04:21:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=018402a0ef1042e1d1bbc22507dad258b5402e7c'/>
<id>urn:sha1:018402a0ef1042e1d1bbc22507dad258b5402e7c</id>
<content type='text'>
This applies to 2.6.32 *only*.  It has not been applied upstream since
the limitation no longer exists.

Prior to Linux 2.6.35, net devices outside the initial net namespace
did not have sysfs directories.  Attempting to add attributes to
them will trigger a BUG().

Reported-and-tested-by: Russell Stuart &lt;russell-debian@stuart.id.au&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>tun: orphan an skb on tx</title>
<updated>2010-04-14T11:52:03Z</updated>
<author>
<name>Michael S. Tsirkin</name>
</author>
<published>2010-04-13T04:59:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0110d6f22f392f976e84ab49da1b42f85b64a3c5'/>
<id>urn:sha1:0110d6f22f392f976e84ab49da1b42f85b64a3c5</id>
<content type='text'>
The following situation was observed in the field:
tap1 sends packets, tap2 does not consume them, as a result
tap1 can not be closed. This happens because
tun/tap devices can hang on to skbs undefinitely.

As noted by Herbert, possible solutions include a timeout followed by a
copy/change of ownership of the skb, or always copying/changing
ownership if we're going into a hostile device.

This patch implements the second approach.

Note: one issue still remaining is that since skbs
keep reference to tun socket and tun socket has a
reference to tun device, we won't flush backlog,
instead simply waiting for all skbs to get transmitted.
At least this is not user-triggerable, and
this was not reported in practice, my assumption is
other devices besides tap complete an skb
within finite time after it has been queued.

A possible solution for the second issue
would not to have socket reference the device,
instead, implement dev-&gt;destructor for tun, and
wait for all skbs to complete there, but this
needs some thought, probably too risky for 2.6.34.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Tested-by: Yan Vugenfirer &lt;yvugenfi@redhat.com&gt;
Acked-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-next' into for-linus</title>
<updated>2010-03-08T15:55:37Z</updated>
<author>
<name>Jiri Kosina</name>
</author>
<published>2010-03-08T15:55:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=318ae2edc3b29216abd8a2510f3f80b764f06858'/>
<id>urn:sha1:318ae2edc3b29216abd8a2510f3f80b764f06858</id>
<content type='text'>
Conflicts:
	Documentation/filesystems/proc.txt
	arch/arm/mach-u300/include/mach/debug-macro.S
	drivers/net/qlge/qlge_ethtool.c
	drivers/net/qlge/qlge_main.c
	drivers/net/typhoon.c
</content>
</entry>
<entry>
<title>tun: socket filter support</title>
<updated>2010-02-18T00:35:17Z</updated>
<author>
<name>Michael S. Tsirkin</name>
</author>
<published>2010-02-14T01:01:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99405162598176e830d17ae6d4f3d9e070ad900c'/>
<id>urn:sha1:99405162598176e830d17ae6d4f3d9e070ad900c</id>
<content type='text'>
This patch adds Linux Socket Filter support to
tun driver.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tree-wide: Assorted spelling fixes</title>
<updated>2010-02-09T10:13:56Z</updated>
<author>
<name>Daniel Mack</name>
</author>
<published>2010-02-03T00:01:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ad2f3fbb961429d2aa627465ae4829758bc7e07'/>
<id>urn:sha1:3ad2f3fbb961429d2aa627465ae4829758bc7e07</id>
<content type='text'>
In particular, several occurances of funny versions of 'success',
'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address',
'beginning', 'desirable', 'separate' and 'necessary' are fixed.

Signed-off-by: Daniel Mack &lt;daniel@caiaq.de&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>tun: export underlying socket</title>
<updated>2010-01-15T09:43:28Z</updated>
<author>
<name>Michael S. Tsirkin</name>
</author>
<published>2010-01-14T06:17:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=05c2828c72c4eabf62376adfe27bd24797621f62'/>
<id>urn:sha1:05c2828c72c4eabf62376adfe27bd24797621f62</id>
<content type='text'>
Tun device looks similar to a packet socket
in that both pass complete frames from/to userspace.

This patch fills in enough fields in the socket underlying tun driver
to support sendmsg/recvmsg operations, and message flags
MSG_TRUNC and MSG_DONTWAIT, and exports access to this socket
to modules.  Regular read/write behaviour is unchanged.

This way, code using raw sockets to inject packets
into a physical device, can support injecting
packets into host network stack almost without modification.

First user of this interface will be vhost virtualization
accelerator.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tun: use tun_sk instead container_of</title>
<updated>2009-12-27T04:24:44Z</updated>
<author>
<name>Vitaliy Gusev</name>
</author>
<published>2009-12-25T07:17:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=80924e5f7dbe00d964b7249160c7ca25fa3cd889'/>
<id>urn:sha1:80924e5f7dbe00d964b7249160c7ca25fa3cd889</id>
<content type='text'>
Using macro tun_sk is more clear and shorter. However tun.c has tun_sk,
but doesn't use it.

Signed-off-by: Vitaliy Gusev &lt;vgusev@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/tun: handle compat_ioctl directly</title>
<updated>2009-11-07T06:52:32Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2009-11-07T06:52:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=50857e2a59d8beddc6bb76137df026d67f30d5ca'/>
<id>urn:sha1:50857e2a59d8beddc6bb76137df026d67f30d5ca</id>
<content type='text'>
The tun driver is the only code in the kernel that operates
on a character device with struct ifreq. Change the driver
to handle the conversion itself so we can contain the
remaining ifreq handling in the socket layer.

This also fixes a bug in the handling of invalid ioctl
numbers on an unbound tun device. The driver treats this
as a TUNSETIFF in native mode, but there is no way for
the generic compat_ioctl() function to emulate this
behaviour. Possibly the driver was only doing this
accidentally anyway, but if any code relies on this
misfeature, it now also works in compat mode.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
