Re: [PATCH 4/9] pstore/ftrace: Add recursion protection to the ftrace callback

From: Kees Cook
Date: Wed Oct 28 2020 - 18:41:22 EST


On Wed, Oct 28, 2020 at 07:52:48AM -0400, Steven Rostedt wrote:
> From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>
>
> If a ftrace callback does not supply its own recursion protection and
> does not set the RECURSION_SAFE flag in its ftrace_ops, then ftrace will
> make a helper trampoline to do so before calling the callback instead of
> just calling the callback directly.
>
> The default for ftrace_ops is going to assume recursion protection unless
> otherwise specified.
>
> Cc: Thomas Meyer <thomas@xxxxxxxx>
> Cc: Kees Cook <keescook@xxxxxxxxxxxx>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>

Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>

--
Kees Cook