<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/proc, branch v2.6.39</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/proc?h=v2.6.39</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/proc?h=v2.6.39'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-05-09T23:22:07Z</updated>
<entry>
<title>Don't lock guardpage if the stack is growing up</title>
<updated>2011-05-09T23:22:07Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mikulas@artax.karlin.mff.cuni.cz</email>
</author>
<published>2011-05-09T11:01:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a09a79f66874c905af35d5bb5e5f2fdc7b6b894d'/>
<id>urn:sha1:a09a79f66874c905af35d5bb5e5f2fdc7b6b894d</id>
<content type='text'>
Linux kernel excludes guard page when performing mlock on a VMA with
down-growing stack. However, some architectures have up-growing stack
and locking the guard page should be excluded in this case too.

This patch fixes lvm2 on PA-RISC (and possibly other architectures with
up-growing stack). lvm2 calculates number of used pages when locking and
when unlocking and reports an internal error if the numbers mismatch.

[ Patch changed fairly extensively to also fix /proc/&lt;pid&gt;/maps for the
  grows-up case, and to move things around a bit to clean it all up and
  share the infrstructure with the /proc bits.

  Tested on ia64 that has both grow-up and grow-down segments  - Linus ]

Signed-off-by: Mikulas Patocka &lt;mikulas@artax.karlin.mff.cuni.cz&gt;
Tested-by: Tony Luck &lt;tony.luck@gmail.com&gt;
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>proc: do proper range check on readdir offset</title>
<updated>2011-04-18T17:36:54Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-04-18T17:36:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d8bdc59f215e62098bc5b4256fd9928bf27053a1'/>
<id>urn:sha1:d8bdc59f215e62098bc5b4256fd9928bf27053a1</id>
<content type='text'>
Rather than pass in some random truncated offset to the pid-related
functions, check that the offset is in range up-front.

This is just cleanup, the previous commit fixed the real problem.

Cc: stable@kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Fix common misspellings</title>
<updated>2011-03-31T14:26:23Z</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@profusion.mobi</email>
</author>
<published>2011-03-31T01:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=25985edcedea6396277003854657b5f3cb31a628'/>
<id>urn:sha1:25985edcedea6396277003854657b5f3cb31a628</id>
<content type='text'>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</content>
</entry>
<entry>
<title>proc: fix oops on invalid /proc/&lt;pid&gt;/maps access</title>
<updated>2011-03-28T02:09:29Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-03-28T02:09:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=76597cd31470fa130784c78fadb4dab2e624a723'/>
<id>urn:sha1:76597cd31470fa130784c78fadb4dab2e624a723</id>
<content type='text'>
When m_start returns an error, the seq_file logic will still call m_stop
with that error entry, so we'd better make sure that we check it before
using it as a vma.

Introduced by commit ec6fd8a4355c ("report errors in /proc/*/*map*
sanely"), which replaced NULL with various ERR_PTR() cases.

(On ia64, you happen to get a unaligned fault instead of a page fault,
since the address used is generally some random error code like -EPERM)

Reported-by: Anca Emanuel &lt;anca.emanuel@gmail.com&gt;
Reported-by: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Américo Wang &lt;xiyou.wangcong@gmail.com&gt;
Cc: Stephen Wilson &lt;wilsons@start.ca&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6</title>
<updated>2011-03-24T03:51:42Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-03-24T03:51:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b81a618dcd3ea99de292dbe624f41ca68f464376'/>
<id>urn:sha1:b81a618dcd3ea99de292dbe624f41ca68f464376</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  deal with races in /proc/*/{syscall,stack,personality}
  proc: enable writing to /proc/pid/mem
  proc: make check_mem_permission() return an mm_struct on success
  proc: hold cred_guard_mutex in check_mem_permission()
  proc: disable mem_write after exec
  mm: implement access_remote_vm
  mm: factor out main logic of access_process_vm
  mm: use mm_struct to resolve gate vma's in __get_user_pages
  mm: arch: rename in_gate_area_no_task to in_gate_area_no_mm
  mm: arch: make in_gate_area take an mm_struct instead of a task_struct
  mm: arch: make get_gate_vma take an mm_struct instead of a task_struct
  x86: mark associated mm when running a task in 32 bit compatibility mode
  x86: add context tag to mark mm when running a task in 32-bit compatibility mode
  auxv: require the target to be tracable (or yourself)
  close race in /proc/*/environ
  report errors in /proc/*/*map* sanely
  pagemap: close races with suid execve
  make sessionid permissions in /proc/*/task/* match those in /proc/*
  fix leaks in path_lookupat()

Fix up trivial conflicts in fs/proc/base.c
</content>
</entry>
<entry>
<title>procfs: kill the global proc_mnt variable</title>
<updated>2011-03-24T02:46:58Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2011-03-23T23:43:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=52e9fc76d0d4b1e8adeee736172c6c23180059b2'/>
<id>urn:sha1:52e9fc76d0d4b1e8adeee736172c6c23180059b2</id>
<content type='text'>
After the previous cleanup in proc_get_sb() the global proc_mnt has no
reasons to exists, kill it.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@free.fr&gt;
Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Acked-by: Serge E. Hallyn &lt;serge@hallyn.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>pidns: call pid_ns_prepare_proc() from create_pid_namespace()</title>
<updated>2011-03-24T02:46:58Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2011-03-23T23:43:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4308eebbeb2026827d4492ce8c23d99f7f144a82'/>
<id>urn:sha1:4308eebbeb2026827d4492ce8c23d99f7f144a82</id>
<content type='text'>
Reorganize proc_get_sb() so it can be called before the struct pid of the
first process is allocated.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@free.fr&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Acked-by: Serge E. Hallyn &lt;serge@hallyn.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>proc: protect mm start_code/end_code in /proc/pid/stat</title>
<updated>2011-03-24T02:46:37Z</updated>
<author>
<name>Kees Cook</name>
<email>kees.cook@canonical.com</email>
</author>
<published>2011-03-23T23:42:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5883f57ca0008ffc93e09cbb9847a1928e50c6f3'/>
<id>urn:sha1:5883f57ca0008ffc93e09cbb9847a1928e50c6f3</id>
<content type='text'>
While mm-&gt;start_stack was protected from cross-uid viewing (commit
f83ce3e6b02d5 ("proc: avoid information leaks to non-privileged
processes")), the start_code and end_code values were not.  This would
allow the text location of a PIE binary to leak, defeating ASLR.

Note that the value "1" is used instead of "0" for a protected value since
"ps", "killall", and likely other readers of /proc/pid/stat, take
start_code of "0" to mean a kernel thread and will misbehave.  Thanks to
Brad Spengler for pointing this out.

Addresses CVE-2011-0726

Signed-off-by: Kees Cook &lt;kees.cook@canonical.com&gt;
Cc: &lt;stable@kernel.org&gt;
Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Eugene Teo &lt;eugeneteo@kernel.sg&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Brad Spengler &lt;spender@grsecurity.net&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: make struct proc_dir_entry::namelen unsigned int</title>
<updated>2011-03-24T02:46:37Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2011-03-23T23:42:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=312ec7e50c4d3f40b3762af651d1aa79a67f556a'/>
<id>urn:sha1:312ec7e50c4d3f40b3762af651d1aa79a67f556a</id>
<content type='text'>
1. namelen is declared "unsigned short" which hints for "maybe space savings".
   Indeed in 2.4 struct proc_dir_entry looked like:

        struct proc_dir_entry {
                unsigned short low_ino;
                unsigned short namelen;

   Now, low_ino is "unsigned int", all savings were gone for a long time.
   "struct proc_dir_entry" is not that countless to worry about it's size,
   anyway.

2. converting from unsigned short to int/unsigned int can only create
   problems, we better play it safe.

Space is not really conserved, because of natural alignment for the next
field.  sizeof(struct proc_dir_entry) remains the same.

Signed-off-by: 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: fix some wrong error code usage</title>
<updated>2011-03-24T02:46:36Z</updated>
<author>
<name>Jovi Zhang</name>
<email>bookjovi@gmail.com</email>
</author>
<published>2011-03-23T23:42:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fc3d8767b2b6de955579852d7a150f1734265eaf'/>
<id>urn:sha1:fc3d8767b2b6de955579852d7a150f1734265eaf</id>
<content type='text'>
[root@wei 1]# cat /proc/1/mem
cat: /proc/1/mem: No such process

error code -ESRCH is wrong in this situation.  Return -EPERM instead.

Signed-off-by: Jovi Zhang &lt;bookjovi@gmail.com&gt;
Reviewed-by: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&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>
</feed>
