Re: [PATCH] livepatch: introduce klp_func called interface

From: Miroslav Benes
Date: Thu Jun 20 2024 - 05:31:39 EST


Hi,

On Thu, 20 Jun 2024, zhang warden wrote:

>
>
> > On Jun 7, 2024, at 17:07, Miroslav Benes <mbenes@xxxxxxx> wrote:
> >
> > It would be better than this patch but given what was mentioned in the
> > thread I wonder if it is possible to use ftrace even for this. See
> > /sys/kernel/tracing/trace_stat/function*. It already gathers the number of
> > hits.
> >
>
> Hi, Miroslav
>
> Can ftrace able to trace the function which I added into kernel by livepatching?

yes, it should also work as is. I just generally recommend to use a
different name (prefixed for example) for the new replacement function to
avoid issues if you do not already do it.

Miroslav