<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/proc, branch v3.6-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/proc?h=v3.6-rc2</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/proc?h=v3.6-rc2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-07-31T00:25:20Z</updated>
<entry>
<title>proc: do not allow negative offsets on /proc/&lt;pid&gt;/environ</title>
<updated>2012-07-31T00:25:20Z</updated>
<author>
<name>Djalal Harouni</name>
<email>tixxdz@opendz.org</email>
</author>
<published>2012-07-30T21:42:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bc452b4b65bd589083a7a7ba4f14f85dfc8454fa'/>
<id>urn:sha1:bc452b4b65bd589083a7a7ba4f14f85dfc8454fa</id>
<content type='text'>
__mem_open() which is called by both /proc/&lt;pid&gt;/environ and
/proc/&lt;pid&gt;/mem -&gt;open() handlers will allow the use of negative offsets.
/proc/&lt;pid&gt;/mem has negative offsets but not /proc/&lt;pid&gt;/environ.

Clean this by moving the 'force FMODE_UNSIGNED_OFFSET flag' to mem_open()
to allow negative offsets only on /proc/&lt;pid&gt;/mem.

Signed-off-by: Djalal Harouni &lt;tixxdz@opendz.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Brad Spengler &lt;spender@grsecurity.net&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: David Rientjes &lt;rientjes@google.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: environ_read() make sure offset points to environment address range</title>
<updated>2012-07-31T00:25:20Z</updated>
<author>
<name>Djalal Harouni</name>
<email>tixxdz@opendz.org</email>
</author>
<published>2012-07-30T21:42:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e8905ec27e2f4ea1b9f7e03df68a060b3ae6fca8'/>
<id>urn:sha1:e8905ec27e2f4ea1b9f7e03df68a060b3ae6fca8</id>
<content type='text'>
Currently the following offset and environment address range check in
environ_read() of /proc/&lt;pid&gt;/environ is buggy:

  int this_len = mm-&gt;env_end - (mm-&gt;env_start + src);
  if (this_len &lt;= 0)
    break;

Large or negative offsets on /proc/&lt;pid&gt;/environ converted to 'unsigned
long' may pass this check since '(mm-&gt;env_start + src)' can overflow and
'this_len' will be positive.

This can turn /proc/&lt;pid&gt;/environ to act like /proc/&lt;pid&gt;/mem since
(mm-&gt;env_start + src) will point and read from another VMA.

There are two fixes here plus some code cleaning:

1) Fix the overflow by checking if the offset that was converted to
   unsigned long will always point to the [mm-&gt;env_start, mm-&gt;env_end]
   address range.

2) Remove the truncation that was made to the result of the check,
   storing the result in 'int this_len' will alter its value and we can
   not depend on it.

For kernels that have commit b409e578d ("proc: clean up
/proc/&lt;pid&gt;/environ handling") which adds the appropriate ptrace check and
saves the 'mm' at -&gt;open() time, this is not a security issue.

This patch is taken from the grsecurity patch since it was just made
available.

Signed-off-by: Djalal Harouni &lt;tixxdz@opendz.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Brad Spengler &lt;spender@grsecurity.net&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: David Rientjes &lt;rientjes@google.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>Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc</title>
<updated>2012-07-24T01:54:23Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-07-24T01:54:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=83c7f72259ea4bd0561e2f2762d97ee2888126ce'/>
<id>urn:sha1:83c7f72259ea4bd0561e2f2762d97ee2888126ce</id>
<content type='text'>
Pull powerpc updates from Benjamin Herrenschmidt:
 "Notable highlights:

   - iommu improvements from Anton removing the per-iommu global lock in
     favor of dividing the DMA space into pools, each with its own lock,
     and hashed on the CPU number.  Along with making the locking more
     fine grained, this gives significant improvements in multiqueue
     networking scalability.

   - Still from Anton, we know provide a vdso based variant of getcpu
     which makes sched_getcpu with the appropriate glibc patch something
     like 18 times faster.

   - More anton goodness (he's been busy !) in other areas such as a
     faster __clear_user and copy_page on P7, various perf fixes to
     improve sampling quality, etc...

   - One more step toward removing legacy i2c interfaces by using new
     device-tree based probing of platform devices for the AOA audio
     drivers

   - A nice series of patches from Michael Neuling that helps avoiding
     confusion between register numbers and litterals in assembly code,
     trying to enforce the use of "%rN" register names in gas rather
     than plain numbers.

   - A pile of FSL updates

   - The usual bunch of small fixes, cleanups etc...

  You may spot a change to drivers/char/mem.  The patch got no comment
  or ack from outside, it's a trivial patch to allow the architecture to
  skip creating /dev/port, which we use to disable it on ppc64 that
  don't have a legacy brige.  On those, IO ports 0...64K are not mapped
  in kernel space at all, so accesses to /dev/port cause oopses (and
  yes, distros -still- ship userspace that bangs hard coded ports such
  as kbdrate)."

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (106 commits)
  powerpc/mpic: Create a revmap with enough entries for IPIs and timers
  Remove stale .rej file
  powerpc/iommu: Fix iommu pool initialization
  powerpc/eeh: Check handle_eeh_events() return value
  powerpc/85xx: Add phy nodes in SGMII mode for MPC8536/44/72DS &amp; P2020DS
  powerpc/e500: add paravirt QEMU platform
  powerpc/mpc85xx_ds: convert to unified PCI init
  powerpc/fsl-pci: get PCI init out of board files
  powerpc/85xx: Update corenet64_smp_defconfig
  powerpc/85xx: Update corenet32_smp_defconfig
  powerpc/85xx: Rename P1021RDB-PC device trees to be consistent
  powerpc/watchdog: move booke watchdog param related code to setup-common.c
  sound/aoa: Adapt to new i2c probing scheme
  i2c/powermac: Improve detection of devices from device-tree
  powerpc: Disable /dev/port interface on systems without an ISA bridge
  of: Improve prom_update_property() function
  powerpc: Add "memory" attribute for mfmsr()
  powerpc/ftrace: Fix assembly trampoline register usage
  powerpc/hw_breakpoints: Fix incorrect pointer access
  powerpc: Put the gpr save/restore functions in their own section
  ...
</content>
</entry>
<entry>
<title>VFS: Pass mount flags to sget()</title>
<updated>2012-07-14T12:38:34Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-06-25T11:55:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9249e17fe094d853d1ef7475dd559a2cc7e23d42'/>
<id>urn:sha1:9249e17fe094d853d1ef7475dd559a2cc7e23d42</id>
<content type='text'>
Pass mount flags to sget() so that it can use them in initialising a new
superblock before the set function is called.  They could also be passed to the
compare function.

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>fs: add nd_jump_link</title>
<updated>2012-07-14T12:35:40Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2012-06-18T14:47:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b5fb63c18315c5510c1d0636179c057e0c761c77'/>
<id>urn:sha1:b5fb63c18315c5510c1d0636179c057e0c761c77</id>
<content type='text'>
Add a helper that abstracts out the jump to an already parsed struct path
from -&gt;follow_link operation from procfs.  Not only does this clean up
the code by moving the two sides of this game into a single helper, but
it also prepares for making struct nameidata private to namei.c

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs: move path_put on failure out of -&gt;follow_link</title>
<updated>2012-07-14T12:35:35Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2012-06-18T14:47:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=408ef013cc9e2f94a14f7ccbbe52ddfb18437a99'/>
<id>urn:sha1:408ef013cc9e2f94a14f7ccbbe52ddfb18437a99</id>
<content type='text'>
Currently the non-nd_set_link based versions of -&gt;follow_link are expected
to do a path_put(&amp;nd-&gt;path) on failure.  This calling convention is unexpected,
undocumented and doesn't match what the nd_set_link-based instances do.

Move the path_put out of the only non-nd_set_link based -&gt;follow_link
instance into the caller.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>stop passing nameidata to -&gt;lookup()</title>
<updated>2012-07-14T12:34:32Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2012-06-10T21:13:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=00cd8dd3bf95f2cc8435b4cac01d9995635c6d0b'/>
<id>urn:sha1:00cd8dd3bf95f2cc8435b4cac01d9995635c6d0b</id>
<content type='text'>
Just the flags; only NFS cares even about that, but there are
legitimate uses for such argument.  And getting rid of that
completely would require splitting -&gt;lookup() into a couple
of methods (at least), so let's leave that alone for now...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>stop passing nameidata * to -&gt;d_revalidate()</title>
<updated>2012-07-14T12:34:14Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2012-06-10T20:03:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0b728e1911cbe6e24020727c3870628b9653f32a'/>
<id>urn:sha1:0b728e1911cbe6e24020727c3870628b9653f32a</id>
<content type='text'>
Just the lookup flags.  Die, bastard, die...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>of: Improve prom_update_property() function</title>
<updated>2012-07-11T05:26:51Z</updated>
<author>
<name>Dong Aisheng</name>
<email>dong.aisheng@linaro.org</email>
</author>
<published>2012-07-11T05:16:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=475d0094293b51353e342d1198377967dbc48169'/>
<id>urn:sha1:475d0094293b51353e342d1198377967dbc48169</id>
<content type='text'>
prom_update_property() currently fails if the property doesn't
actually exist yet which isn't what we want. Change to add-or-update
instead of update-only, then we can remove a lot duplicated lines.

Suggested-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Dong Aisheng &lt;dong.aisheng@linaro.org&gt;
Acked-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>vfs: Fix /proc/&lt;tid&gt;/fdinfo/&lt;fd&gt; file handling</title>
<updated>2012-06-04T18:00:45Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-06-04T18:00:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0640113be25d283e0ff77a9f041e1242182387f0'/>
<id>urn:sha1:0640113be25d283e0ff77a9f041e1242182387f0</id>
<content type='text'>
Cyrill Gorcunov reports that I broke the fdinfo files with commit
30a08bf2d31d ("proc: move fd symlink i_mode calculations into
tid_fd_revalidate()"), and he's quite right.

The tid_fd_revalidate() function is not just used for the &lt;tid&gt;/fd
symlinks, it's also used for the &lt;tid&gt;/fdinfo/&lt;fd&gt; files, and the
permission model for those are different.

So do the dynamic symlink permission handling just for symlinks, making
the fdinfo files once more appear as the proper regular files they are.

Of course, Al Viro argued (probably correctly) that we shouldn't do the
symlink permission games at all, and make the symlinks always just be
the normal 'lrwxrwxrwx'.  That would have avoided this issue too, but
since somebody noticed that the permissions had changed (which was the
reason for that original commit 30a08bf2d31d in the first place), people
do apparently use this feature.

[ Basically, you can use the symlink permission data as a cheap "fdinfo"
  replacement, since you see whether the file is open for reading and/or
  writing by just looking at st_mode of the symlink.  So the feature
  does make sense, even if the pain it has caused means we probably
  shouldn't have done it to begin with. ]

Reported-and-tested-by: Cyrill Gorcunov &lt;gorcunov@openvz.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
