<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/coredump.c, branch linux-3.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-07-23T22:10:54Z</updated>
<entry>
<title>coredump: fix the setting of PF_DUMPCORE</title>
<updated>2014-07-23T22:10:54Z</updated>
<author>
<name>Silesh C V</name>
</author>
<published>2014-07-23T20:59:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aed8adb7688d5744cb484226820163af31d2499a'/>
<id>urn:sha1:aed8adb7688d5744cb484226820163af31d2499a</id>
<content type='text'>
Commit 079148b919d0 ("coredump: factor out the setting of PF_DUMPCORE")
cleaned up the setting of PF_DUMPCORE by removing it from all the
linux_binfmt-&gt;core_dump() and moving it to zap_threads().But this ended
up clearing all the previously set flags.  This causes issues during
core generation when tsk-&gt;flags is checked again (eg.  for PF_USED_MATH
to dump floating point registers).  Fix this.

Signed-off-by: Silesh C V &lt;svellattu@mvista.com&gt;
Acked-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Mandeep Singh Baines &lt;msb@chromium.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;	[3.10+]
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: fix va_list corruption</title>
<updated>2014-04-19T20:23:31Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2014-04-19T17:15:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=404ca80eb5c2727d78cd517d12108b040c522e12'/>
<id>urn:sha1:404ca80eb5c2727d78cd517d12108b040c522e12</id>
<content type='text'>
A va_list needs to be copied in case it needs to be used twice.

Thanks to Hugh for debugging this issue, leading to various panics.

Tested:

  lpq84:~# echo "|/foobar12345 %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h" &gt;/proc/sys/kernel/core_pattern

'produce_core' is simply : main() { *(int *)0 = 1;}

  lpq84:~# ./produce_core
  Segmentation fault (core dumped)
  lpq84:~# dmesg | tail -1
  [  614.352947] Core dump to |/foobar12345 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 (null) pipe failed

Notice the last argument was replaced by a NULL (we were lucky enough to
not crash, but do not try this on your production machine !)

After fix :

  lpq83:~# echo "|/foobar12345 %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h" &gt;/proc/sys/kernel/core_pattern
  lpq83:~# ./produce_core
  Segmentation fault
  lpq83:~# dmesg | tail -1
  [  740.800441] Core dump to |/foobar12345 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 pipe failed

Fixes: 5fe9d8ca21cc ("coredump: cn_vprintf() has no reason to call vsnprintf() twice")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Diagnosed-by: Hugh Dickins &lt;hughd@google.com&gt;
Acked-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: stable@vger.kernel.org # 3.11+
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>coredump: make __get_dumpable/get_dumpable inline, kill fs/coredump.h</title>
<updated>2014-01-24T00:37:01Z</updated>
<author>
<name>Oleg Nesterov</name>
</author>
<published>2014-01-23T23:55:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=942be3875a1931c379bbc37053829dd6847e0f3f'/>
<id>urn:sha1:942be3875a1931c379bbc37053829dd6847e0f3f</id>
<content type='text'>
1. Remove fs/coredump.h. It is not clear why do we need it,
   it only declares __get_dumpable(), signal.c includes it
   for no reason.

2. Now that get_dumpable() and __get_dumpable() are really
   trivial make them inline in linux/sched.h.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Alex Kelly &lt;alex.page.kelly@gmail.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Josh Triplett &lt;josh@joshtriplett.org&gt;
Cc: Petr Matousek &lt;pmatouse@redhat.com&gt;
Cc: Vasily Kulikov &lt;segoon@openwall.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>dump_emit(): use __kernel_write(), not vfs_write()</title>
<updated>2013-11-16T03:04:09Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2013-11-16T02:58:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=52da40ae67f6192a3bf70a98cb560e1423554953'/>
<id>urn:sha1:52da40ae67f6192a3bf70a98cb560e1423554953</id>
<content type='text'>
the caller has already done file_start_write()...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>dump_align(): fix the dumb braino</title>
<updated>2013-11-16T03:04:09Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2013-11-16T02:55:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db51242d89b3059a46a3cf2f3339f8cd975cb954'/>
<id>urn:sha1:db51242d89b3059a46a3cf2f3339f8cd975cb954</id>
<content type='text'>
Mea culpa - original variant used 64-by-32-bit division,
which got caught very late.  Getting rid of that wasn't
hard, but I'd managed to botch the calling conventions
in process ;-/

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>constify do_coredump() argument</title>
<updated>2013-11-09T05:16:29Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2013-10-13T21:57:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec57941e031685de434916e5398d0ca1d44cd374'/>
<id>urn:sha1:ec57941e031685de434916e5398d0ca1d44cd374</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>new helper: dump_align()</title>
<updated>2013-11-09T05:16:27Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2013-10-08T15:05:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=22a8cb8248ba5d340307ba72432253b1dbdb5cf7'/>
<id>urn:sha1:22a8cb8248ba5d340307ba72432253b1dbdb5cf7</id>
<content type='text'>
dump_skip to given alignment...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>dump_skip(): dump_seek() replacement taking coredump_params</title>
<updated>2013-11-09T05:16:26Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2013-10-08T13:26:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9b56d54380adb5fef71f687109bbd6f8413d694f'/>
<id>urn:sha1:9b56d54380adb5fef71f687109bbd6f8413d694f</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>make dump_emit() use vfs_write() instead of banging at -&gt;f_op-&gt;write directly</title>
<updated>2013-11-09T05:16:26Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2013-10-08T13:11:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2507a4fbd48a96bc4236e584252635f8539079df'/>
<id>urn:sha1:2507a4fbd48a96bc4236e584252635f8539079df</id>
<content type='text'>
... and deal with short writes properly - the output might be to pipe, after
all; as it is, e.g. no-MMU case of elf_fdpic coredump can write a whole lot
more than a page worth of data at one call.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>new helper: dump_emit()</title>
<updated>2013-11-09T05:16:22Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2013-10-05T19:32:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ecc8c7725e6c21528329b34acae2a1d64b3af89b'/>
<id>urn:sha1:ecc8c7725e6c21528329b34acae2a1d64b3af89b</id>
<content type='text'>
dump_write() analog, takes core_dump_params instead of file,
keeps track of the amount written in cprm-&gt;written and checks for
cprm-&gt;limit.  Start using it in binfmt_elf.c...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
