From: Petr Mladek <pmladek@suse.com>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
jikos@kernel.org, mbenes@suse.cz, joe.lawrence@redhat.com,
mcgrof@kernel.org, live-patching@vger.kernel.org,
linux-modules@vger.kernel.org
Subject: Re: [PATCH v2 2/2] livepatch: Delete the associated module of disabled livepatch
Date: Thu, 9 May 2024 12:16:05 +0200 [thread overview]
Message-ID: <ZjyiZfC9GqQ4akVJ@pathway> (raw)
In-Reply-To: <CALOAHbBAQ580+qjxYbc1bNJxZ8wxxDqP3ua__pqKzCg9An3yGA@mail.gmail.com>
On Thu 2024-05-09 13:53:17, Yafang Shao wrote:
> On Thu, May 9, 2024 at 1:20 PM Josh Poimboeuf <jpoimboe@kernel.org> wrote:
> >
> > On Thu, May 09, 2024 at 10:17:43AM +0800, Yafang Shao wrote:
> > > On Wed, May 8, 2024 at 3:03 PM Josh Poimboeuf <jpoimboe@kernel.org> wrote:
> > > >
> > > > On Wed, May 08, 2024 at 02:01:29PM +0800, Yafang Shao wrote:
> > > > > On Wed, May 8, 2024 at 1:16 PM Josh Poimboeuf <jpoimboe@kernel.org> wrote:
> > > > > > If klp_patch.replace is set on the new patch then it will replace all
> > > > > > previous patches.
> > > > >
> > > > > A scenario exists wherein a user could simultaneously disable a loaded
> > > > > livepatch, potentially resulting in it not being replaced by the new
> > > > > patch. While theoretical, this possibility is not entirely
> > > > > implausible.
> > > >
> > > > Why does it matter whether it was replaced, or was disabled beforehand?
> > > > Either way the end result is the same.
> > >
> > > When users disable the livepatch, the corresponding kernel module may
> > > sometimes be removed, while other times it remains intact. This
> > > inconsistency has the potential to confuse users.
> >
> > I'm afraid I don't understand. Can you give an example scenario?
> >
>
> As previously mentioned, this scenario may occur if user-space tools
> remove all pertinent kernel modules from /sys/livepatch/* while a user
> attempts to load a new atomic-replace livepatch.
>
> For instance:
>
> User-A User-B
>
> echo 0 > /sys/livepatch/A/enable insmod atomic-replace-patch.ko
>
> >From User-A's viewpoint, the A.ko module might sometimes be removed,
> while at other times it remains intact. The reason is that User-B
> removed a module that he shouldn't remove.
Why would User-A want to keep the module, please? The livepatches
could not longer be re-enabled since the commit 958ef1e39d24d6
("livepatch: Simplify API by removing registration step") which
was added in v5.1-rc1.
The only problem might be that User-A can't remove the module
because it has already been removed by User-B or vice versa.
Is this really a problem?
Have you seen the problem in practice or is it just theoretical?
Is anyone really combining livepatches with and without atomic
replace?
Best Regards,
Petr
next prev parent reply other threads:[~2024-05-09 10:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-07 3:57 [PATCH v2 0/2] livepatch, module: Delete the associated module of disabled livepatch Yafang Shao
2024-04-07 3:57 ` [PATCH v2 1/2] module: Add a new helper delete_module() Yafang Shao
2024-04-24 12:09 ` Yafang Shao
2024-05-04 16:53 ` Greg KH
2024-05-04 22:26 ` Josh Poimboeuf
2024-05-04 21:36 ` Luis Chamberlain
2024-05-06 11:58 ` Petr Mladek
2024-04-07 3:57 ` [PATCH v2 2/2] livepatch: Delete the associated module of disabled livepatch Yafang Shao
2024-05-03 21:14 ` Josh Poimboeuf
2024-05-06 11:32 ` Petr Mladek
2024-05-07 2:35 ` Josh Poimboeuf
2024-05-07 14:03 ` Yafang Shao
2024-05-08 5:16 ` Josh Poimboeuf
2024-05-08 6:01 ` Yafang Shao
2024-05-08 7:03 ` Josh Poimboeuf
2024-05-09 2:17 ` Yafang Shao
2024-05-09 5:20 ` Josh Poimboeuf
2024-05-09 5:53 ` Yafang Shao
2024-05-09 10:16 ` Petr Mladek [this message]
2024-05-09 11:57 ` Yafang Shao
2024-05-09 10:51 ` Petr Mladek
2024-05-06 12:20 ` Petr Mladek
2024-05-02 13:30 ` [PATCH v2 0/2] livepatch, module: " Joe Lawrence
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=ZjyiZfC9GqQ4akVJ@pathway \
--to=pmladek@suse.com \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=laoar.shao@gmail.com \
--cc=linux-modules@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=mcgrof@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).