Re: Replace rules: was: Re: [PATCH v7 for-next 3/8] livepatch: Implement replace set for scoped atomic replace

From
Miroslav Benes <mbenes@suse.cz>
Date
2026-09-09 12:32:15
Reply to
Petr Mladek, 2026-09-03
quoted
quoted
But '0' is special. It obsoletes anything. Maybe, we could
make it even more special and say that it can't obsoleted.
Then we would be able to use it as the trailing element
in the array...

I do not have strong opinion about this. It is just an idea.
Making '0' special is good for backward compatibility, but it
complicates usage for users. Therefore, I prefer not to treat '0' as a
special case.
Ah, I have missed that the current code does not treat '0' special.
I was confused by the following sentence in the commit message:

<paste>
  By default (provides=0), any livepatch replaces any other livepatch.
</paste>

and this paragraph in the documentation:

<paste>
 It should be emphasized that the preferred and most secure way is to always use
 the default ``provides = 0``. In this mode, any livepatch replaces any other
 livepatch, preventing any unexpected interactions between incompatible
 livepatches.
</paste>

I understood it the way that ``provides = 0`` was supposed to be
special and always replace all other livepatches.

I think that I was affected by Miroslav. I had an off-list discussion
with him about this some time ago. My understanding is that Miroslav
would prefer to somehow preserve the original ``replace = true``
when the livepatch patch replaced anything.

It might be useful for OS providers who want to make sure that their
kernel critical fixes can be installed on the user system. Otherwise,
customers might complain that some update failed, ...

Of course, it has a drawback that any livepatch with ``prov ides= 0``
would wipe any 3rd party livepatches, even when they are against 3rd
party modules.
My intention was not to regress and disallow a use case which is currently 
supported. That is to replace everything applied no matter what.

If I take my SUSE hat on, I think we can happily live with provides being 
set to a random number and be done with it. A customer with their own live 
patches applied is on their own anyway so we can ignore it.

[ changing hats ]

So I only wanted to preserve the behaviour for a potential user out there 
relying on it. Maybe not worth it if it complicates the implementation. It 
can be emulated using provides/obsoletes and the fact that a 
user/admin/distributor should have their systems under control. If not, it 
can lead to weird states anyway (yes, I still think that allowing 
different parties to livepatch the same fleet is a call for trouble :)).

Miroslav
Thread (53 messages) 53 messages, 6 authors, last reply 2026-09-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help