Skip to contentSkip to conversation

i386: always use 4k stacks

PATCH Kenneth Parrish 3 participants 3 messages Nov 17, 2005 – Nov 30, 2005

lore
Share & tools
lore
#0 lore raw

-=> In article 16 Nov 05 14:40:16, Adrian Bunk wrote to All <=-

AB> If one function calls another function you have to add the stack AB> usages.

these few may do that, i bet.

 0xc02bb528 huft_build:                                  1432
 0xc02bb954 huft_build:                                  1432
 0xc02bc1c4 inflate_dynamic:                             1312
 0xc02bc2ff inflate_dynamic:                             1312
 0xc02bc082 inflate_fixed:                               1168
 0xc02bc172 inflate_fixed:                               1168

78.5% of 493 make checkstack lines here report fewer than 200 bytes. Only six over 600.

... Life is like a simile.
--- MultiMail/Linux v0.46

#1 lore raw
Quoted 5 lines · Kenneth Parrish

-=> In article 16 Nov 05 14:40:16, Adrian Bunk wrote to All <=-

AB> If one function calls another function you have to add the stack AB> usages.

Quoted 7 lines

these few may do that, i bet.

 0xc02bb528 huft_build:                                  1432
 0xc02bb954 huft_build:                                  1432
 0xc02bc1c4 inflate_dynamic:                             1312
 0xc02bc2ff inflate_dynamic:                             1312
 0xc02bc082 inflate_fixed:                               1168
 0xc02bc172 inflate_fixed:                               1168

Now what is interesting is these functions currently run with a 4KiB stack on every bootup. So unless they have callers with a significant stack footprint things are fine.

Eric

#2 lore raw
Quoted 15 lines · Eric W. Biederman
Quoted 5 lines · Kenneth Parrish

-=> In article 16 Nov 05 14:40:16, Adrian Bunk wrote to All <=-

AB> If one function calls another function you have to add the stack AB> usages.

Quoted 7 lines

these few may do that, i bet.

 0xc02bb528 huft_build:                                  1432
 0xc02bb954 huft_build:                                  1432
 0xc02bc1c4 inflate_dynamic:                             1312
 0xc02bc2ff inflate_dynamic:                             1312
 0xc02bc082 inflate_fixed:                               1168
 0xc02bc172 inflate_fixed:                               1168
Quoted 3 lines

Now what is interesting is these functions currently run with a 4KiB stack on every bootup. So unless they have callers with a significant stack footprint things are fine.

The longest call chain for these functions eats roughly 3.2k on i386 with allyesconfig. Measured with a statical code checker, not tested.

Jörn

Signature · 2 lines
Simplicity is prerequisite for reliability.
-- Edsger W. Dijkstra