On Tue, 15 Oct 2024 12:09:38 +0100 Ryan Roberts <ryan.roberts@xxxxxxx> wrote: > > > > Not to mention, when function graph tracing is enabled, this gets triggered > > for *every* function call! So I do not want any runtime test done. Every > > nanosecond counts in this code path. > > > > If anything, this needs to be moved to initialization and checked once, if > > it fails, gives a WARN_ON() and disables function graph tracing. > > I'm hoping my suggestion above to decouple SHADOW_STACK_SIZE from PAGE_SIZE is > acceptable and simpler? If not, happy to do as you suggest here. Yeah, I think we can do that. In fact, I'm thinking it should turn into a kmem_cache item that doesn't have to be a power of two (but must be evenly divisible by the size of long). I'll write up a patch. -- Steve