<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/proc/proc_net.c, branch linux-2.6.28.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2008-07-22T21:19:19Z</updated>
<entry>
<title>netns: make get_proc_net() static</title>
<updated>2008-07-22T21:19:19Z</updated>
<author>
<name>Adrian Bunk</name>
</author>
<published>2008-07-22T21:19:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8086cd451f08f4c0f9693fc66d87754bbd18cfba'/>
<id>urn:sha1:8086cd451f08f4c0f9693fc66d87754bbd18cfba</id>
<content type='text'>
get_proc_net() can now become static.

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Acked-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>proc: consolidate per-net single-release callers</title>
<updated>2008-07-18T11:07:44Z</updated>
<author>
<name>Pavel Emelyanov</name>
</author>
<published>2008-07-18T11:07:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b6fcbdb4f283f7ba67cec3cda6be23da8e959031'/>
<id>urn:sha1:b6fcbdb4f283f7ba67cec3cda6be23da8e959031</id>
<content type='text'>
They are symmetrical to single_open ones :)

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>proc: consolidate per-net single_open callers</title>
<updated>2008-07-18T11:07:21Z</updated>
<author>
<name>Pavel Emelyanov</name>
</author>
<published>2008-07-18T11:07:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=de05c557b24c7dffc6d392e3db120cf11c9f6ae7'/>
<id>urn:sha1:de05c557b24c7dffc6d392e3db120cf11c9f6ae7</id>
<content type='text'>
There are already 7 of them - time to kill some duplicate code.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netns: assign PDE-&gt;data before gluing entry into /proc tree</title>
<updated>2008-05-02T11:12:41Z</updated>
<author>
<name>Denis V. Lunev</name>
</author>
<published>2008-05-02T11:12:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=78e92b99ec4eb73755abd4e357b0b211eadafd88'/>
<id>urn:sha1:78e92b99ec4eb73755abd4e357b0b211eadafd88</id>
<content type='text'>
In this unfortunate case, proc_mkdir_mode wrapper can't be used anymore and
this is no way to reuse proc_create_data due to nlinks assignment. So,
copy the code from proc_mkdir and assign PDE-&gt;data at the appropriate
moment.

Signed-off-by: Denis V. Lunev &lt;den@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NETNS]: Remove ifdef CONFIG_NET braces in fs/proc/proc_net.c.</title>
<updated>2008-04-02T07:10:04Z</updated>
<author>
<name>Denis V. Lunev</name>
</author>
<published>2008-04-02T07:10:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=856f6ff7a3132c8e412b23a7b9157b68ac9a2baf'/>
<id>urn:sha1:856f6ff7a3132c8e412b23a7b9157b68ac9a2baf</id>
<content type='text'>
They are redundant as this file is linked in iff CONFIG_NET is turned
on.

Signed-off-by: Denis V. Lunev &lt;den@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NETNS]: Compile NET /proc support only if CONFIG_NET is set.</title>
<updated>2008-03-27T21:25:53Z</updated>
<author>
<name>Denis V. Lunev</name>
</author>
<published>2008-03-27T21:25:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0e5f8be1388093edc324a78ebf241170b258eba3'/>
<id>urn:sha1:0e5f8be1388093edc324a78ebf241170b258eba3</id>
<content type='text'>
This fix broken compilation for 'allnoconfig'. This was introduced by
Introduced by commit 1218854afa6f659be90b748cf1bc7badee954a35 ("[NET]
NETNS: Omit seq_net_private-&gt;net without CONFIG_NET_NS.")

Signed-off-by: Denis V. Lunev &lt;den@openvz.org&gt;
Acked-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET] NETNS: Omit seq_net_private-&gt;net without CONFIG_NET_NS.</title>
<updated>2008-03-25T19:39:56Z</updated>
<author>
<name>YOSHIFUJI Hideaki</name>
</author>
<published>2008-03-25T17:36:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1218854afa6f659be90b748cf1bc7badee954a35'/>
<id>urn:sha1:1218854afa6f659be90b748cf1bc7badee954a35</id>
<content type='text'>
Without CONFIG_NET_NS, no namespace other than &amp;init_net exists,
no need to store net in seq_net_private.

Signed-off-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
</content>
</entry>
<entry>
<title>[NET]: Make /proc/net a symlink on /proc/self/net (v3)</title>
<updated>2008-03-07T19:08:40Z</updated>
<author>
<name>Pavel Emelyanov</name>
</author>
<published>2008-03-07T19:08:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e9720acd728a46cb40daa52c99a979f7c4ff195c'/>
<id>urn:sha1:e9720acd728a46cb40daa52c99a979f7c4ff195c</id>
<content type='text'>
Current /proc/net is done with so called "shadows", but current
implementation is broken and has little chances to get fixed.

The problem is that dentries subtree of /proc/net directory has
fancy revalidation rules to make processes living in different
net namespaces see different entries in /proc/net subtree, but
currently, tasks see in the /proc/net subdir the contents of any
other namespace, depending on who opened the file first.

The proposed fix is to turn /proc/net into a symlink, which points
to /proc/self/net, which in turn shows what previously was in
/proc/net - the network-related info, from the net namespace the
appropriate task lives in.

# ls -l /proc/net
lrwxrwxrwx  1 root root 8 Mar  5 15:17 /proc/net -&gt; self/net

In other words - this behaves like /proc/mounts, but unlike
"mounts", "net" is not a file, but a directory.

Changes from v2:
* Fixed discrepancy of /proc/net nlink count and selinux labeling
  screwup pointed out by Stephen.

  To get the correct nlink count the -&gt;getattr callback for /proc/net
  is overridden to read one from the net-&gt;proc_net entry.

  To make selinux still work the net-&gt;proc_net entry is initialized
  properly, i.e. with the "net" name and the proc_net parent.

Selinux fixes are
Acked-by:  Stephen Smalley &lt;sds@tycho.nsa.gov&gt;

Changes from v1:
* Fixed a task_struct leak in get_proc_task_net, pointed out by Paul.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Acked-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>proc: fix -&gt;open'less usage due to -&gt;proc_fops flip</title>
<updated>2008-02-08T17:22:24Z</updated>
<author>
<name>Alexey Dobriyan</name>
</author>
<published>2008-02-08T12:18:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2d3a4e3666325a9709cc8ea2e88151394e8f20fc'/>
<id>urn:sha1:2d3a4e3666325a9709cc8ea2e88151394e8f20fc</id>
<content type='text'>
Typical PDE creation code looks like:

	pde = create_proc_entry("foo", 0, NULL);
	if (pde)
		pde-&gt;proc_fops = &amp;foo_proc_fops;

Notice that PDE is first created, only then -&gt;proc_fops is set up to
final value. This is a problem because right after creation
a) PDE is fully visible in /proc , and
b) -&gt;proc_fops are proc_file_operations which do not have -&gt;open callback. So, it's
   possible to -&gt;read without -&gt;open (see one class of oopses below).

The fix is new API called proc_create() which makes sure -&gt;proc_fops are
set up before gluing PDE to main tree. Typical new code looks like:

	pde = proc_create("foo", 0, NULL, &amp;foo_proc_fops);
	if (!pde)
		return -ENOMEM;

Fix most networking users for a start.

In the long run, create_proc_entry() for regular files will go.

BUG: unable to handle kernel NULL pointer dereference at virtual address 00000024
printing eip: c1188c1b *pdpt = 000000002929e001 *pde = 0000000000000000
Oops: 0002 [#1] PREEMPT SMP DEBUG_PAGEALLOC
last sysfs file: /sys/block/sda/sda1/dev
Modules linked in: foo af_packet ipv6 cpufreq_ondemand loop serio_raw psmouse k8temp hwmon sr_mod cdrom

Pid: 24679, comm: cat Not tainted (2.6.24-rc3-mm1 #2)
EIP: 0060:[&lt;c1188c1b&gt;] EFLAGS: 00210002 CPU: 0
EIP is at mutex_lock_nested+0x75/0x25d
EAX: 000006fe EBX: fffffffb ECX: 00001000 EDX: e9340570
ESI: 00000020 EDI: 00200246 EBP: e9340570 ESP: e8ea1ef8
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process cat (pid: 24679, ti=E8EA1000 task=E9340570 task.ti=E8EA1000)
Stack: 00000000 c106f7ce e8ee05b4 00000000 00000001 458003d0 f6fb6f20 fffffffb
       00000000 c106f7aa 00001000 c106f7ce 08ae9000 f6db53f0 00000020 00200246
       00000000 00000002 00000000 00200246 00200246 e8ee05a0 fffffffb e8ee0550
Call Trace:
 [&lt;c106f7ce&gt;] seq_read+0x24/0x28a
 [&lt;c106f7aa&gt;] seq_read+0x0/0x28a
 [&lt;c106f7ce&gt;] seq_read+0x24/0x28a
 [&lt;c106f7aa&gt;] seq_read+0x0/0x28a
 [&lt;c10818b8&gt;] proc_reg_read+0x60/0x73
 [&lt;c1081858&gt;] proc_reg_read+0x0/0x73
 [&lt;c105a34f&gt;] vfs_read+0x6c/0x8b
 [&lt;c105a6f3&gt;] sys_read+0x3c/0x63
 [&lt;c10025f2&gt;] sysenter_past_esp+0x5f/0xa5
 [&lt;c10697a7&gt;] destroy_inode+0x24/0x33
 =======================
INFO: lockdep is turned off.
Code: 75 21 68 e1 1a 19 c1 68 87 00 00 00 68 b8 e8 1f c1 68 25 73 1f c1 e8 84 06 e9 ff e8 52 b8 e7 ff 83 c4 10 9c 5f fa e8 28 89 ea ff &lt;f0&gt; fe 4e 04 79 0a f3 90 80 7e 04 00 7e f8 eb f0 39 76 34 74 33
EIP: [&lt;c1188c1b&gt;] mutex_lock_nested+0x75/0x25d SS:ESP 0068:e8ea1ef8

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Alexey Dobriyan &lt;adobriyan@sw.ru&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[ATM]: Oops reading net/atm/arp</title>
<updated>2008-01-28T23:01:36Z</updated>
<author>
<name>Denis V. Lunev</name>
</author>
<published>2008-01-10T11:51:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5d69b9f4a6ce17f0d09595da45e37b870fee5ae'/>
<id>urn:sha1:e5d69b9f4a6ce17f0d09595da45e37b870fee5ae</id>
<content type='text'>
cat /proc/net/atm/arp causes the NULL pointer dereference in the
get_proc_net+0xc/0x3a. This happens as proc_get_net believes that the
parent proc dir entry contains struct net.

Fix this assumption for "net/atm" case.

The problem is introduced by the commit c0097b07abf5f92ab135d024dd41bd2aada1512f
from Eric W. Biederman/Daniel Lezcano.

Signed-off-by: Denis V. Lunev &lt;den@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
