ipv4/tcp.c:4234:1: error: the frame size of 1152 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

Arnd Bergmann arnd at arndb.de
Wed Sep 8 09:56:25 PDT 2021


On Wed, Sep 8, 2021 at 5:49 PM Linus Torvalds
<torvalds at linux-foundation.org> wrote:
> On Wed, Sep 8, 2021 at 7:50 AM Eric Dumazet <edumazet at google.com> wrote:
> In the past I've seen at least two patterns
>
>  (a) not merging stack slots at all
>
>  (b) some odd "pattern allocator" problems, where I think gcc ended up
> re-using previous stack slots if they were the right size, but failing
> when previous allocations were fragmented
>
> that (a) thing is what -fconserve-stack is all about, and we also used
> to have (iirc) -fno-defer-pop to avoid having function call argument
> stacks stick around.

CONFIG_KASAN_STACK leads to (a), and this has been the source of
long discussions about whether to turn it off altogether, the current state
being that it's disabled for CONFIG_COMPILE_TEST on clang because
this can explode the stack usage even further when it starts spilling
registers.

gcc also runs into this problem, but at least newer versions at not nearly
as bad as they used to be in the past.

       Arnd



More information about the linux-arm-kernel mailing list