Files
kernel-tenderloin-3.0/include/linux
Pavel Emelyanov e9720acd72 [NET]: Make /proc/net a symlink on /proc/self/net (v3)
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 -> 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 ->getattr callback for /proc/net
  is overridden to read one from the net->proc_net entry.

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

Selinux fixes are
Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>

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

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-07 11:08:40 -08:00
..
2008-01-28 14:54:13 -08:00
2008-02-06 10:41:15 -08:00
2008-02-07 08:42:23 -08:00
2008-02-14 21:17:08 -08:00
2008-02-05 09:44:13 -08:00
2008-02-20 20:11:49 -05:00
2008-02-10 18:11:16 -05:00
2008-02-05 03:20:13 -08:00
2008-02-06 10:41:02 -08:00
2008-02-19 10:04:00 +01:00
2008-01-28 15:00:14 -08:00
2008-02-19 10:04:00 +01:00
2008-01-29 21:55:15 +01:00
2008-01-28 14:54:10 -08:00
2008-02-23 17:13:24 -08:00
2008-02-03 17:45:46 +02:00
2008-01-28 23:21:18 +01:00
2008-01-28 23:21:18 +01:00
2008-02-14 20:58:05 -08:00
2008-01-25 21:08:02 +01:00
2008-01-30 13:31:10 +01:00
2008-02-03 17:45:46 +02:00
2008-02-03 15:42:53 +02:00
2008-02-08 02:09:56 +00:00
2008-02-08 09:22:24 -08:00
2008-02-07 08:42:30 -08:00
2008-01-28 23:21:18 +01:00
2008-02-03 17:45:46 +02:00
2008-02-19 10:04:00 +01:00
2008-01-25 21:08:33 +01:00
2008-02-03 15:42:53 +02:00
2008-02-11 13:01:51 +01:00
2008-02-05 09:44:19 -08:00
2008-01-30 13:30:27 +01:00
2008-02-13 16:21:18 -08:00
2008-02-07 20:39:44 -05:00
2008-02-11 09:20:50 -08:00
2008-02-01 16:13:16 -05:00
2008-01-28 15:07:58 -08:00
2008-01-28 15:07:57 -08:00
2008-01-28 14:55:09 -08:00
2008-01-28 14:55:09 -08:00
2008-02-19 21:00:18 +01:00
2008-01-31 19:28:20 -08:00
2008-02-13 16:21:18 -08:00
2008-01-28 23:58:27 -05:00
2008-02-06 10:41:21 -08:00
2008-02-08 09:22:29 -08:00
2008-02-19 01:41:26 +01:00
2008-01-25 21:08:34 +01:00
2008-02-13 16:21:18 -08:00
2008-02-03 17:45:46 +02:00
2008-02-06 10:41:01 -08:00
2008-02-14 14:22:12 +09:00
2008-02-23 17:12:14 -08:00
2008-02-08 09:22:31 -08:00
2008-02-14 21:13:33 -08:00
2008-01-28 14:56:29 -08:00
2008-01-30 02:06:08 -05:00
2008-02-06 16:29:59 +11:00
2008-02-14 21:13:33 -08:00
2008-02-02 11:32:01 -08:00
2008-02-10 12:52:46 -08:00
2008-02-02 02:44:34 +03:00
2008-02-07 23:11:56 -08:00
2008-02-06 10:41:20 -08:00
2008-02-08 09:22:31 -08:00
2008-02-08 09:22:26 -08:00
2008-01-25 21:08:24 +01:00
2008-01-25 21:08:24 +01:00
2008-02-05 09:44:22 -08:00
2008-01-30 13:31:47 +01:00
2008-02-08 09:22:41 -08:00
2008-01-31 19:26:46 -08:00
2008-02-07 08:42:34 -08:00
2008-02-07 08:42:30 -08:00
2008-02-08 09:22:41 -08:00
2008-02-08 09:22:27 -08:00
2008-02-03 17:45:46 +02:00
2008-01-25 21:08:33 +01:00
2008-01-31 19:28:30 -08:00
2008-01-30 13:31:20 +01:00
2008-01-30 13:31:20 +01:00
2008-02-08 09:22:31 -08:00
2008-01-25 21:08:34 +01:00
2008-02-07 08:42:34 -08:00
2008-02-05 09:44:07 -08:00
2008-02-01 17:45:14 +01:00
2008-02-07 08:42:16 -08:00
2008-02-08 09:22:34 -08:00
2008-02-08 09:22:36 -08:00
2008-01-24 20:40:26 -08:00
2008-02-04 23:50:13 +11:00
2008-02-04 23:50:03 +11:00
2008-02-04 23:50:02 +11:00
2008-02-04 23:50:03 +11:00
2008-02-06 10:41:03 -08:00
2008-02-03 15:42:53 +02:00