<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/binfmt_elf_fdpic.c, branch linux-2.6.28.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2008-10-21T03:17:18Z</updated>
<entry>
<title>binfmt_elf_fdpic: Update for cputime changes.</title>
<updated>2008-10-21T03:17:18Z</updated>
<author>
<name>Paul Mundt</name>
</author>
<published>2008-10-21T03:07:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2515ddc6db8eb49a79f0fe5e67ff09ac7c81eab4'/>
<id>urn:sha1:2515ddc6db8eb49a79f0fe5e67ff09ac7c81eab4</id>
<content type='text'>
Commit f06febc96ba8e0af80bcc3eaec0a109e88275fac ("timers: fix itimer/
many thread hang") introduced a new task_cputime interface and
subsequently only converted binfmt_elf over to it.  This results in the
build for binfmt_elf_fdpic blowing up given that p-&gt;signal-&gt;{u,s}time
have disappeared from underneath us.

Apply the same trivial fix from binfmt_elf to binfmt_elf_fdpic.

Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>binfmt_elf_fdpic: wire up AT_EXECFD, AT_EXECFN, AT_SECURE</title>
<updated>2008-10-16T18:21:46Z</updated>
<author>
<name>Paul Mundt</name>
</author>
<published>2008-10-16T05:04:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5edc2a5123a7c3d9bcb19ffcf3b91e8d6c246092'/>
<id>urn:sha1:5edc2a5123a7c3d9bcb19ffcf3b91e8d6c246092</id>
<content type='text'>
These auxvec entries are the only ones left unhandled out of the current
base implementation. This syncs up binfmt_elf_fdpic with linux/auxvec.h
and current binfmt_elf.

Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Acked-by: David Howells &lt;dhowells@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>binfmt_elf_fdpic: convert initial stack alignment to arch_align_stack()</title>
<updated>2008-10-16T18:21:46Z</updated>
<author>
<name>Paul Mundt</name>
</author>
<published>2008-10-16T05:04:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c7637941d16ae426a94058fe3b5460a31f68f61b'/>
<id>urn:sha1:c7637941d16ae426a94058fe3b5460a31f68f61b</id>
<content type='text'>
binfmt_elf_fdpic seems to have grabbed a hard-coded hack from an ancient
version of binfmt_elf in order to try and fix up initial stack alignment
on multi-threaded x86, which while in addition to being unused, was also
pushed down beyond the first set of operations on the stack pointer,
negating the entire purpose.

These days, we have an architecture independent arch_align_stack(), so we
switch to using that instead. Move the initial alignment up before the
initial stores while we're at it.

Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Signed-off-by: David Howells &lt;dhowells@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>binfmt_elf_fdpic: support auxvec base platform string</title>
<updated>2008-10-16T18:21:46Z</updated>
<author>
<name>Paul Mundt</name>
</author>
<published>2008-10-16T05:04:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec23847d6cfe445ba9a1a5ec513297f4cc0ada53'/>
<id>urn:sha1:ec23847d6cfe445ba9a1a5ec513297f4cc0ada53</id>
<content type='text'>
Commit 483fad1c3fa1060d7e6710e84a065ad514571739 ("ELF loader support for
auxvec base platform string") introduced AT_BASE_PLATFORM, but only
implemented it for binfmt_elf.

Given that AT_VECTOR_SIZE_BASE is unconditionally enlarged for us, and
it's only optionally added in for the platforms that set
ELF_BASE_PLATFORM, wire it up for binfmt_elf_fdpic, too.

Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Acked-by: David Howells &lt;dhowells@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>binfmt_elf_fdpic: Magical stack pointer index, for NEW_AUX_ENT compat.</title>
<updated>2008-07-28T09:10:28Z</updated>
<author>
<name>Paul Mundt</name>
</author>
<published>2008-05-19T04:34:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9b14ec35f03d89c88cba225add8b6eca15203964'/>
<id>urn:sha1:9b14ec35f03d89c88cba225add8b6eca15203964</id>
<content type='text'>
While implementing binfmt_elf_fdpic on SH it quickly became apparent
that SH was the first platform to support both binfmt_elf_fdpic and
binfmt_elf, as well as the only of the FDPIC platforms to make use of the
auxvt.

Currently binfmt_elf_fdpic uses a special version of NEW_AUX_ENT() where
the first argument is the entry displacement after csp has been adjusted,
being reset after each adjustment. As we have no ability to sort this out
through the platform's ARCH_DLINFO, this index needs to be managed
entirely in create_elf_fdpic_tables(). Presently none of the platforms
that set their own auxvt entries are able to do so through their
respective ARCH_DLINFOs when using binfmt_elf_fdpic.

In addition to this, binfmt_elf_fdpic has been looking at
DLINFO_ARCH_ITEMS for the number of architecture-specific entries in the
auxvt. This is legacy cruft, and is not defined by any platforms in-tree,
even those that make heavy use of the auxvt. AT_VECTOR_SIZE_ARCH is
always available, and contains the number that is of interest here, so we
switch to using that unconditionally as well.

As this has direct bearing on how much stack is used, platforms that have
configurable (or dynamically adjustable) NEW_AUX_ENT calls need to either
make AT_VECTOR_SIZE_ARCH more fine-grained, or leave it as a worst-case
and live with some lost stack space if those entries aren't pushed (some
platforms may also need to purposely sacrifice some space here for
alignment considerations, as noted in the code -- although not an issue
for any FDPIC-capable platform today).

Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>tracehook: exec</title>
<updated>2008-07-26T19:00:08Z</updated>
<author>
<name>Roland McGrath</name>
</author>
<published>2008-07-26T02:45:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6341c393fcc37d58727865f1ee2f65e632e9d4f0'/>
<id>urn:sha1:6341c393fcc37d58727865f1ee2f65e632e9d4f0</id>
<content type='text'>
This moves all the ptrace hooks related to exec into tracehook.h inlines.

This also lifts the calls for tracing out of the binfmt load_binary hooks
into search_binary_handler() after it calls into the binfmt module.  This
change has no effect, since all the binfmt modules' load_binary functions
did the call at the end on success, and now search_binary_handler() does
it immediately after return if successful.  We consolidate the repeated
code, and binfmt modules no longer need to import ptrace_notify().

Signed-off-by: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Reviewed-by: Ingo Molnar &lt;mingo@elte.hu&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>coredump: elf_fdpic_core_dump: use core_state-&gt;dumper list</title>
<updated>2008-07-25T17:53:40Z</updated>
<author>
<name>Oleg Nesterov</name>
</author>
<published>2008-07-25T08:47:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=182c515fd2a942623aed4e4e0e0b37fe96571b05'/>
<id>urn:sha1:182c515fd2a942623aed4e4e0e0b37fe96571b05</id>
<content type='text'>
Kill the nasty rcu_read_lock() + do_each_thread() loop, use the list
encoded in mm-&gt;core_state instead, s/GFP_ATOMIC/GFP_KERNEL/.

This patch allows futher cleanups in binfmt_elf_fdpic.c.

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Cc: David Howells &lt;dhowells@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>coredump: elf_core_dump: skip kernel threads</title>
<updated>2008-07-25T17:53:39Z</updated>
<author>
<name>Oleg Nesterov</name>
</author>
<published>2008-07-25T08:47:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=24d5288f06ed8b3a368eba967d587cdb012dfdf7'/>
<id>urn:sha1:24d5288f06ed8b3a368eba967d587cdb012dfdf7</id>
<content type='text'>
linux_binfmt-&gt;core_dump() runs before the process does exit_aio(), this
means that we can hit the kernel thread which shares the same -&gt;mm.
Afaics, nothing really bad can happen, but perhaps it makes sense to fix
this minor bug.

It is sad we have to iterate over all threads in system and use
GFP_ATOMIC.  Hopefully we can kill theses ugly do_each_thread()s, but this
needs some nontrivial changes in mm_struct and do_coredump.

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>nommu: fix ksize() abuse</title>
<updated>2008-06-06T18:29:13Z</updated>
<author>
<name>Pekka Enberg</name>
</author>
<published>2008-06-06T05:46:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d100d148aa48df3b6ad526a48624f906695efe60'/>
<id>urn:sha1:d100d148aa48df3b6ad526a48624f906695efe60</id>
<content type='text'>
The nommu binfmt code uses ksize() for pointers returned from do_mmap()
which is wrong.  This converts the call-sites to use the nommu specific
kobjsize() function which works as expected.

Cc: Christoph Lameter &lt;clameter@sgi.com&gt;
Cc: Matt Mackall &lt;mpm@selenic.com&gt;
Acked-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Acked-by: Greg Ungerer &lt;gerg@snapgear.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>fdpic: check that the size returned by kernel_read() is what we asked for</title>
<updated>2008-04-29T15:06:05Z</updated>
<author>
<name>David Howells</name>
</author>
<published>2008-04-29T07:59:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e1d2c8b69ad81ea103b1e87809eba51931e16874'/>
<id>urn:sha1:e1d2c8b69ad81ea103b1e87809eba51931e16874</id>
<content type='text'>
Check that the size of the read returned by kernel_read() is what we asked
for.  If it isn't, then reject the binary as being a badly formatted.

Signed-off-by: David Howells &lt;dhowells@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>
</feed>
