Re: [PATCH] livepatch: introduce klp_func called interface
From: Dan Carpenter
Date: Thu May 23 2024 - 10:23:05 EST
On Sun, May 19, 2024 at 03:43:43PM +0800, Wardenjohn wrote:
> Livepatch module usually used to modify kernel functions.
> If the patched function have bug, it may cause serious result
> such as kernel crash.
>
> This commit introduce a read only interface of livepatch
> sysfs interface. If a livepatch function is called, this
> sysfs interface "called" of the patched function will
> set to be 1.
>
> /sys/kernel/livepatch/<patch>/<object>/<function,sympos>/called
>
> This value "called" is quite necessary for kernel stability assurance for livepatching
> module of a running system. Testing process is important before a livepatch module
> apply to a production system. With this interface, testing process can easily
> find out which function is successfully called. Any testing process can make sure they
> have successfully cover all the patched function that changed with the help of this interface.
> ---
Always run your patches through checkpatch.
So this patch is so that testers can see if a function has been called?
Can you not get the same information from gcov or ftrace?
There are style issues with the patch, but it's not so important until
the design is agreed on.
regards,
dan carpenter