<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/proc, branch v3.10.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/proc?h=v3.10.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/proc?h=v3.10.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-06-12T23:29:44Z</updated>
<entry>
<title>kmsg: honor dmesg_restrict sysctl on /dev/kmsg</title>
<updated>2013-06-12T23:29:44Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2013-06-12T21:04:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=637241a900cbd982f744d44646b48a273d609b34'/>
<id>urn:sha1:637241a900cbd982f744d44646b48a273d609b34</id>
<content type='text'>
The dmesg_restrict sysctl currently covers the syslog method for access
dmesg, however /dev/kmsg isn't covered by the same protections.  Most
people haven't noticed because util-linux dmesg(1) defaults to using the
syslog method for access in older versions.  With util-linux dmesg(1)
defaults to reading directly from /dev/kmsg.

To fix /dev/kmsg, let's compare the existing interfaces and what they
allow:

 - /proc/kmsg allows:
  - open (SYSLOG_ACTION_OPEN) if CAP_SYSLOG since it uses a destructive
    single-reader interface (SYSLOG_ACTION_READ).
  - everything, after an open.

 - syslog syscall allows:
  - anything, if CAP_SYSLOG.
  - SYSLOG_ACTION_READ_ALL and SYSLOG_ACTION_SIZE_BUFFER, if
    dmesg_restrict==0.
  - nothing else (EPERM).

The use-cases were:
 - dmesg(1) needs to do non-destructive SYSLOG_ACTION_READ_ALLs.
 - sysklog(1) needs to open /proc/kmsg, drop privs, and still issue the
   destructive SYSLOG_ACTION_READs.

AIUI, dmesg(1) is moving to /dev/kmsg, and systemd-journald doesn't
clear the ring buffer.

Based on the comments in devkmsg_llseek, it sounds like actions besides
reading aren't going to be supported by /dev/kmsg (i.e.
SYSLOG_ACTION_CLEAR), so we have a strict subset of the non-destructive
syslog syscall actions.

To this end, move the check as Josh had done, but also rename the
constants to reflect their new uses (SYSLOG_FROM_CALL becomes
SYSLOG_FROM_READER, and SYSLOG_FROM_FILE becomes SYSLOG_FROM_PROC).
SYSLOG_FROM_READER allows non-destructive actions, and SYSLOG_FROM_PROC
allows destructive actions after a capabilities-constrained
SYSLOG_ACTION_OPEN check.

 - /dev/kmsg allows:
  - open if CAP_SYSLOG or dmesg_restrict==0
  - reading/polling, after open

Addresses https://bugzilla.redhat.com/show_bug.cgi?id=903192

[akpm@linux-foundation.org: use pr_warn_once()]
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reported-by: Christian Kujau &lt;lists@nerdbynature.de&gt;
Tested-by: Josh Boyer &lt;jwboyer@redhat.com&gt;
Cc: Kay Sievers &lt;kay@vrfy.org&gt;
Cc: &lt;stable@vger.kernel.org&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>posix-timers: Show clock ID in proc file</title>
<updated>2013-05-28T09:41:14Z</updated>
<author>
<name>Pavel Tikhomirov</name>
<email>snorcht@gmail.com</email>
</author>
<published>2013-05-16T22:12:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=15ef0298deb3929eb6ad6d2334fd2059fd53807c'/>
<id>urn:sha1:15ef0298deb3929eb6ad6d2334fd2059fd53807c</id>
<content type='text'>
Expand information about posix-timers in /proc/&lt;pid&gt;/timers by adding
info about clock, with which the timer was created. I.e. in the forth
line of timer info after "notify:" line go "ClockID: &lt;clock_id&gt;".

Signed-off-by: Pavel Tikhomirov &lt;snorcht@gmail.com&gt;
Cc: Michael Kerrisk &lt;mtk.manpages@gmail.com&gt;
Cc: Matthew Helsley &lt;matt.helsley@gmail.com&gt;
Cc: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Link: http://lkml.kernel.org/r/1368742323-46949-2-git-send-email-snorcht@gmail.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'slab/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux</title>
<updated>2013-05-07T15:42:20Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-05-07T15:42:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0f47c9423c0fe468d0b5b153f9b9d6e8e20707eb'/>
<id>urn:sha1:0f47c9423c0fe468d0b5b153f9b9d6e8e20707eb</id>
<content type='text'>
Pull slab changes from Pekka Enberg:
 "The bulk of the changes are more slab unification from Christoph.

  There's also few fixes from Aaron, Glauber, and Joonsoo thrown into
  the mix."

* 'slab/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux: (24 commits)
  mm, slab_common: Fix bootstrap creation of kmalloc caches
  slab: Return NULL for oversized allocations
  mm: slab: Verify the nodeid passed to ____cache_alloc_node
  slub: tid must be retrieved from the percpu area of the current processor
  slub: Do not dereference NULL pointer in node_match
  slub: add 'likely' macro to inc_slabs_node()
  slub: correct to calculate num of acquired objects in get_partial_node()
  slub: correctly bootstrap boot caches
  mm/sl[au]b: correct allocation type check in kmalloc_slab()
  slab: Fixup CONFIG_PAGE_ALLOC/DEBUG_SLAB_LEAK sections
  slab: Handle ARCH_DMA_MINALIGN correctly
  slab: Common definition for kmem_cache_node
  slab: Rename list3/l3 to node
  slab: Common Kmalloc cache determination
  stat: Use size_t for sizes instead of unsigned
  slab: Common function to create the kmalloc array
  slab: Common definition for the array of kmalloc caches
  slab: Common constants for kmalloc boundaries
  slab: Rename nodelists to node
  slab: Common name for the per node structures
  ...
</content>
</entry>
<entry>
<title>Merge branch 'slab/next' into slab/for-linus</title>
<updated>2013-05-07T06:19:47Z</updated>
<author>
<name>Pekka Enberg</name>
<email>penberg@kernel.org</email>
</author>
<published>2013-05-07T06:19:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=69df2ac1288b456a95aceadafbf88cd891a577c8'/>
<id>urn:sha1:69df2ac1288b456a95aceadafbf88cd891a577c8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>proc_devtree: Replace include linux/module.h with linux/export.h</title>
<updated>2013-05-04T19:31:01Z</updated>
<author>
<name>Syam Sidhardhan</name>
<email>syamsidhardh@gmail.com</email>
</author>
<published>2013-02-14T20:54:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=75fc0cf6af45e5de251caa9421b3c3d1bdc273c8'/>
<id>urn:sha1:75fc0cf6af45e5de251caa9421b3c3d1bdc273c8</id>
<content type='text'>
Since it uses only THIS_MODULE macro, include &lt;linux/export.h&gt;
is the right to go here.

Signed-off-by: Syam Sidhardhan &lt;s.syam@samsung.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2013-05-02T00:51:54Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-05-02T00:51:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=20b4fb485227404329e41ad15588afad3df23050'/>
<id>urn:sha1:20b4fb485227404329e41ad15588afad3df23050</id>
<content type='text'>
Pull VFS updates from Al Viro,

Misc cleanups all over the place, mainly wrt /proc interfaces (switch
create_proc_entry to proc_create(), get rid of the deprecated
create_proc_read_entry() in favor of using proc_create_data() and
seq_file etc).

7kloc removed.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
  don't bother with deferred freeing of fdtables
  proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
  proc: Make the PROC_I() and PDE() macros internal to procfs
  proc: Supply a function to remove a proc entry by PDE
  take cgroup_open() and cpuset_open() to fs/proc/base.c
  ppc: Clean up scanlog
  ppc: Clean up rtas_flash driver somewhat
  hostap: proc: Use remove_proc_subtree()
  drm: proc: Use remove_proc_subtree()
  drm: proc: Use minor-&gt;index to label things, not PDE-&gt;name
  drm: Constify drm_proc_list[]
  zoran: Don't print proc_dir_entry data in debug
  reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
  proc: Supply an accessor for getting the data from a PDE's parent
  airo: Use remove_proc_subtree()
  rtl8192u: Don't need to save device proc dir PDE
  rtl8187se: Use a dir under /proc/net/r8180/
  proc: Add proc_mkdir_data()
  proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
  proc: Move PDE_NET() to fs/proc/proc_net.c
  ...
</content>
</entry>
<entry>
<title>proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h</title>
<updated>2013-05-01T21:29:47Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2013-04-11T12:34:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=59d8053f1e16904d54ed7469d4b36801ea6b8f2c'/>
<id>urn:sha1:59d8053f1e16904d54ed7469d4b36801ea6b8f2c</id>
<content type='text'>
Move non-public declarations and definitions from linux/proc_fs.h to
fs/proc/internal.h.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>proc: Make the PROC_I() and PDE() macros internal to procfs</title>
<updated>2013-05-01T21:29:47Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2013-04-12T17:03:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c30480b92cf497aa3b463367a82f1c2fdc5c46e9'/>
<id>urn:sha1:c30480b92cf497aa3b463367a82f1c2fdc5c46e9</id>
<content type='text'>
Make the PROC_I() and PDE() macros internal to procfs.  This means making
PDE_DATA() out of line.  This could be made more optimal by storing
PDE()-&gt;data into inode-&gt;i_private.

Also provide a __PDE_DATA() that is inline and internal to procfs.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>proc: Supply a function to remove a proc entry by PDE</title>
<updated>2013-05-01T21:29:46Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2013-04-12T16:27:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a8ca16ea7b0abb0a7e49492d1123b715f0ec62e8'/>
<id>urn:sha1:a8ca16ea7b0abb0a7e49492d1123b715f0ec62e8</id>
<content type='text'>
Supply a function (proc_remove()) to remove a proc entry (and any subtree
rooted there) by proc_dir_entry pointer rather than by name and (optionally)
root dir entry pointer.  This allows us to eliminate all remaining pde-&gt;name
accesses outside of procfs.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Grant Likely &lt;grant.likely@linaro.or&gt;
cc: linux-acpi@vger.kernel.org
cc: openipmi-developer@lists.sourceforge.net
cc: devicetree-discuss@lists.ozlabs.org
cc: linux-pci@vger.kernel.org
cc: netdev@vger.kernel.org
cc: netfilter-devel@vger.kernel.org
cc: alsa-devel@alsa-project.org
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>take cgroup_open() and cpuset_open() to fs/proc/base.c</title>
<updated>2013-05-01T21:29:46Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2013-04-20T03:11:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8d8b97ba499cb69fccb5fd9f2b439e3265fc3f27'/>
<id>urn:sha1:8d8b97ba499cb69fccb5fd9f2b439e3265fc3f27</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
