[RFC PATCH v1 18/57] trace: Remove PAGE_SIZE compile-time constant assumption

Steven Rostedt rostedt at goodmis.org
Fri Oct 18 08:24:11 PDT 2024


On Tue, 15 Oct 2024 12:09:38 +0100
Ryan Roberts <ryan.roberts at arm.com> 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



More information about the linux-arm-kernel mailing list