On Tue, Jun 11, 2024 at 1:19 AM Song Liu <song@xxxxxxxxxx> wrote: > > Hi Yafang, > > On Sun, Jun 9, 2024 at 6:33 PM Yafang Shao <laoar.shao@xxxxxxxxx> 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 -- Regards Yafang