<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/exec.c, branch v2.6.26</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.26</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.26'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-07-10T20:25:43Z</updated>
<entry>
<title>exec: fix stack excutability without PT_GNU_STACK</title>
<updated>2008-07-10T20:25:43Z</updated>
<author>
<name>Hugh Dickins</name>
<email>hugh@veritas.com</email>
</author>
<published>2008-07-10T20:19:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=96a8e13ed44e380fc2bb6c711d74d5ba698c00b2'/>
<id>urn:sha1:96a8e13ed44e380fc2bb6c711d74d5ba698c00b2</id>
<content type='text'>
Kernel Bugzilla #11063 points out that on some architectures (e.g. x86_32)
exec'ing an ELF without a PT_GNU_STACK program header should default to an
executable stack; but this got broken by the unlimited argv feature because
stack vma is now created before the right personality has been established:
so breaking old binaries using nested function trampolines.

Therefore re-evaluate VM_STACK_FLAGS in setup_arg_pages, where stack
vm_flags used to be set, before the mprotect_fixup.  Checking through
our existing VM_flags, none would have changed since insert_vm_struct:
so this seems safer than finding a way through the personality labyrinth.

Reported-by: pageexec@freemail.hu
Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Include &lt;asm/a.out.h&gt; in fs/exec.c only for Alpha.</title>
<updated>2008-06-16T17:20:57Z</updated>
<author>
<name>David Woodhouse</name>
<email>dwmw2@infradead.org</email>
</author>
<published>2008-06-16T11:11:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=702773b16e83fcddc41e0019b8214d3c3cecedbe'/>
<id>urn:sha1:702773b16e83fcddc41e0019b8214d3c3cecedbe</id>
<content type='text'>
We only need it for the /sbin/loader hack for OSF/1 executables, and we
don't want to include it otherwise.

While we're at it, remove the redundant '&amp;&amp; CONFIG_ARCH_SUPPORTS_AOUT'
in the ifdef around that code. It's already dependent on __alpha__, and
CONFIG_ARCH_SUPPORTS_AOUT is hard-coded to 'y' there.

Signed-off-by: David Woodhouse &lt;dwmw2@infradead.org&gt;
Acked-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>posix timers: discard SI_TIMER signals on exec</title>
<updated>2008-05-26T17:37:07Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2008-05-26T16:55:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cbaffba12ce08beb3e80bfda148ee0fa14aac188'/>
<id>urn:sha1:cbaffba12ce08beb3e80bfda148ee0fa14aac188</id>
<content type='text'>
Based on Roland's patch. This approach was suggested by Austin Clements
from the very beginning, and then by Linus.

As Austin pointed out, the execing task can be killed by SI_TIMER signal
because exec flushes the signal handlers, but doesn't discard the pending
signals generated by posix timers. Perhaps not a bug, but people find this
surprising. See http://bugzilla.kernel.org/show_bug.cgi?id=10460

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Austin Clements &lt;amdragon+kernelbugzilla@mit.edu&gt;
Cc: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] get rid of leak in compat_execve()</title>
<updated>2008-05-16T21:23:05Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2008-05-10T20:38:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=08a6fac1c63233c87eec129938022f1a9a4d51f6'/>
<id>urn:sha1:08a6fac1c63233c87eec129938022f1a9a4d51f6</id>
<content type='text'>
Even though copy_compat_strings() doesn't cache the pages,
copy_strings_kernel() and stuff indirectly called by e.g.
-&gt;load_binary() is doing that, so we need to drop the
cache contents in the end.

[found by WANG Cong &lt;wangcong@zeuux.org&gt;]

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>memcg: fix possible panic when CONFIG_MM_OWNER=y</title>
<updated>2008-05-13T15:02:25Z</updated>
<author>
<name>KOSAKI Motohiro</name>
<email>kosaki.motohiro@jp.fujitsu.com</email>
</author>
<published>2008-05-12T21:02:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4cd1a8fc3d3cd740416b14ece2693dbb5d065eaf'/>
<id>urn:sha1:4cd1a8fc3d3cd740416b14ece2693dbb5d065eaf</id>
<content type='text'>
When mm destruction happens, we should pass mm_update_next_owner() the old mm.
 But unfortunately new mm is passed in exec_mmap().

Thus, kernel panic is possible when a multi-threaded process uses exec().

Also, the owner member comment description is wrong.  mm-&gt;owner does not
necessarily point to the thread group leader.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Acked-by: Balbir Singh &lt;balbir@linux.vnet.ibm.com&gt;
Cc: "Paul Menage" &lt;menage@google.com&gt;
Cc: "KAMEZAWA Hiroyuki" &lt;kamezawa.hiroyu@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>
<entry>
<title>[PATCH] split linux/file.h</title>
<updated>2008-05-01T17:08:16Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2008-04-24T11:44:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9f3acc3140444a900ab280de942291959f0f615d'/>
<id>urn:sha1:9f3acc3140444a900ab280de942291959f0f615d</id>
<content type='text'>
Initial splitoff of the low-level stuff; taken to fdtable.h

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>document de_thread() with exit_notify() connection</title>
<updated>2008-04-30T15:29:38Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2008-04-30T07:53:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2800d8d19e51414403df8144eaa214bb03400b87'/>
<id>urn:sha1:2800d8d19e51414403df8144eaa214bb03400b87</id>
<content type='text'>
Add a couple of small comments, it is not easy to see what this code does.

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Roland McGrath &lt;roland@redhat.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>signals: de_thread: simplify the -&gt;child_reaper switching</title>
<updated>2008-04-30T15:29:37Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2008-04-30T07:53:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7a5e873f096e04e6d8719e4ecb7b70d2decca503'/>
<id>urn:sha1:7a5e873f096e04e6d8719e4ecb7b70d2decca503</id>
<content type='text'>
Now that we rely on SIGNAL_UNKILLABLE flag, de_thread() doesn't need the nasty
hack to kill the old -&gt;child_reaper during the mt-exec.

This also means we can avoid taking tasklist_lock around zap_other_threads().

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Roland McGrath &lt;roland@redhat.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 task exe symlink</title>
<updated>2008-04-29T15:06:17Z</updated>
<author>
<name>Matt Helsley</name>
<email>matthltc@us.ibm.com</email>
</author>
<published>2008-04-29T08:01:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=925d1c401fa6cfd0df5d2e37da8981494ccdec07'/>
<id>urn:sha1:925d1c401fa6cfd0df5d2e37da8981494ccdec07</id>
<content type='text'>
The kernel implements readlink of /proc/pid/exe by getting the file from
the first executable VMA.  Then the path to the file is reconstructed and
reported as the result.

Because of the VMA walk the code is slightly different on nommu systems.
This patch avoids separate /proc/pid/exe code on nommu systems.  Instead of
walking the VMAs to find the first executable file-backed VMA we store a
reference to the exec'd file in the mm_struct.

That reference would prevent the filesystem holding the executable file
from being unmounted even after unmapping the VMAs.  So we track the number
of VM_EXECUTABLE VMAs and drop the new reference when the last one is
unmapped.  This avoids pinning the mounted filesystem.

[akpm@linux-foundation.org: improve comments]
[yamamoto@valinux.co.jp: fix dup_mmap]
Signed-off-by: Matt Helsley &lt;matthltc@us.ibm.com&gt;
Cc: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc:"Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Hugh Dickins &lt;hugh@veritas.com&gt;
Signed-off-by: YAMAMOTO Takashi &lt;yamamoto@valinux.co.jp&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>cgroups: add an owner to the mm_struct</title>
<updated>2008-04-29T15:06:10Z</updated>
<author>
<name>Balbir Singh</name>
<email>balbir@linux.vnet.ibm.com</email>
</author>
<published>2008-04-29T08:00:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cf475ad28ac35cc9ba612d67158f29b73b38b05d'/>
<id>urn:sha1:cf475ad28ac35cc9ba612d67158f29b73b38b05d</id>
<content type='text'>
Remove the mem_cgroup member from mm_struct and instead adds an owner.

This approach was suggested by Paul Menage.  The advantage of this approach
is that, once the mm-&gt;owner is known, using the subsystem id, the cgroup
can be determined.  It also allows several control groups that are
virtually grouped by mm_struct, to exist independent of the memory
controller i.e., without adding mem_cgroup's for each controller, to
mm_struct.

A new config option CONFIG_MM_OWNER is added and the memory resource
controller selects this config option.

This patch also adds cgroup callbacks to notify subsystems when mm-&gt;owner
changes.  The mm_cgroup_changed callback is called with the task_lock() of
the new task held and is called just prior to changing the mm-&gt;owner.

I am indebted to Paul Menage for the several reviews of this patchset and
helping me make it lighter and simpler.

This patch was tested on a powerpc box, it was compiled with both the
MM_OWNER config turned on and off.

After the thread group leader exits, it's moved to init_css_state by
cgroup_exit(), thus all future charges from runnings threads would be
redirected to the init_css_set's subsystem.

Signed-off-by: Balbir Singh &lt;balbir@linux.vnet.ibm.com&gt;
Cc: Pavel Emelianov &lt;xemul@openvz.org&gt;
Cc: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: Sudhir Kumar &lt;skumar@linux.vnet.ibm.com&gt;
Cc: YAMAMOTO Takashi &lt;yamamoto@valinux.co.jp&gt;
Cc: Hirokazu Takahashi &lt;taka@valinux.co.jp&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;,
Cc: Balbir Singh &lt;balbir@linux.vnet.ibm.com&gt;
Acked-by: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Acked-by: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Reviewed-by: Paul Menage &lt;menage@google.com&gt;
Cc: Oleg Nesterov &lt;oleg@tv-sign.ru&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>
