<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/proc, branch v3.8</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/proc?h=v3.8</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/proc?h=v3.8'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-01-02T17:27:10Z</updated>
<entry>
<title>mempolicy: remove arg from mpol_parse_str, mpol_to_str</title>
<updated>2013-01-02T17:27:10Z</updated>
<author>
<name>Hugh Dickins</name>
<email>hughd@google.com</email>
</author>
<published>2013-01-02T10:04:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a7a88b23737095e6c18a20c5d4eef9e25ec5b829'/>
<id>urn:sha1:a7a88b23737095e6c18a20c5d4eef9e25ec5b829</id>
<content type='text'>
Remove the unused argument (formerly no_context) from mpol_parse_str()
and from mpol_to_str().

Signed-off-by: Hugh Dickins &lt;hughd@google.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>proc: Allow proc_free_inum to be called from any context</title>
<updated>2012-12-26T00:23:12Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-12-22T04:38:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dfb2ea45becb198beeb75350d0b7b7ad9076a38f'/>
<id>urn:sha1:dfb2ea45becb198beeb75350d0b7b7ad9076a38f</id>
<content type='text'>
While testing the pid namespace code I hit this nasty warning.

[  176.262617] ------------[ cut here ]------------
[  176.263388] WARNING: at /home/eric/projects/linux/linux-userns-devel/kernel/softirq.c:160 local_bh_enable_ip+0x7a/0xa0()
[  176.265145] Hardware name: Bochs
[  176.265677] Modules linked in:
[  176.266341] Pid: 742, comm: bash Not tainted 3.7.0userns+ #18
[  176.266564] Call Trace:
[  176.266564]  [&lt;ffffffff810a539f&gt;] warn_slowpath_common+0x7f/0xc0
[  176.266564]  [&lt;ffffffff810a53fa&gt;] warn_slowpath_null+0x1a/0x20
[  176.266564]  [&lt;ffffffff810ad9ea&gt;] local_bh_enable_ip+0x7a/0xa0
[  176.266564]  [&lt;ffffffff819308c9&gt;] _raw_spin_unlock_bh+0x19/0x20
[  176.266564]  [&lt;ffffffff8123dbda&gt;] proc_free_inum+0x3a/0x50
[  176.266564]  [&lt;ffffffff8111d0dc&gt;] free_pid_ns+0x1c/0x80
[  176.266564]  [&lt;ffffffff8111d195&gt;] put_pid_ns+0x35/0x50
[  176.266564]  [&lt;ffffffff810c608a&gt;] put_pid+0x4a/0x60
[  176.266564]  [&lt;ffffffff8146b177&gt;] tty_ioctl+0x717/0xc10
[  176.266564]  [&lt;ffffffff810aa4d5&gt;] ? wait_consider_task+0x855/0xb90
[  176.266564]  [&lt;ffffffff81086bf9&gt;] ? default_spin_lock_flags+0x9/0x10
[  176.266564]  [&lt;ffffffff810cab0a&gt;] ? remove_wait_queue+0x5a/0x70
[  176.266564]  [&lt;ffffffff811e37e8&gt;] do_vfs_ioctl+0x98/0x550
[  176.266564]  [&lt;ffffffff810b8a0f&gt;] ? recalc_sigpending+0x1f/0x60
[  176.266564]  [&lt;ffffffff810b9127&gt;] ? __set_task_blocked+0x37/0x80
[  176.266564]  [&lt;ffffffff810ab95b&gt;] ? sys_wait4+0xab/0xf0
[  176.266564]  [&lt;ffffffff811e3d31&gt;] sys_ioctl+0x91/0xb0
[  176.266564]  [&lt;ffffffff810a95f0&gt;] ? task_stopped_code+0x50/0x50
[  176.266564]  [&lt;ffffffff81939199&gt;] system_call_fastpath+0x16/0x1b
[  176.266564] ---[ end trace 387af88219ad6143 ]---

It turns out that spin_unlock_bh(proc_inum_lock) is not safe when
put_pid is called with another spinlock held and irqs disabled.

For now take the easy path and use spin_lock_irqsave(proc_inum_lock)
in proc_free_inum and spin_loc_irq in proc_alloc_inum(proc_inum_lock).

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'akpm' (Andrew's patch-bomb)</title>
<updated>2012-12-21T04:00:43Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-12-21T04:00:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4c9a44aebeaef35570a67aed17b72a2cf8d0b219'/>
<id>urn:sha1:4c9a44aebeaef35570a67aed17b72a2cf8d0b219</id>
<content type='text'>
Merge the rest of Andrew's patches for -rc1:
 "A bunch of fixes and misc missed-out-on things.

  That'll do for -rc1.  I still have a batch of IPC patches which still
  have a possible bug report which I'm chasing down."

* emailed patches from Andrew Morton &lt;akpm@linux-foundation.org&gt;: (25 commits)
  keys: use keyring_alloc() to create module signing keyring
  keys: fix unreachable code
  sendfile: allows bypassing of notifier events
  SGI-XP: handle non-fatal traps
  fat: fix incorrect function comment
  Documentation: ABI: remove testing/sysfs-devices-node
  proc: fix inconsistent lock state
  linux/kernel.h: fix DIV_ROUND_CLOSEST with unsigned divisors
  memcg: don't register hotcpu notifier from -&gt;css_alloc()
  checkpatch: warn on uapi #includes that #include &lt;uapi/...
  revert "rtc: recycle id when unloading a rtc driver"
  mm: clean up transparent hugepage sysfs error messages
  hfsplus: add error message for the case of failure of sync fs in delayed_sync_fs() method
  hfsplus: rework processing of hfs_btree_write() returned error
  hfsplus: rework processing errors in hfsplus_free_extents()
  hfsplus: avoid crash on failed block map free
  kcmp: include linux/ptrace.h
  drivers/rtc/rtc-imxdi.c: must include &lt;linux/spinlock.h&gt;
  mm: cma: WARN if freed memory is still in use
  exec: do not leave bprm-&gt;interp on stack
  ...
</content>
</entry>
<entry>
<title>proc: fix inconsistent lock state</title>
<updated>2012-12-21T01:40:20Z</updated>
<author>
<name>Xiaotian Feng</name>
<email>xtfeng@gmail.com</email>
</author>
<published>2012-12-20T23:05:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ee297209bf0a25c6717b7c063e76795142d32f37'/>
<id>urn:sha1:ee297209bf0a25c6717b7c063e76795142d32f37</id>
<content type='text'>
Lockdep found an inconsistent lock state when rcu is processing delayed
work in softirq.  Currently, kernel is using spin_lock/spin_unlock to
protect proc_inum_ida, but proc_free_inum is called by rcu in softirq
context.

Use spin_lock_bh/spin_unlock_bh fix following lockdep warning.

  =================================
  [ INFO: inconsistent lock state ]
  3.7.0 #36 Not tainted
  ---------------------------------
  inconsistent {SOFTIRQ-ON-W} -&gt; {IN-SOFTIRQ-W} usage.
  swapper/1/0 [HC0[0]:SC1[1]:HE1:SE0] takes:
   (proc_inum_lock){+.?...}, at: proc_free_inum+0x1c/0x50
  {SOFTIRQ-ON-W} state was registered at:
     __lock_acquire+0x8ae/0xca0
     lock_acquire+0x199/0x200
     _raw_spin_lock+0x41/0x50
     proc_alloc_inum+0x4c/0xd0
     alloc_mnt_ns+0x49/0xc0
     create_mnt_ns+0x25/0x70
     mnt_init+0x161/0x1c7
     vfs_caches_init+0x107/0x11a
     start_kernel+0x348/0x38c
     x86_64_start_reservations+0x131/0x136
     x86_64_start_kernel+0x103/0x112
  irq event stamp: 2993422
  hardirqs last  enabled at (2993422):  _raw_spin_unlock_irqrestore+0x55/0x80
  hardirqs last disabled at (2993421):  _raw_spin_lock_irqsave+0x29/0x70
  softirqs last  enabled at (2993394):  _local_bh_enable+0x13/0x20
  softirqs last disabled at (2993395):  call_softirq+0x1c/0x30

  other info that might help us debug this:
   Possible unsafe locking scenario:

         CPU0
         ----
    lock(proc_inum_lock);
    &lt;Interrupt&gt;
      lock(proc_inum_lock);

   *** DEADLOCK ***

  no locks held by swapper/1/0.

  stack backtrace:
  Pid: 0, comm: swapper/1 Not tainted 3.7.0 #36
  Call Trace:
   &lt;IRQ&gt;  [&lt;ffffffff810a40f1&gt;] ? vprintk_emit+0x471/0x510
    print_usage_bug+0x2a5/0x2c0
    mark_lock+0x33b/0x5e0
    __lock_acquire+0x813/0xca0
    lock_acquire+0x199/0x200
    _raw_spin_lock+0x41/0x50
    proc_free_inum+0x1c/0x50
    free_pid_ns+0x1c/0x50
    put_pid_ns+0x2e/0x50
    put_pid+0x4a/0x60
    delayed_put_pid+0x12/0x20
    rcu_process_callbacks+0x462/0x790
    __do_softirq+0x1b4/0x3b0
    call_softirq+0x1c/0x30
    do_softirq+0x59/0xd0
    irq_exit+0x54/0xd0
    smp_apic_timer_interrupt+0x95/0xa3
    apic_timer_interrupt+0x72/0x80
    cpuidle_enter_tk+0x10/0x20
    cpuidle_enter_state+0x17/0x50
    cpuidle_idle_call+0x287/0x520
    cpu_idle+0xba/0x130
    start_secondary+0x2b3/0x2bc

Signed-off-by: Xiaotian Feng &lt;dannyfeng@tencent.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.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: drop vmtruncate</title>
<updated>2012-12-20T19:00:01Z</updated>
<author>
<name>Marco Stornelli</name>
<email>marco.stornelli@gmail.com</email>
</author>
<published>2012-12-15T10:48:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=46f69557103e11fb963ae5c98b7777e90493241b'/>
<id>urn:sha1:46f69557103e11fb963ae5c98b7777e90493241b</id>
<content type='text'>
Removed vmtruncate

Signed-off-by: Marco Stornelli &lt;marco.stornelli@gmail.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'akpm' (Andrew's patch-bomb)</title>
<updated>2012-12-18T04:58:12Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-12-18T04:58:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=848b81415c42ff3dc9a4204749087b015c37ef66'/>
<id>urn:sha1:848b81415c42ff3dc9a4204749087b015c37ef66</id>
<content type='text'>
Merge misc patches from Andrew Morton:
 "Incoming:

   - lots of misc stuff

   - backlight tree updates

   - lib/ updates

   - Oleg's percpu-rwsem changes

   - checkpatch

   - rtc

   - aoe

   - more checkpoint/restart support

  I still have a pile of MM stuff pending - Pekka should be merging
  later today after which that is good to go.  A number of other things
  are twiddling thumbs awaiting maintainer merges."

* emailed patches from Andrew Morton &lt;akpm@linux-foundation.org&gt;: (180 commits)
  scatterlist: don't BUG when we can trivially return a proper error.
  docs: update documentation about /proc/&lt;pid&gt;/fdinfo/&lt;fd&gt; fanotify output
  fs, fanotify: add @mflags field to fanotify output
  docs: add documentation about /proc/&lt;pid&gt;/fdinfo/&lt;fd&gt; output
  fs, notify: add procfs fdinfo helper
  fs, exportfs: add exportfs_encode_inode_fh() helper
  fs, exportfs: escape nil dereference if no s_export_op present
  fs, epoll: add procfs fdinfo helper
  fs, eventfd: add procfs fdinfo helper
  procfs: add ability to plug in auxiliary fdinfo providers
  tools/testing/selftests/kcmp/kcmp_test.c: print reason for failure in kcmp_test
  breakpoint selftests: print failure status instead of cause make error
  kcmp selftests: print fail status instead of cause make error
  kcmp selftests: make run_tests fix
  mem-hotplug selftests: print failure status instead of cause make error
  cpu-hotplug selftests: print failure status instead of cause make error
  mqueue selftests: print failure status instead of cause make error
  vm selftests: print failure status instead of cause make error
  ubifs: use prandom_bytes
  mtd: nandsim: use prandom_bytes
  ...
</content>
</entry>
<entry>
<title>fs, epoll: add procfs fdinfo helper</title>
<updated>2012-12-18T01:15:27Z</updated>
<author>
<name>Cyrill Gorcunov</name>
<email>gorcunov@openvz.org</email>
</author>
<published>2012-12-18T00:05:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=138d22b58696c506799f8de759804083ff9effae'/>
<id>urn:sha1:138d22b58696c506799f8de759804083ff9effae</id>
<content type='text'>
This allows us to print out eventpoll target file descriptor, events and
data, the /proc/pid/fdinfo/fd consists of

 | pos:	0
 | flags:	02
 | tfd:        5 events:       1d data: ffffffffffffffff enabled: 1

[avagin@: fix for unitialized ret variable]

Signed-off-by: Cyrill Gorcunov &lt;gorcunov@openvz.org&gt;
Acked-by: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Andrey Vagin &lt;avagin@openvz.org&gt;
Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: James Bottomley &lt;jbottomley@parallels.com&gt;
Cc: "Aneesh Kumar K.V" &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: Matthew Helsley &lt;matt.helsley@gmail.com&gt;
Cc: "J. Bruce Fields" &lt;bfields@fieldses.org&gt;
Cc: "Aneesh Kumar K.V" &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Cc: Tvrtko Ursulin &lt;tvrtko.ursulin@onelan.co.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>procfs: add ability to plug in auxiliary fdinfo providers</title>
<updated>2012-12-18T01:15:27Z</updated>
<author>
<name>Cyrill Gorcunov</name>
<email>gorcunov@openvz.org</email>
</author>
<published>2012-12-18T00:04:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=55985dd72ab27b47530dcc8bdddd28b69f4abe8b'/>
<id>urn:sha1:55985dd72ab27b47530dcc8bdddd28b69f4abe8b</id>
<content type='text'>
This patch brings ability to print out auxiliary data associated with
file in procfs interface /proc/pid/fdinfo/fd.

In particular further patches make eventfd, evenpoll, signalfd and
fsnotify to print additional information complete enough to restore
these objects after checkpoint.

To simplify the code we add show_fdinfo callback inside struct
file_operations (as Al and Pavel are proposing).

Signed-off-by: Cyrill Gorcunov &lt;gorcunov@openvz.org&gt;
Acked-by: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Andrey Vagin &lt;avagin@openvz.org&gt;
Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: James Bottomley &lt;jbottomley@parallels.com&gt;
Cc: "Aneesh Kumar K.V" &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: Matthew Helsley &lt;matt.helsley@gmail.com&gt;
Cc: "J. Bruce Fields" &lt;bfields@fieldses.org&gt;
Cc: "Aneesh Kumar K.V" &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Cc: Tvrtko Ursulin &lt;tvrtko.ursulin@onelan.co.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>proc: pid/status: show all supplementary groups</title>
<updated>2012-12-18T01:15:23Z</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2012-12-18T00:03:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8d238027b87e654be552eabdf492042a34c5c300'/>
<id>urn:sha1:8d238027b87e654be552eabdf492042a34c5c300</id>
<content type='text'>
We display a list of supplementary group for each process in
/proc/&lt;pid&gt;/status.  However, we show only the first 32 groups, not all of
them.

Although this is rare, but sometimes processes do have more than 32
supplementary groups, and this kernel limitation breaks user-space apps
that rely on the group list in /proc/&lt;pid&gt;/status.

Number 32 comes from the internal NGROUPS_SMALL macro which defines the
length for the internal kernel "small" groups buffer.  There is no
apparent reason to limit to this value.

This patch removes the 32 groups printing limit.

The Linux kernel limits the amount of supplementary groups by NGROUPS_MAX,
which is currently set to 65536.  And this is the maximum count of groups
we may possibly print.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Acked-by: Serge E. Hallyn &lt;serge.hallyn@ubuntu.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.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>/proc/pid/status: add "Seccomp" field</title>
<updated>2012-12-18T01:15:22Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2012-12-18T00:03:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2f4b3bf6b2318cfaa177ec5a802f4d8d6afbd816'/>
<id>urn:sha1:2f4b3bf6b2318cfaa177ec5a802f4d8d6afbd816</id>
<content type='text'>
It is currently impossible to examine the state of seccomp for a given
process.  While attaching with gdb and attempting "call
prctl(PR_GET_SECCOMP,...)" will work with some situations, it is not
reliable.  If the process is in seccomp mode 1, this query will kill the
process (prctl not allowed), if the process is in mode 2 with prctl not
allowed, it will similarly be killed, and in weird cases, if prctl is
filtered to return errno 0, it can look like seccomp is disabled.

When reviewing the state of running processes, there should be a way to
externally examine the seccomp mode.  ("Did this build of Chrome end up
using seccomp?" "Did my distro ship ssh with seccomp enabled?")

This adds the "Seccomp" line to /proc/$pid/status.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Cyrill Gorcunov &lt;gorcunov@openvz.org&gt;
Cc: Andrea Arcangeli &lt;aarcange@redhat.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Acked-by: Serge E. Hallyn &lt;serge.hallyn@ubuntu.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>
</feed>
