From: zhang warden <zhangwarden@gmail.com>
To: Miroslav Benes <mbenes@suse.cz>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
Jiri Kosina <jikos@kernel.org>, Petr Mladek <pmladek@suse.com>,
Joe Lawrence <joe.lawrence@redhat.com>,
live-patching@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] livepatch: Add using attribute to klp_func for using func show
Date: Sat, 20 Jul 2024 13:56:56 +0800 [thread overview]
Message-ID: <07DD1CA1-7E53-4E67-92DC-ECEC11424804@gmail.com> (raw)
In-Reply-To: <alpine.LSU.2.21.2407191402500.24282@pobox.suse.cz>
> 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.
next prev parent reply other threads:[~2024-07-20 5:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-18 15:28 [PATCH] livepatch: Add using attribute to klp_func for using func show zhangyongde.zyd
2024-07-19 12:09 ` Miroslav Benes
2024-07-20 5:56 ` zhang warden [this message]
2024-07-24 15:00 ` Petr Mladek
2024-07-24 15:20 ` zhang warden
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=07DD1CA1-7E53-4E67-92DC-ECEC11424804@gmail.com \
--to=zhangwarden@gmail.com \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=pmladek@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox