From: Petr Mladek <pmladek@suse.com>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: Song Liu <song@kernel.org>,
jpoimboe@kernel.org, jikos@kernel.org, mbenes@suse.cz,
joe.lawrence@redhat.com, live-patching@vger.kernel.org
Subject: Re: [PATCH v2 0/3] livepatch: Add "replace" sysfs attribute
Date: Fri, 21 Jun 2024 09:31:45 +0200 [thread overview]
Message-ID: <ZnUsYf1-Ue59Fjru@pathway.suse.cz> (raw)
In-Reply-To: <CALOAHbDPXDZQJENvN-yZM-OyrTy94kE6wMLGHt83m_y3O23bRQ@mail.gmail.com>
On Tue 2024-06-11 10:46:47, Yafang Shao wrote:
> On Tue, Jun 11, 2024 at 1:19 AM Song Liu <song@kernel.org> wrote:
> >
> > Hi Yafang,
> >
> > On Sun, Jun 9, 2024 at 6:33 PM Yafang Shao <laoar.shao@gmail.com> wrote:
> > >
> > > Add "replace" sysfs attribute to show whether a livepatch supports
> > > atomic replace or not.
> >
> > I am curious about the use case here.
>
> We will use this flag to check if there're both atomic replace
> livepatch and non atomic replace livepatch running on a single server
> at the same time. That can happen if we install a new non atomic
> replace livepatch to a server which has already applied an atomic
> replace livepatch.
>
> > AFAICT, the "replace" flag
> > matters _before_ the livepatch is loaded. Once the livepatch is
> > loaded, the "replace" part is already finished. Therefore, I think
> > we really need a way to check the replace flag before loading the
> > .ko file? Maybe in modinfo?
>
> It will be better if we can check it before loading it. However it
> depends on how we build the livepatch ko, right? Take the
> kpatch-build[0] for example, we have to modify the kpatch-build to add
> support for it but we can't ensure all users will use it to build the
> livepatch.
> [0]. https://github.com/dynup/kpatch
I still do not understand how the sysfs attribute would help here.
It will show the type of the currently used livepatches. But
it won't say what the to-be-installed livepatch would do.
Could you please describe how exactly you would use the information?
What would be the process/algorithm/logic which would prevent a mistake?
Honestly, it sounds like your processes are broken and you try
to fix them on the wrong end.
Allowing to load random livepatches which are built a random way
sounds like a hazard.
It should be possible to load only livepatches which passed some
testing (QA). And the testing (QA) should check if the livepatch
successfully replaced the previous version.
Or do you want to use the sysfs attribute in QA?
So that only livepatches witch "replace" flag set would pass QA?
Best Regards,
Petr
next prev parent reply other threads:[~2024-06-21 7:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 1:32 [PATCH v2 0/3] livepatch: Add "replace" sysfs attribute Yafang Shao
2024-06-10 1:32 ` [PATCH v2 1/3] " Yafang Shao
2024-06-24 13:46 ` Petr Mladek
2024-06-25 2:14 ` Yafang Shao
2024-06-10 1:32 ` [PATCH v2 2/3] selftests/livepatch: Add selftests for " Yafang Shao
2024-06-11 17:28 ` Marcos Paulo de Souza
2024-06-24 13:49 ` Petr Mladek
2024-06-10 1:32 ` [PATCH v2 3/3] livepatch: Replace snprintf() with sysfs_emit() Yafang Shao
2024-06-24 13:50 ` Petr Mladek
2024-06-10 17:18 ` [PATCH v2 0/3] livepatch: Add "replace" sysfs attribute Song Liu
2024-06-11 2:46 ` Yafang Shao
2024-06-11 5:01 ` Song Liu
2024-06-21 7:31 ` Petr Mladek [this message]
2024-06-21 8:39 ` Yafang Shao
2024-06-21 10:04 ` Petr Mladek
2024-06-23 2:52 ` Yafang Shao
2024-06-24 14:04 ` Petr Mladek
2024-06-25 2:16 ` Yafang Shao
2024-06-27 13:02 ` Miroslav Benes
2024-06-27 15:55 ` Yafang Shao
2024-06-28 8:20 ` Miroslav Benes
2024-06-21 2:26 ` Yafang Shao
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=ZnUsYf1-Ue59Fjru@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=laoar.shao@gmail.com \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=song@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).