From: Miroslav Benes <mbenes@suse.cz>
To: "zhangyongde.zyd" <zhangwarden@gmail.com>
Cc: jpoimboe@kernel.org, jikos@kernel.org, pmladek@suse.com,
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: Fri, 19 Jul 2024 14:09:12 +0200 (CEST) [thread overview]
Message-ID: <alpine.LSU.2.21.2407191402500.24282@pobox.suse.cz> (raw)
In-Reply-To: <20240718152807.92422-1-zhangyongde.zyd@alibaba-inc.com>
Hi,
On Thu, 18 Jul 2024, zhangyongde.zyd wrote:
> From: Wardenjohn <zhangwarden@gmail.com>
>
> One system may contains more than one livepatch module. We can see
> which patch is enabled. If some patches applied to one system
> modifing the same function, livepatch will use the function enabled
> on top of the function stack. However, we can not excatly know
> which function of which patch is now enabling.
>
> This patch introduce one sysfs attribute of "using" to klp_func.
> For example, if there are serval patches make changes to function
> "meminfo_proc_show", the attribute "enabled" of all the patch is 1.
> With this attribute, we can easily know the version enabling belongs
> to which patch.
>
> cat /sys/kernel/livepatch/<patch1>/<object1>/<function1,sympos>/using -> 0
> means that the function1 of patch1 is disabled.
>
> cat /sys/kernel/livepatch/<patchN>/<object1>/<function1,sympos>/using -> 1
> means that the function1 of patchN is enabled.
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
next prev parent reply other threads:[~2024-07-19 12:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-18 15:28 zhangyongde.zyd
2024-07-19 12:09 ` Miroslav Benes [this message]
2024-07-20 5:56 ` zhang warden
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=alpine.LSU.2.21.2407191402500.24282@pobox.suse.cz \
--to=mbenes@suse.cz \
--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=pmladek@suse.com \
--cc=zhangwarden@gmail.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
all inboxes | Powered by JetHome®