Re: [RFC PATCH 1/6] livepatch: Support scoped atomic replace using replace set

Song Liu <[email protected]>
Newsgroups org.kernel.vger.live-patching
Message-ID <CAPhsuW4OsPexwZE9EeffuDwndV_Oj-fcR5T-ZFFsBOuY1EkKnw@mail.gmail.com>
On Tue, May 26, 2026 at 3:35 AM Petr Mladek <[email protected]> wrote:
[...]
> > I wonder whether we should have "replace_set = 0" means no replace.
> > This will simplify the transition for users of the existing replace=false
> > option. I would like to hear other folks' thoughts on this.
>
> I would find this confusing. Also it would complicate the code.

Agreed with your assessment of the scenario.

> I always considered the "replace" and "no replace" mode as two
> separate worlds:
>
>     + people using many "no replace" livepatches

My only concern is that we are adding more burden to these users.
Before replace_set, they just use 0 for all the live patches. With
replace_set, they will have to use some mechanism to assign a
unique replace_set for each livepatch.

I don't know how many users are in this world. If there aren't many
users, we can ignore this case.

>     + people always using atomic replace

OTOH, these users don't need much change. They will just use
replace_set = 1 for all live patches.

Note that, I am not proposing to have replace_set = 1 to replace
all live patches. It only needs to replace other live patches with
replace_set = 1. The only change I am proposing (debating) here
is to have replace_set = 0 as "no replace". However, if this still
feels too confusing, or there are NOT many users in the "no
replace" world, we can safely ignore this.

Thanks,
Song
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.