Re: [PATCH] livepatch: introduce klp_func called interface
From: zhang warden
Date: Fri May 24 2024 - 04:09:42 EST
> On May 21, 2024, at 16:04, Petr Mladek <pmladek@xxxxxxxx> wrote:
>
> Another motivation to use ftrace for testing is that it does not
> affect the performance in production.
>
> We should keep klp_ftrace_handler() as fast as possible so that we
> could livepatch also performance sensitive functions.
>
How about using unlikely() for branch testing? If we use unlikely, maybe there is no negative effect to klp_ftrace_handler() once this function is called.
Regards,
Wardenjohn