<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/fs/binfmt_elf_fdpic.c, branch linux-3.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-3.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-3.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2011-07-20T05:43:10Z</updated>
<entry>
<title>consolidate BINPRM_FLAGS_ENFORCE_NONDUMP handling</title>
<updated>2011-07-20T05:43:10Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2011-06-19T16:49:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1b5d783c94c328d406e801566f161adcfb018dda'/>
<id>urn:sha1:1b5d783c94c328d406e801566f161adcfb018dda</id>
<content type='text'>
new helper: would_dump(bprm, file).  Checks if we are allowed to
read the file and if we are not - sets ENFORCE_NODUMP.  Exported,
used in places that previously open-coded the same logics.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>FDPIC: Fix memory leak</title>
<updated>2011-07-06T19:15:16Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>dave@gnu.org</email>
</author>
<published>2011-07-06T11:26:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bcb65a797eb7c51e4f227dd19295f14d38738fee'/>
<id>urn:sha1:bcb65a797eb7c51e4f227dd19295f14d38738fee</id>
<content type='text'>
The shdr4extnum variable isn't being freed in the cleanup process of
elf_fdpic_core_dump().

Signed-off-by: Davidlohr Bueso &lt;dave@gnu.org&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>binfmt_elf_fdpic: Fix clear_user() error handling</title>
<updated>2010-06-01T15:11:06Z</updated>
<author>
<name>Takuya Yoshikawa</name>
<email>yoshikawa.takuya@oss.ntt.co.jp</email>
</author>
<published>2010-06-01T13:10:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e30c7c3b306312c157d67eedd6a01920518b756c'/>
<id>urn:sha1:e30c7c3b306312c157d67eedd6a01920518b756c</id>
<content type='text'>
clear_user() returns the number of bytes that could not be copied rather than
an error code.  So we should return -EFAULT rather than directly returning the
results.

Without this patch, positive values may be returned to elf_fdpic_map_file()
and the following error handlings do not function as expected.

1.
	ret = elf_fdpic_map_file_constdisp_on_uclinux(params, file, mm);
	if (ret &lt; 0)
		return ret;
2.
	ret = elf_fdpic_map_file_by_direct_mmap(params, file, mm);
	if (ret &lt; 0)
		return ret;

Signed-off-by: Takuya Yoshikawa &lt;yoshikawa.takuya@oss.ntt.co.jp&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
CC: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
CC: Andrew Morton &lt;akpm@linux-foundation.org&gt;
CC: Daisuke HATAYAMA &lt;d.hatayama@jp.fujitsu.com&gt;
CC: Paul Mundt &lt;lethal@linux-sh.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Remove redundant check for CONFIG_MMU</title>
<updated>2010-04-27T16:01:26Z</updated>
<author>
<name>Christoph Egger</name>
<email>siccegge@cs.fau.de</email>
</author>
<published>2010-04-26T14:56:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=16a5b3c4143fc7f6cbe0ef9fd4e9a58376f91506'/>
<id>urn:sha1:16a5b3c4143fc7f6cbe0ef9fd4e9a58376f91506</id>
<content type='text'>
The checks for CONFIG_MMU at this location are duplicated as all the code is
located inside a #ifndef CONFIG_MMU block. So the first conditional block will
always be included while the second never will.

Signed-off-by: Christoph Egger &lt;siccegge@stud.informatik.uni-erlangen.de&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>FDPIC: For-loop in elf_core_vma_data_size() is incorrect</title>
<updated>2010-03-24T23:43:29Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2010-03-24T17:02:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=47568d4c56677ede6e7ff7c8e4e0fd860a9c4372'/>
<id>urn:sha1:47568d4c56677ede6e7ff7c8e4e0fd860a9c4372</id>
<content type='text'>
Fix an incorrect for-loop in elf_core_vma_data_size().  The advance-pointer
statement lacks an assignment:

	  CC      fs/binfmt_elf_fdpic.o
	fs/binfmt_elf_fdpic.c: In function 'elf_core_vma_data_size':
	fs/binfmt_elf_fdpic.c:1593: warning: statement with no effect

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-next' into for-linus</title>
<updated>2010-03-08T15:55:37Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2010-03-08T15:55:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=318ae2edc3b29216abd8a2510f3f80b764f06858'/>
<id>urn:sha1:318ae2edc3b29216abd8a2510f3f80b764f06858</id>
<content type='text'>
Conflicts:
	Documentation/filesystems/proc.txt
	arch/arm/mach-u300/include/mach/debug-macro.S
	drivers/net/qlge/qlge_ethtool.c
	drivers/net/qlge/qlge_main.c
	drivers/net/typhoon.c
</content>
</entry>
<entry>
<title>coredump: pass mm-&gt;flags as a coredump parameter for consistency</title>
<updated>2010-03-06T19:26:46Z</updated>
<author>
<name>Masami Hiramatsu</name>
<email>mhiramat@redhat.com</email>
</author>
<published>2010-03-05T21:44:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=30736a4d43f4af7f1a7836d6a266be17082195c4'/>
<id>urn:sha1:30736a4d43f4af7f1a7836d6a266be17082195c4</id>
<content type='text'>
Pass mm-&gt;flags as a coredump parameter for consistency.

 ---
1787         if (mm-&gt;core_state || !get_dumpable(mm)) {  &lt;- (1)
1788                 up_write(&amp;mm-&gt;mmap_sem);
1789                 put_cred(cred);
1790                 goto fail;
1791         }
1792
[...]
1798         if (get_dumpable(mm) == 2) {    /* Setuid core dump mode */ &lt;-(2)
1799                 flag = O_EXCL;          /* Stop rewrite attacks */
1800                 cred-&gt;fsuid = 0;        /* Dump root private */
1801         }
 ---

Since dumpable bits are not protected by lock, there is a chance to change
these bits between (1) and (2).

To solve this issue, this patch copies mm-&gt;flags to
coredump_params.mm_flags at the beginning of do_coredump() and uses it
instead of get_dumpable() while dumping core.

This copy is also passed to binfmt-&gt;core_dump, since elf*_core_dump() uses
dump_filter bits in mm-&gt;flags.

[akpm@linux-foundation.org: fix merge]
Signed-off-by: Masami Hiramatsu &lt;mhiramat@redhat.com&gt;
Acked-by: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Hidehiro Kawai &lt;hidehiro.kawai.ez@hitachi.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Reviewed-by: 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>
<entry>
<title>elf coredump: add extended numbering support</title>
<updated>2010-03-06T19:26:46Z</updated>
<author>
<name>Daisuke HATAYAMA</name>
<email>d.hatayama@jp.fujitsu.com</email>
</author>
<published>2010-03-05T21:44:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8d9032bbe4671dc481261ccd4e161cd96e54b118'/>
<id>urn:sha1:8d9032bbe4671dc481261ccd4e161cd96e54b118</id>
<content type='text'>
The current ELF dumper implementation can produce broken corefiles if
program headers exceed 65535.  This number is determined by the number of
vmas which the process have.  In particular, some extreme programs may use
more than 65535 vmas.  (If you google max_map_count, you can find some
users facing this problem.) This kind of program never be able to generate
correct coredumps.

This patch implements ``extended numbering'' that uses sh_info field of
the first section header instead of e_phnum field in order to represent
upto 4294967295 vmas.

This is supported by
AMD64-ABI(http://www.x86-64.org/documentation.html) and
Solaris(http://docs.sun.com/app/docs/doc/817-1984/).
Of course, we are preparing patches for gdb and binutils.

Signed-off-by: Daisuke HATAYAMA &lt;d.hatayama@jp.fujitsu.com&gt;
Cc: "Luck, Tony" &lt;tony.luck@intel.com&gt;
Cc: Jeff Dike &lt;jdike@addtoit.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Greg Ungerer &lt;gerg@snapgear.com&gt;
Cc: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Cc: &lt;linux-arch@vger.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>elf coredump: make offset calculation process and writing process explicit</title>
<updated>2010-03-06T19:26:46Z</updated>
<author>
<name>Daisuke HATAYAMA</name>
<email>d.hatayama@jp.fujitsu.com</email>
</author>
<published>2010-03-05T21:44:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=93eb211e6c9ff6054fcf9c5b9e344d8d9ad29175'/>
<id>urn:sha1:93eb211e6c9ff6054fcf9c5b9e344d8d9ad29175</id>
<content type='text'>
By the next patch, elf_core_dump() and elf_fdpic_core_dump() will support
extended numbering and so will produce the corefiles with section header
table in a special case.

The problem is the process of writing a file header offset of the section
header table into e_shoff field of the ELF header.  ELF header is
positioned at the beginning of the corefile, while section header at the
end.  So, we need to take which of the following ways:

 1. Seek backward to retry writing operation for ELF header
    after writing process for a whole part

 2. Make offset calculation process and writing process
    totally sequential

The clause 1.  is not always possible: one cannot assume that file system
supports seek function.  Consider the no_llseek case.

Therefore, this patch adopts the clause 2.

Signed-off-by: Daisuke HATAYAMA &lt;d.hatayama@jp.fujitsu.com&gt;
Cc: "Luck, Tony" &lt;tony.luck@intel.com&gt;
Cc: Jeff Dike &lt;jdike@addtoit.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Greg Ungerer &lt;gerg@snapgear.com&gt;
Cc: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Cc: &lt;linux-arch@vger.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>elf coredump: replace ELF_CORE_EXTRA_* macros by functions</title>
<updated>2010-03-06T19:26:45Z</updated>
<author>
<name>Daisuke HATAYAMA</name>
<email>d.hatayama@jp.fujitsu.com</email>
</author>
<published>2010-03-05T21:44:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1fcccbac89f5bbc5e41aa72086960059fce372da'/>
<id>urn:sha1:1fcccbac89f5bbc5e41aa72086960059fce372da</id>
<content type='text'>
elf_core_dump() and elf_fdpic_core_dump() use #ifdef and the corresponding
macro for hiding _multiline_ logics in functions.  This patch removes
#ifdef and replaces ELF_CORE_EXTRA_* by corresponding functions.  For
architectures not implemeonting ELF_CORE_EXTRA_*, we use weak functions in
order to reduce a range of modification.

This cleanup is for my next patches, but I think this cleanup itself is
worth doing regardless of my firnal purpose.

Signed-off-by: Daisuke HATAYAMA &lt;d.hatayama@jp.fujitsu.com&gt;
Cc: "Luck, Tony" &lt;tony.luck@intel.com&gt;
Cc: Jeff Dike &lt;jdike@addtoit.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Greg Ungerer &lt;gerg@snapgear.com&gt;
Cc: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Cc: &lt;linux-arch@vger.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>
</feed>
