<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/lib/inflate.c, branch v2.6.23.14</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>[PATCH] x86-64: deflate inflate_dynamic too</title>
<updated>2007-05-02T17:27:15+00:00</updated>
<author>
<name>Jeremy Fitzhardinge</name>
<email>jeremy@goop.org</email>
</author>
<published>2007-05-02T17:27:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=39b7ee06859b07ca5fd4fabb44c4600316532574'/>
<id>39b7ee06859b07ca5fd4fabb44c4600316532574</id>
<content type='text'>
inflate_dynamic() has piggy stack usage too, so heap allocate it too.
I'm not sure it actually gets used, but it shows up large in "make
checkstack".

Signed-off-by: Jeremy Fitzhardinge &lt;jeremy@xensource.com&gt;
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
inflate_dynamic() has piggy stack usage too, so heap allocate it too.
I'm not sure it actually gets used, but it shows up large in "make
checkstack".

Signed-off-by: Jeremy Fitzhardinge &lt;jeremy@xensource.com&gt;
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] x86: deflate stack usage in lib/inflate.c</title>
<updated>2007-05-02T17:27:15+00:00</updated>
<author>
<name>Jeremy Fitzhardinge</name>
<email>jeremy@goop.org</email>
</author>
<published>2007-05-02T17:27:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=35c7422649ee7a3d0eb4ebd32c997eeb45f81046'/>
<id>35c7422649ee7a3d0eb4ebd32c997eeb45f81046</id>
<content type='text'>
inflate_fixed and huft_build together use around 2.7k of stack.  When
using 4k stacks, I saw stack overflows from interrupts arriving while
unpacking the root initrd:

do_IRQ: stack overflow: 384
 [&lt;c0106b64&gt;] show_trace_log_lvl+0x1a/0x30
 [&lt;c01075e6&gt;] show_trace+0x12/0x14
 [&lt;c010763f&gt;] dump_stack+0x16/0x18
 [&lt;c0107ca4&gt;] do_IRQ+0x6d/0xd9
 [&lt;c010202b&gt;] xen_evtchn_do_upcall+0x6e/0xa2
 [&lt;c0106781&gt;] xen_hypervisor_callback+0x25/0x2c
 [&lt;c010116c&gt;] xen_restore_fl+0x27/0x29
 [&lt;c0330f63&gt;] _spin_unlock_irqrestore+0x4a/0x50
 [&lt;c0117aab&gt;] change_page_attr+0x577/0x584
 [&lt;c0117b45&gt;] kernel_map_pages+0x8d/0xb4
 [&lt;c016a314&gt;] cache_alloc_refill+0x53f/0x632
 [&lt;c016a6c2&gt;] __kmalloc+0xc1/0x10d
 [&lt;c0463d34&gt;] malloc+0x10/0x12
 [&lt;c04641c1&gt;] huft_build+0x2a7/0x5fa
 [&lt;c04645a5&gt;] inflate_fixed+0x91/0x136
 [&lt;c04657e2&gt;] unpack_to_rootfs+0x5f2/0x8c1
 [&lt;c0465acf&gt;] populate_rootfs+0x1e/0xe4

(This was under Xen, but there's no reason it couldn't happen on bare
  hardware.)

This patch mallocs the local variables, thereby reducing the stack
usage to sane levels.

Also, up the heap size for the kernel decompressor to deal with the
extra allocation.

Signed-off-by: Jeremy Fitzhardinge &lt;jeremy@xensource.com&gt;
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
Cc: Tim Yamin &lt;plasmaroo@gentoo.org&gt;
Cc: Andi Kleen &lt;ak@suse.de&gt;
Cc: Matt Mackall &lt;mpm@selenic.com&gt;
Cc: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
Cc: Richard Henderson &lt;rth@twiddle.net&gt;
Cc: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: Ian Molton &lt;spyro@f2s.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
inflate_fixed and huft_build together use around 2.7k of stack.  When
using 4k stacks, I saw stack overflows from interrupts arriving while
unpacking the root initrd:

do_IRQ: stack overflow: 384
 [&lt;c0106b64&gt;] show_trace_log_lvl+0x1a/0x30
 [&lt;c01075e6&gt;] show_trace+0x12/0x14
 [&lt;c010763f&gt;] dump_stack+0x16/0x18
 [&lt;c0107ca4&gt;] do_IRQ+0x6d/0xd9
 [&lt;c010202b&gt;] xen_evtchn_do_upcall+0x6e/0xa2
 [&lt;c0106781&gt;] xen_hypervisor_callback+0x25/0x2c
 [&lt;c010116c&gt;] xen_restore_fl+0x27/0x29
 [&lt;c0330f63&gt;] _spin_unlock_irqrestore+0x4a/0x50
 [&lt;c0117aab&gt;] change_page_attr+0x577/0x584
 [&lt;c0117b45&gt;] kernel_map_pages+0x8d/0xb4
 [&lt;c016a314&gt;] cache_alloc_refill+0x53f/0x632
 [&lt;c016a6c2&gt;] __kmalloc+0xc1/0x10d
 [&lt;c0463d34&gt;] malloc+0x10/0x12
 [&lt;c04641c1&gt;] huft_build+0x2a7/0x5fa
 [&lt;c04645a5&gt;] inflate_fixed+0x91/0x136
 [&lt;c04657e2&gt;] unpack_to_rootfs+0x5f2/0x8c1
 [&lt;c0465acf&gt;] populate_rootfs+0x1e/0xe4

(This was under Xen, but there's no reason it couldn't happen on bare
  hardware.)

This patch mallocs the local variables, thereby reducing the stack
usage to sane levels.

Also, up the heap size for the kernel decompressor to deal with the
extra allocation.

Signed-off-by: Jeremy Fitzhardinge &lt;jeremy@xensource.com&gt;
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
Cc: Tim Yamin &lt;plasmaroo@gentoo.org&gt;
Cc: Andi Kleen &lt;ak@suse.de&gt;
Cc: Matt Mackall &lt;mpm@selenic.com&gt;
Cc: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
Cc: Richard Henderson &lt;rth@twiddle.net&gt;
Cc: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: Ian Molton &lt;spyro@f2s.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Update in-kernel zlib routines</title>
<updated>2005-08-05T23:23:21+00:00</updated>
<author>
<name>Tim Yamin</name>
<email>plasmaroo@gentoo.org</email>
</author>
<published>2005-07-25T22:16:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4aad724d3e52238e1ce005f166fbba5b4072a7f6'/>
<id>4aad724d3e52238e1ce005f166fbba5b4072a7f6</id>
<content type='text'>
These bugs have been fixed in the standard zlib for a while.

See for example

 a) http://sources.redhat.com/ml/bug-gnu-utils/1999-06/msg00183.html
 b) http://bugs.gentoo.org/show_bug.cgi?id=94584

Signed-off-by: Tim Yamin &lt;plasmaroo@gentoo.org&gt;
Signed-off-by: Tavis Ormandy &lt;taviso@gentoo.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These bugs have been fixed in the standard zlib for a while.

See for example

 a) http://sources.redhat.com/ml/bug-gnu-utils/1999-06/msg00183.html
 b) http://bugs.gentoo.org/show_bug.cgi?id=94584

Signed-off-by: Tim Yamin &lt;plasmaroo@gentoo.org&gt;
Signed-off-by: Tavis Ormandy &lt;taviso@gentoo.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Linux-2.6.12-rc2</title>
<updated>2005-04-16T22:20:36+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@ppc970.osdl.org</email>
</author>
<published>2005-04-16T22:20:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2'/>
<id>1da177e4c3f41524e886b7f1b8a0c1fc7321cac2</id>
<content type='text'>
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
</pre>
</div>
</content>
</entry>
</feed>
