Re: [PATCH v4 bpf-next 2/4] ftrace: allow IPMODIFY and DIRECT ops on the same function

From: Steven Rostedt
Date: Tue Jul 19 2022 - 14:39:48 EST


On Tue, 19 Jul 2022 14:28:56 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> > + /* Cannot have two ipmodify on same rec */
> > + if (is_ipmodify)
> > + goto rollback;
> > +
>
> I might add a
>
> FTRACE_WARN_ON(rec->flags &
> FTRACE_FL_DIRECT);

Bah, my email client line wrapped this. It was suppose to be:

FTRACE_WARN_ON(rec->flags & FTRACE_FL_DIRECT);

Just so you don't think I wanted that initial formatting ;-)

-- Steve

>
> Just to be safe.
>
> That is, if this is true, we are adding a new direct function to a record
> that already has one.