<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/fs/proc/proc_sysctl.c, branch v3.2.10</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.10</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.10'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2011-11-02T23:07:27Z</updated>
<entry>
<title>Merge branch 'akpm' (Andrew's incoming - part two)</title>
<updated>2011-11-02T23:07:27Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-11-02T23:07:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=092f4c56c1927e4b61a41ee8055005f1cb437009'/>
<id>urn:sha1:092f4c56c1927e4b61a41ee8055005f1cb437009</id>
<content type='text'>
Says Andrew:

 "60 patches.  That's good enough for -rc1 I guess.  I have quite a lot
  of detritus to be rechecked, work through maintainers, etc.

 - most of the remains of MM
 - rtc
 - various misc
 - cgroups
 - memcg
 - cpusets
 - procfs
 - ipc
 - rapidio
 - sysctl
 - pps
 - w1
 - drivers/misc
 - aio"

* akpm: (60 commits)
  memcg: replace ss-&gt;id_lock with a rwlock
  aio: allocate kiocbs in batches
  drivers/misc/vmw_balloon.c: fix typo in code comment
  drivers/misc/vmw_balloon.c: determine page allocation flag can_sleep outside loop
  w1: disable irqs in critical section
  drivers/w1/w1_int.c: multiple masters used same init_name
  drivers/power/ds2780_battery.c: fix deadlock upon insertion and removal
  drivers/power/ds2780_battery.c: add a nolock function to w1 interface
  drivers/power/ds2780_battery.c: create central point for calling w1 interface
  w1: ds2760 and ds2780, use ida for id and ida_simple_get() to get it
  pps gpio client: add missing dependency
  pps: new client driver using GPIO
  pps: default echo function
  include/linux/dma-mapping.h: add dma_zalloc_coherent()
  sysctl: make CONFIG_SYSCTL_SYSCALL default to n
  sysctl: add support for poll()
  RapidIO: documentation update
  drivers/net/rionet.c: fix ethernet address macros for LE platforms
  RapidIO: fix potential null deref in rio_setup_device()
  RapidIO: add mport driver for Tsi721 bridge
  ...
</content>
</entry>
<entry>
<title>sysctl: add support for poll()</title>
<updated>2011-11-02T23:07:02Z</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@profusion.mobi</email>
</author>
<published>2011-11-02T20:39:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f1ecf06854a66ee663f4d4cf029c78cd62a15e04'/>
<id>urn:sha1:f1ecf06854a66ee663f4d4cf029c78cd62a15e04</id>
<content type='text'>
Adding support for poll() in sysctl fs allows userspace to receive
notifications of changes in sysctl entries.  This adds a infrastructure to
allow files in sysctl fs to be pollable and implements it for hostname and
domainname.

[akpm@linux-foundation.org: s/declare/define/ for definitions]
Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
Cc: Greg KH &lt;gregkh@suse.de&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&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>procfs: report EISDIR when reading sysctl dirs in proc</title>
<updated>2011-11-02T23:07:00Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2011-11-02T20:38:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=887df07891de0435c25cffb92268fea2c621f99c'/>
<id>urn:sha1:887df07891de0435c25cffb92268fea2c621f99c</id>
<content type='text'>
On reading sysctl dirs we should return -EISDIR instead of -EINVAL.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: Cyrill Gorcunov &lt;gorcunov@openvz.org&gt;
Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&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>filesystems: add missing nlink wrappers</title>
<updated>2011-11-02T11:53:43Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2011-10-28T12:13:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6d6b77f163c7eabedbba00ed2abb7d4a570bff76'/>
<id>urn:sha1:6d6b77f163c7eabedbba00ed2abb7d4a570bff76</id>
<content type='text'>
Replace direct i_nlink updates with the respective updater function
(inc_nlink, drop_nlink, clear_nlink, inode_dec_link_count).

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>-&gt;permission() sanitizing: don't pass flags to -&gt;permission()</title>
<updated>2011-07-20T05:43:24Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2011-06-20T23:28:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=10556cb21a0d0b24d95f00ea6df16f599a3345b2'/>
<id>urn:sha1:10556cb21a0d0b24d95f00ea6df16f599a3345b2</id>
<content type='text'>
not used by the instances anymore.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>-&gt;permission() sanitizing: MAY_NOT_BLOCK</title>
<updated>2011-07-20T05:43:18Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2011-06-20T22:59:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1fc0f78ca9f311c6277e2f1b7655bb4d43ceb311'/>
<id>urn:sha1:1fc0f78ca9f311c6277e2f1b7655bb4d43ceb311</id>
<content type='text'>
Duplicate the flags argument into mask bitmap.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>proc_sys_permission() is OK in RCU mode</title>
<updated>2011-06-20T14:45:25Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2011-06-19T00:42:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1aec7036d0c2996c86ce483ca0a28f3b20807b43'/>
<id>urn:sha1:1aec7036d0c2996c86ce483ca0a28f3b20807b43</id>
<content type='text'>
nothing blocking there, since all instances of sysctl
-&gt;permissions() method are non-blocking - both of them,
that is.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'next' into for-linus</title>
<updated>2011-03-15T22:41:17Z</updated>
<author>
<name>James Morris</name>
<email>jmorris@namei.org</email>
</author>
<published>2011-03-15T22:41:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a002951c97ff8da49938c982a4c236bf2fafdc9f'/>
<id>urn:sha1:a002951c97ff8da49938c982a4c236bf2fafdc9f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>unfuck proc_sysctl -&gt;d_compare()</title>
<updated>2011-03-08T07:22:27Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2011-03-08T06:25:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dfef6dcd35cb4a251f6322ca9b2c06f0bb1aa1f4'/>
<id>urn:sha1:dfef6dcd35cb4a251f6322ca9b2c06f0bb1aa1f4</id>
<content type='text'>
a) struct inode is not going to be freed under -&gt;d_compare();
however, the thing PROC_I(inode)-&gt;sysctl points to just might.
Fortunately, it's enough to make freeing that sucker delayed,
provided that we don't step on its -&gt;unregistering, clear
the pointer to it in PROC_I(inode) before dropping the reference
and check if it's NULL in -&gt;d_compare().

b) I'm not sure that we *can* walk into NULL inode here (we recheck
dentry-&gt;seq between verifying that it's still hashed / fetching
dentry-&gt;d_inode and passing it to -&gt;d_compare() and there's no
negative hashed dentries in /proc/sys/*), but if we can walk into
that, we really should not have -&gt;d_compare() return 0 on it!
Said that, I really suspect that this check can be simply killed.
Nick?

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>security/selinux: fix /proc/sys/ labeling</title>
<updated>2011-02-01T16:53:54Z</updated>
<author>
<name>Lucian Adrian Grijincu</name>
<email>lucian.grijincu@gmail.com</email>
</author>
<published>2011-02-01T16:42:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8e6c96935fcc1ed3dbebc96fddfef3f2f2395afc'/>
<id>urn:sha1:8e6c96935fcc1ed3dbebc96fddfef3f2f2395afc</id>
<content type='text'>
This fixes an old (2007) selinux regression: filesystem labeling for
/proc/sys returned
     -r--r--r-- unknown                          /proc/sys/fs/file-nr
instead of
     -r--r--r-- system_u:object_r:sysctl_fs_t:s0 /proc/sys/fs/file-nr

Events that lead to breaking of /proc/sys/ selinux labeling:

1) sysctl was reimplemented to route all calls through /proc/sys/

    commit 77b14db502cb85a031fe8fde6c85d52f3e0acb63
    [PATCH] sysctl: reimplement the sysctl proc support

2) proc_dir_entry was removed from ctl_table:

    commit 3fbfa98112fc3962c416452a0baf2214381030e6
    [PATCH] sysctl: remove the proc_dir_entry member for the sysctl tables

3) selinux still walked the proc_dir_entry tree to apply
   labeling. Because ctl_tables don't have a proc_dir_entry, we did
   not label /proc/sys/ inodes any more. To achieve this the /proc/sys/
   inodes were marked private and private inodes were ignored by
   selinux.

    commit bbaca6c2e7ef0f663bc31be4dad7cf530f6c4962
    [PATCH] selinux: enhance selinux to always ignore private inodes

    commit 86a71dbd3e81e8870d0f0e56b87875f57e58222b
    [PATCH] sysctl: hide the sysctl proc inodes from selinux

Access control checks have been done by means of a special sysctl hook
that was called for read/write accesses to any /proc/sys/ entry.

We don't have to do this because, instead of walking the
proc_dir_entry tree we can walk the dentry tree (as done in this
patch). With this patch:
* we don't mark /proc/sys/ inodes as private
* we don't need the sysclt security hook
* we walk the dentry tree to find the path to the inode.

We have to strip the PID in /proc/PID/ entries that have a
proc_dir_entry because selinux does not know how to label paths like
'/1/net/rpc/nfsd.fh' (and defaults to 'proc_t' labeling). Selinux does
know of '/net/rpc/nfsd.fh' (and applies the 'sysctl_rpc_t' label).

PID stripping from the path was done implicitly in the previous code
because the proc_dir_entry tree had the root in '/net' in the example
from above. The dentry tree has the root in '/1'.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Lucian Adrian Grijincu &lt;lucian.grijincu@gmail.com&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
</feed>
