Re: PATCH v6 0/6] livepatch: Atomic replace feature

From: Miroslav Benes
Date: Thu Feb 01 2018 - 08:49:27 EST


On Thu, 25 Jan 2018, Petr Mladek wrote:

> Hi,
>
> the atomic replace allows to create cumulative patches. They
> are useful when you maintain many livepatches and want to remove
> one that is lower on the stack. In addition it is very useful when
> more patches touch the same function and there are dependencies
> between them.
>
> This is my rework based on Jason's v5 patchset[1]. My intention was:
>
> + reduce code duplication and nop-specific shortcuts
> + split the huge patch for an easier review
> + simplify the logic where possible
> + add/update/clear comments
> + better fit into the existing code
>
> I am not supper happy with the result. But it took me much longer
> time than expected. It is high time, I shared the current state
> and get some feedback.
>
>
> Jason,
>
> I used your code in most of the patches and kept you as the author.
> Please, let me know if you would prefer another solution.
>
> Also I am sorry that I have done it this way. I was not able to
> suggest it out of head. I needed many iterations to end up with
> the current state. I needed to play with the code. Therefore
> it made sense to send what I got.
>
>
> [1] https://lkml.kernel.org/r/cover.1515786085.git.jbaron@xxxxxxxxxx

Hi,

the series looks good to me (apart from the mentioned bugs and a couple
of nits). I'll port my old kGraft testing modules and hopefully it will
survive.

Well, one more thing. I think there is a problem with shadow variables.
Similar to callbacks situation. Shadow variables cannot be destroyed the
way it is shown in our samples. Cumulative patches want to preserve
everything as much as possible. If I'm right, it should be mentioned in
the documentation.

Miroslav