<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/proc, branch v3.1</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/proc?h=v3.1</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/proc?h=v3.1'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-09-21T20:15:44Z</updated>
<entry>
<title>teach /proc/$pid/numa_maps about transparent hugepages</title>
<updated>2011-09-21T20:15:44Z</updated>
<author>
<name>Dave Hansen</name>
<email>dave@linux.vnet.ibm.com</email>
</author>
<published>2011-09-20T22:19:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=32ef43848f283e0ef945d3c67e851c143fea3970'/>
<id>urn:sha1:32ef43848f283e0ef945d3c67e851c143fea3970</id>
<content type='text'>
This is modeled after the smaps code.

It detects transparent hugepages and then does a single gather_stats()
for the page as a whole.  This has two benifits:
 1. It is more efficient since it does many pages in a single shot.
 2. It does not have to break down the huge page.

Signed-off-by: Dave Hansen &lt;dave@linux.vnet.ibm.com&gt;
Acked-by: Hugh Dickins &lt;hughd@google.com&gt;
Acked-by: David Rientjes &lt;rientjes@google.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>break out numa_maps gather_pte_stats() checks</title>
<updated>2011-09-21T20:15:44Z</updated>
<author>
<name>Dave Hansen</name>
<email>dave@linux.vnet.ibm.com</email>
</author>
<published>2011-09-20T22:19:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3200a8aaab0c9ccdc0f59b0dac2d4a47029137fa'/>
<id>urn:sha1:3200a8aaab0c9ccdc0f59b0dac2d4a47029137fa</id>
<content type='text'>
gather_pte_stats() does a number of checks on a target page
to see whether it should even be considered for statistics.
This breaks that code out in to a separate function so that
we can use it in the transparent hugepage case in the next
patch.

Signed-off-by: Dave Hansen &lt;dave@linux.vnet.ibm.com&gt;
Acked-by: Hugh Dickins &lt;hughd@google.com&gt;
Reviewed-by: Christoph Lameter &lt;cl@gentwo.org&gt;
Acked-by: David Rientjes &lt;rientjes@google.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>make /proc/$pid/numa_maps gather_stats() take variable page size</title>
<updated>2011-09-21T20:15:44Z</updated>
<author>
<name>Dave Hansen</name>
<email>dave@linux.vnet.ibm.com</email>
</author>
<published>2011-09-20T22:19:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eb4866d0066ffd5446751c102d64feb3318d8bd1'/>
<id>urn:sha1:eb4866d0066ffd5446751c102d64feb3318d8bd1</id>
<content type='text'>
We need to teach the numa_maps code about transparent huge pages.  The
first step is to teach gather_stats() that the pte it is dealing with
might represent more than one page.

Note that will we use this in a moment for transparent huge pages since
they have use a single pmd_t which _acts_ as a "surrogate" for a bunch
of smaller pte_t's.

I'm a _bit_ unhappy that this interface counts in hugetlbfs page sizes
for hugetlbfs pages and PAGE_SIZE for normal pages.  That means that to
figure out how many _bytes_ "dirty=1" means, you must first know the
hugetlbfs page size.  That's easier said than done especially if you
don't have visibility in to the mount.

But, that's probably a discussion for another day especially since it
would change behavior to fix it.  But, just in case anyone wonders why
this patch only passes a '1' in the hugetlb case...

Signed-off-by: Dave Hansen &lt;dave@linux.vnet.ibm.com&gt;
Acked-by: Hugh Dickins &lt;hughd@google.com&gt;
Acked-by: David Rientjes &lt;rientjes@google.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>vfs: show O_CLOEXE bit properly in /proc/&lt;pid&gt;/fdinfo/&lt;fd&gt; files</title>
<updated>2011-08-06T18:51:33Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-08-06T18:51:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1117f72ea0217ba0cc19f05adbbd8b9a397f5ab7'/>
<id>urn:sha1:1117f72ea0217ba0cc19f05adbbd8b9a397f5ab7</id>
<content type='text'>
The CLOEXE bit is magical, and for performance (and semantic) reasons we
don't actually maintain it in the file descriptor itself, but in a
separate bit array.  Which means that when we show f_flags, the CLOEXE
status is shown incorrectly: we show the status not as it is now, but as
it was when the file was opened.

Fix that by looking up the bit properly in the 'fdt-&gt;close_on_exec' bit
array.

Uli needs this in order to re-implement the pfiles program:

  "For normal file descriptors (not sockets) this was the last piece of
   information which wasn't available.  This is all part of my 'give
   Solaris users no reason to not switch' effort.  I intend to offer the
   code to the util-linux-ng maintainers."

Requested-by: Ulrich Drepper &lt;drepper@akkadia.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>oom_ajd: don't use WARN_ONCE, just use printk_once</title>
<updated>2011-08-06T18:43:08Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-08-06T18:43:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c21427043dec93d40e3a1af970831d1f5f15ce5d'/>
<id>urn:sha1:c21427043dec93d40e3a1af970831d1f5f15ce5d</id>
<content type='text'>
WARN_ONCE() is very annoying, in that it shows the stack trace that we
don't care about at all, and also triggers various user-level "kernel
oopsed" logic that we really don't care about.  And it's not like the
user can do anything about the applications (sshd) in question, it's a
distro issue.

Requested-by: Andi Kleen &lt;andi@firstfloor.org&gt; (and many others)
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>proc: make struct proc_dir_entry::name a terminal array rather than a pointer</title>
<updated>2011-07-27T19:50:45Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2011-07-27T18:47:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=09570f914914d2beb0db29c5a9c7344934f2fa8c'/>
<id>urn:sha1:09570f914914d2beb0db29c5a9c7344934f2fa8c</id>
<content type='text'>
Since __proc_create() appends the name it is given to the end of the PDE
structure that it allocates, there isn't a need to store a name pointer.
Instead we can just replace the name pointer with a terminal char array of
_unspecified_ length.  The compiler will simply append the string to statically
defined variables of PDE type overlapping any hole at the end of the structure
and, unlike specifying an explicitly _zero_ length array, won't give a warning
if you try to statically initialise it with a string of more than zero length.

Also, whilst we're at it:

 (1) Move namelen to end just prior to name and reduce it to a single byte
     (name shouldn't be longer than NAME_MAX).

 (2) Move pde_unload_lock two places further on so that if it's four bytes in
     size on a 64-bit machine, it won't cause an unused hole in the PDE struct.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>atomic: use &lt;linux/atomic.h&gt;</title>
<updated>2011-07-26T23:49:47Z</updated>
<author>
<name>Arun Sharma</name>
<email>asharma@fb.com</email>
</author>
<published>2011-07-26T23:09:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=60063497a95e716c9a689af3be2687d261f115b4'/>
<id>urn:sha1:60063497a95e716c9a689af3be2687d261f115b4</id>
<content type='text'>
This allows us to move duplicated code in &lt;asm/atomic.h&gt;
(atomic_inc_not_zero() for now) to &lt;linux/atomic.h&gt;

Signed-off-by: Arun Sharma &lt;asharma@fb.com&gt;
Reviewed-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.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: fix a race in do_io_accounting()</title>
<updated>2011-07-26T23:49:43Z</updated>
<author>
<name>Vasiliy Kulikov</name>
<email>segoon@openwall.com</email>
</author>
<published>2011-07-26T23:08:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=293eb1e7772b25a93647c798c7b89bf26c2da2e0'/>
<id>urn:sha1:293eb1e7772b25a93647c798c7b89bf26c2da2e0</id>
<content type='text'>
If an inode's mode permits opening /proc/PID/io and the resulting file
descriptor is kept across execve() of a setuid or similar binary, the
ptrace_may_access() check tries to prevent using this fd against the
task with escalated privileges.

Unfortunately, there is a race in the check against execve().  If
execve() is processed after the ptrace check, but before the actual io
information gathering, io statistics will be gathered from the
privileged process.  At least in theory this might lead to gathering
sensible information (like ssh/ftp password length) that wouldn't be
available otherwise.

Holding task-&gt;signal-&gt;cred_guard_mutex while gathering the io
information should protect against the race.

The order of locking is similar to the one inside of ptrace_attach():
first goes cred_guard_mutex, then lock_task_sighand().

Signed-off-by: Vasiliy Kulikov &lt;segoon@openwall.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: &lt;stable@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>procfs: return ENOENT on opening a being-removed proc entry</title>
<updated>2011-07-26T23:49:43Z</updated>
<author>
<name>Daisuke Ogino</name>
<email>ogino.daisuke@jp.fujitsu.com</email>
</author>
<published>2011-07-26T23:08:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d2857e79a2ba7c155eaa1a7d3581c8d26b31e54e'/>
<id>urn:sha1:d2857e79a2ba7c155eaa1a7d3581c8d26b31e54e</id>
<content type='text'>
Change the return value to ENOENT.  This return value is then returned
when opening the proc entry that have been removed.  For example,
open("/proc/bus/pci/XX/YY") when the corresponding device is being
hot-removed.

Signed-off-by: Daisuke Ogino &lt;ogino.daisuke@jp.fujitsu.com&gt;
Cc: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Acked-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&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>oom: make deprecated use of oom_adj more verbose</title>
<updated>2011-07-26T03:57:09Z</updated>
<author>
<name>David Rientjes</name>
<email>rientjes@google.com</email>
</author>
<published>2011-07-26T00:12:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=be8f684d73d8d916847e996bf69cef14352872c6'/>
<id>urn:sha1:be8f684d73d8d916847e996bf69cef14352872c6</id>
<content type='text'>
/proc/pid/oom_adj is deprecated and scheduled for removal in August 2012
according to Documentation/feature-removal-schedule.txt.

This patch makes the warning more verbose by making it appear as a more
serious problem (the presence of a stack trace and being multiline should
attract more attention) so that applications still using the old interface
can get fixed.

Very popular users of the old interface have been converted since the oom
killer rewrite has been introduced.  udevd switched to the
/proc/pid/oom_score_adj interface for v162, kde switched in 4.6.1, and
opensshd switched in 5.7p1.

At the start of 2012, this should be changed into a WARN() to emit all
such incidents and then finally remove the tunable in August 2012 as
scheduled.

Signed-off-by: David Rientjes &lt;rientjes@google.com&gt;
Cc: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Cc: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.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>
