mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: zhang warden <zhangwarden@gmail.com>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Miroslav Benes <mbenes@suse.cz>, Jiri Kosina <jikos@kernel.org>,
	Petr Mladek <pmladek@suse.com>,
	Joe Lawrence <joe.lawrence@redhat.com>,
	live-patching@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 2/2] livepatch: Add using attribute to klp_func for using function show
Date: Thu, 5 Sep 2024 22:03:52 +0800	[thread overview]
Message-ID: <5B13628F-755E-4081-9E12-EB2F2441BBDF@gmail.com> (raw)
In-Reply-To: <20240904180648.fni3xeqkdrvswgcx@treble>


Hi, Josh.
> Most of this information is already available in sysfs, with the
> exception of patch stacking order.
> 
Well, this is the problem my patch want to fix. But my patch is more simpler, it just shows the stack top of the target function, which is the only thing users care.

> 
> We want patches that fix real world, tangible problems, not theoretical
> problems that it *might* solve for a hypothetical user.
> 
> What is the motiviation behind this patch?  What real world problem does
> it fix for you, or an actual user?  

Here I can give you an example as I previous described:

>>Here I can give you an example.
We are going to fix a problem of io_uring.
Our team made a livepatch of io_sq_offload_create.
This livepatch module is deployed to some running servers.

Then, another team make some change to the same function and deployed it to the same cluster.

Finally, they found that there are some livepatch module modifying the same function io_sq_offload_create. But none of them can tell which version of io_sq_offload_create is now exactly running in the system.

We can only use crash to debug /proc/kcore to see if we can get more information from the kcore.

If livepatch can tell which version of the function is now running or going to run, it will be very useful.

>>>>>>
What's more, the scenario we easily face is that for the confidential environment, the system maintenance mainly depends on SREs. Different team may do bug fix or performance optimization to kernel function. 

Here usually some SREs comes to me and ask me how to make sure which version is now actually active because tow teams make tow livepatch modules, both of them make changes to one function. 

He wants to know if his system is under risk, he want the system run the right version of the function because one module is a bug fix and the other is just a performance optimization module, at this time, the bug fix version is much more important. dmesg is too long, he find it hard to find out the patch order from dmesg.

With this patch, he can just cat /sys/kernel/livepatch/<module>/<object>/<function>/using and get his answer.

> Have you considered other solutions,
> like more organized patch management in user space?

User space solutions seems unreliable. What we need is just the enabling version of target function. The order of livepatch module enable mainly from dmesg, which is easily flush away or being cleaned.

If we use an user space program to maintain the information of patch order, once the program is killed, the information is loss either.

Neither of the previous user space solutions seems reliable. Only kernel space will no one can change it. And it is the most accurate.



  reply	other threads:[~2024-09-05 14:04 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-28  2:23 [PATCH v4 0/2] livepatch: Add using attribute to klp_func for using function Wardenjohn
2024-08-28  2:23 ` [PATCH v4 1/2] Introduce klp_ops into klp_func structure Wardenjohn
2024-09-05 10:10   ` Miroslav Benes
2024-09-05 14:33     ` zhang warden
2024-09-06  7:03       ` Miroslav Benes
2024-09-06  9:44         ` zhang warden
2024-09-13  9:46           ` zhang warden
2024-08-28  2:23 ` [PATCH v4 2/2] livepatch: Add using attribute to klp_func for using function show Wardenjohn
2024-09-04  1:54   ` zhang warden
2024-09-04  4:48   ` Josh Poimboeuf
2024-09-04  6:34     ` zhang warden
2024-09-04  7:14       ` Josh Poimboeuf
2024-09-04  7:30         ` zhang warden
2024-09-04 18:06           ` Josh Poimboeuf
2024-09-05 14:03             ` zhang warden [this message]
2024-09-05 16:30               ` Josh Poimboeuf
2024-09-05 10:23   ` Miroslav Benes
2024-09-05 14:17     ` zhang warden
2024-09-05 16:34     ` Josh Poimboeuf
2024-09-06  6:55       ` Miroslav Benes
2024-09-06  9:39       ` zhang warden
2024-09-06 16:39         ` Petr Mladek
2024-09-08  2:31           ` zhang warden
2024-09-06 16:13     ` Petr Mladek
2024-09-08  2:51       ` zhang warden
2024-09-10  8:01         ` Petr Mladek
2024-09-10  8:09           ` 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=5B13628F-755E-4081-9E12-EB2F2441BBDF@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

all inboxes | Powered by JetHome®