[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <07DD1CA1-7E53-4E67-92DC-ECEC11424804@gmail.com>
Date: Sat, 20 Jul 2024 13:56:56 +0800
From: zhang warden <zhangwarden@...il.com>
To: Miroslav Benes <mbenes@...e.cz>
Cc: Josh Poimboeuf <jpoimboe@...nel.org>,
Jiri Kosina <jikos@...nel.org>,
Petr Mladek <pmladek@...e.com>,
Joe Lawrence <joe.lawrence@...hat.com>,
live-patching@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] livepatch: Add using attribute to klp_func for using func
show
> is this always correct though? See the logic in klp_ftrace_handler(). If
> there is a transition running, it is a little bit more complicated.
>
> Miroslav
Hi! Miroslav.
In reality, we often encounter such situation that serval patch in one system, some patch make changes to one same function A. This make us confused that we don't know which version of function A is now using.
In my view, this "using" state show the function version that is now enabling. Even if there is a transition running, the end state of one task will finally use patchN's version.
If we see the attribute "using" is 1, it mean that livepatch will use this function to work but seem to be not all task running this version because the "transition" flag of this patch is "1". We can be told from "transition" that if all threads have completed synchronization.
So, the main function of this attribute is to enable user space find out which version of the patched function is running now (or will use after transition completed)in the system.
Please see if I have explain my opinion clearly.
Thanks!
Wardenjohn.
Powered by blists - more mailing lists