Re: [PATCH 2/9] arm: do not place huge encoder tables on stack when it is too small
From: Paul Osmialowski <hidden>
Date: 2015-06-24 07:17:18
Also in:
linux-clk
Hi Geert, You're right. To be removed. Thanks for spotting this. On Wed, 24 Jun 2015, Geert Uytterhoeven wrote:
On Tue, Jun 23, 2015 at 11:19 PM, Paul Osmialowski [off-list ref] wrote:quoted
Since stack on Cortex-M3 is too small, we need configuration option to avoid using it for huge encoder tables of zlib. Signed-off-by: Paul Osmialowski <redacted>quoted
--- a/lib/zlib_inflate/inflate.c +++ b/lib/zlib_inflate/inflate.c@@ -75,9 +75,14 @@ int zlib_inflateInit2(z_streamp strm, int windowBits) Return state with length and distance decoding tables and index sizes set to fixed code decoding. This returns fixed tables from inffixed.h. */ +#ifdef CONFIG_ZLIB_INFLATE_STACK_SAVING +# include "inffixed.h" +#endif static void zlib_fixedtables(struct inflate_state *state) { +#ifndef CONFIG_ZLIB_INFLATE_STACK_SAVING # include "inffixed.h"All variables in inffixed.h are "static const", so they are not on the stack anyway, and this patch shouldn't make a difference.quoted
+#endifGr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds