Re: [RFC][PATCH 01/14 v2] function_graph: Convert ret_stack to a series of longs

From: Masami Hiramatsu
Date: Mon Jun 03 2019 - 07:34:41 EST


On Fri, 24 May 2019 08:05:53 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> >
> > > +#define SHADOW_STACK_SIZE (PAGE_SIZE)
> >
> > Do we really need that big a shadow stack?
>
> Well, this is a sticky point. I allow up to 16 users at a time
> (although I can't imagine more than 5, but you never know), and each
> user adds a long and up to 4 more words (which is probably unlikely
> anyway). And then we can have deep call stacks (we are getting deeper
> each release it seems).
>
> I figured, I start with a page size, and then in the future we can make
> it dynamic, or shrink it if it proves to be too much.

I'd prefer dynamic allocation, based on the number of users or actual
stack starvation.


Thank you,

--
Masami Hiramatsu <mhiramat@xxxxxxxxxx>