Re: [PATCH] livepatch: introduce klp_func called interface

2024-06-10 Thread zhang warden
> We don't have very urgent use for this. As we discussed, various tracing > tools are sufficient in most cases. I brought this up in the context of the > "called" entry: if we are really adding a new entry, let's do "counter" > instead of "called". > > Thanks, > Song Hi, Song I hope to find

Re: [PATCH] livepatch: introduce klp_func called interface

2024-06-06 Thread zhang warden
> On Jun 6, 2024, at 23:01, Joe Lawrence wrote: > > Hi Wardenjohn, > > To follow up, Red Hat kpatch QE pointed me toward this test: > > https://gitlab.com/redhat/centos-stream/tests/kernel/kernel-tests/-/tree/main/general/kpatch/kpatch-trace?ref_type=heads > > which reports a few

Re: [PATCH] livepatch: introduce klp_func called interface

2024-06-04 Thread zhang warden
Hi Joe, > > Perhaps "responsibility" is a better description. This would introduce > an attribute that someone's userspace utility is relying on. It should > at least have a kselftest to ensure a random patch in 2027 doesn't break > it. I sent this patch to see the what the community thinks

Re: [PATCH] livepatch: introduce klp_func called interface

2024-06-04 Thread zhang warden
> My intention to introduce this attitude to sysfs is that user who what to see > if this function is called can just need to show this function attribute in > the livepatch sysfs interface. > Sorry bros, There is a typo in my word : attitude -> attribute Autocomplete make it wrong….lol..

Re: [PATCH] livepatch: introduce klp_func called interface

2024-06-04 Thread zhang warden
> On May 31, 2024, at 22:06, Miroslav Benes wrote: > >> 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? > > The test (cmp insn or something like that) still needs to be there. Since > there is

Re: [PATCH] livepatch: introduce klp_func called interface

2024-06-04 Thread zhang warden
> On Jun 1, 2024, at 03:16, Joe Lawrence wrote: > > Adding these attributes to livepatch sysfs would be expedient and > probably easier for us to use, but imposes a recurring burden on us to > maintain and test (where is the documentation and kselftest for this new > interface?). Or, we

Re: [PATCH] livepatch: introduce klp_func called interface

2024-05-31 Thread zhang warden
> On May 31, 2024, at 15:21, Miroslav Benes 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. >

Re: [PATCH] livepatch: introduce klp_func called interface

2024-05-30 Thread zhang warden
Hi Bros, How about my patch? I do think it is a viable feature to show the state of the patched function. If we add an unlikely branch test before we set the 'called' state, once this function is called, there maybe no negative effect to the performance. Please give me some advice.

Re: [PATCH] livepatch: introduce klp_func called interface

2024-05-24 Thread zhang warden
> On May 23, 2024, at 22:22, Dan Carpenter wrote: > > 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

Re: [PATCH] livepatch: introduce klp_func called interface

2024-05-24 Thread zhang warden
> On May 21, 2024, at 16:04, Petr Mladek 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

Re: [PATCH] livepatch: introduce klp_func called interface

2024-05-20 Thread zhang warden
OK, I will try to optimize my description after the patch is reviewed. I am sure there are something still need to be fix for that patch. > On May 20, 2024, at 16:00, Markus Elfring wrote: > > Please add a version identifier to the message subject. > > > … >> If the patched function have

Re: [PATCH] livepatch: introduce klp_func called interface

2024-05-20 Thread zhang warden
> On May 20, 2024, at 14:46, Miroslav Benes wrote: > > Hi, > > On Mon, 20 May 2024, 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 is a kobject attribute

Re: [PATCH] livepatch: introduce klp_func called interface

2024-05-19 Thread zhang warden
OK, I will optimize my patch’s changelog in my next patch. > On May 20, 2024, at 02:05, Markus Elfring wrote: > > I suggest to take preferred line lengths better into account > also for such a change description.

Re: [PATCH 0/1] *** Replace KLP_* to KLP_TRANSITION_* ***

2024-05-06 Thread zhang warden
> On May 7, 2024, at 10:41, Josh Poimboeuf wrote: > > On Tue, May 07, 2024 at 10:21:40AM +0800, zhang warden wrote: >> >> >>> >>> transition state. With this marcos renamed, comments are not >>> necessary at this point. >>> >&g

Re: [PATCH 0/1] *** Replace KLP_* to KLP_TRANSITION_* ***

2024-05-06 Thread zhang warden
> > transition state. With this marcos renamed, comments are not > necessary at this point. > Sorry for my careless, the comment still remains in the code. However, comment in the code do no harms here. Maybe it can be kept.

Re: [PATCH] livepatch.h: Add comment to klp transition state

2024-05-05 Thread zhang warden
> On May 6, 2024, at 05:00, Josh Poimboeuf wrote: > > On Mon, Apr 29, 2024 at 03:26:28PM +0800, zhangwar...@gmail.com wrote: >> From: Wardenjohn >> >> livepatch.h use KLP_UNDEFINED\KLP_UNPATCHED\KLP_PATCHED for klp transition >> state. >> When livepatch is ready but idle, using

Re: [PATCH] livepatch: Add KLP_IDLE state

2024-04-06 Thread zhang warden
Hi Joe and Petr : > On Apr 5, 2024, at 01:50, Joe Lawrence wrote: > > On 4/4/24 11:17, Petr Mladek wrote: >> On Tue 2024-04-02 09:52:31, Joe Lawrence wrote: >>> On Tue, Apr 02, 2024 at 11:09:54AM +0800, zhangwar...@gmail.com wrote: From: Wardenjohn In livepatch, using