Repost: Stack Sizes

Agatha Isabelle Moreira <[email protected]> Tue, 16 Jun 2026 16:27:28 -0300
Newsgroups org.kernel.vger.kernel-janitors
Message-ID <guidaicaWc.490766.2026916ajGffm3ujI3YzudF_19650_LINUXKERNEL_AGATHA_@asdfsad.agatha.dev>
Hello,

A couple of days ago I posted on the kernelnewbies list:
> Hi,
> 
> The kernel documentation says that any function that uses more than 512
> bytes on the stack is a candidate for change.
> 
> However, it doesn't say under what conditions (what config options).
> 
> I found 193 functions matching, some with stacks quite larger than that.
> I suspect this could be the result of some config options, maybe.
> 
> What would you recommend me checking?


Anuz suggested me to check with the kernel-janitors community:
> This question might be worth asking in kernel Janitor mailing list. They
> also use a few tools for static code checking.

What do you suggest me on that regard? Also back to my original question
do you have anything to add?

From what I checked nothing of my original config screams "huge stack
sizes", no tracing or anything like that, just regular optimization
(`-O2`), probably a lot of inlining, but that's just what a regular
kernel would have. But if anyone could point me out a specific list of
widely known options to check I would appreciate.

Sincerely,

-- 
Agatha Isabelle Moreira
Systems Engineer | C