PATCH v6 0/6] livepatch: Atomic replace feature

From: Petr Mladek
Date: Thu Jan 25 2018 - 11:02:19 EST


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


Jason Baron (5):
livepatch: Use lists to manage patches, objects and functions
livepatch: Initial support for dynamic structures
livepatch: Allow to unpatch only functions of the given type
livepatch: Support separate list for replaced patches.
livepatch: Add atomic replace

Petr Mladek (1):
livepatch: Free only structures with initialized kobject

include/linux/livepatch.h | 59 ++++++-
kernel/livepatch/core.c | 378 ++++++++++++++++++++++++++++++++++++++----
kernel/livepatch/core.h | 4 +
kernel/livepatch/patch.c | 29 +++-
kernel/livepatch/patch.h | 4 +-
kernel/livepatch/transition.c | 38 ++++-
6 files changed, 464 insertions(+), 48 deletions(-)

--
2.13.6