Re: [PATCH] livepatch: introduce klp_func called interface

From: zhang warden
Date: Fri May 31 2024 - 09:19:45 EST




> On May 31, 2024, at 15:21, Miroslav Benes <mbenes@xxxxxxx> wrote:
>
> Hi,
>
> On Fri, 31 May 2024, zhang warden wrote:
>
> you have not replied to my questions/feedback yet.
>
> Also, I do not think that unlikely changes anything here. It is a simple
> branch after all.
>
> Miroslav
Hi Miroslav,

Sorry for my carelessness. I apologise for my ignorance.

> Second, livepatch is
> already use ftrace for functional replacement, I don’t think it is a
> good choice of using kernel tracing tool to trace a patched function.

I admit that ftrace can use for tracing the new patched function. But for some cases, user who what to know the state of this function can easily cat the 'called' interface.

It is more convenient than using ftrace to trace the state.

And for the unlikely branch, isn’t the complier will compile this branch into a cold branch that will do no harm to the function performance?

Regards,
Wardenjohn