Skip to content

livepatch: Atomic replace feature

Petr Mladek lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest10 patches 48 repliesIn review
  2. v99 patches 0 repliesSuperseded
  3. v88 patches 14 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v77 patches8 repliesSuperseded

Patches in v10 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10livepatch: Use lists to manage patches, objects and functionsinclude/linux/livepatch.h kernel/livepatch/core.c+44 -21 reply
2/10livepatch: Free only structures with initialized kobjectkernel/livepatch/core.c+18 -262 replies
3/10livepatch: Initial support for dynamic structuresinclude/linux/livepatch.h kernel/livepatch/core.c+163 -152 replies
4/10livepatch: Allow to unpatch only functions of the given typekernel/livepatch/core.c kernel/livepatch/patch.c kernel/livepatch/patch.h +1 more+23 -110 replies
5/10livepatch: Support separate list for replaced patches.kernel/livepatch/core.c+24 -627 replies
6/10livepatch: Add atomic replaceinclude/linux/livepatch.h kernel/livepatch/core.c kernel/livepatch/core.h +1 more+206 -24 replies
7/10livepatch: Correctly handle atomic replace for not yet loaded moduleskernel/livepatch/core.c kernel/livepatch/patch.c+25 -41 reply
8/10livepatch: Improve dynamic struct klp_object detection and manipulationinclude/linux/livepatch.h kernel/livepatch/core.c+17 -10 replies
9/10livepatch: Allow to replace even disabled patcheskernel/livepatch/core.c+17 -70 replies
10/10livepatch: Atomic replace and cumulative patches documentationDocumentation/livepatch/cumulative-patches.txt+83 -00 replies

Reviews trailers per patch

7 of 10 patches have a Reviewed-by or Acked-by.

PatchMiroslav Benes
1/10A-b
2/10A-b
3/10A-b
4/10A-b
5/10A-b
6/10A-b
7/10
8/10
9/10
10/10A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v10 thread

Cover letter [PATCH v10 00/10] livepatch: Atomic replace feature

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.

Changes against v9:

+ Fixed check of valid NOPs for already loaded objects, regression introduced in v9 [Joe, Mirek]
+ Allow to replace even disabled patches [Evgenii]

Changes against v8:

+ Fixed handling of statically defined struct klp_object with empty array of functions [Joe, Mirek]
+ Removed redundant func->new_func assignment for NOPs [Mirek]
+ Improved some wording [Mirek]

Changes against v7:

+ Fixed handling of NOPs for not-yet-loaded modules
+ Made klp_replaced_patches list static [Mirek]
+ Made klp_free_object() public later [Mirek]
+ Fixed several reported typos [Mirek, Joe]
+ Updated documentation according to the feedback [Joe]
+ Added some Acks [Mirek]

Changes against v6:

+ used list_move when disabling replaced patches [Jason]
+ renamed KLP_FUNC_ORIGINAL -> KLP_FUNC_STATIC [Mirek]
+ used klp_is_func_type() in klp_unpatch_object() [Mirek]
+ moved static definition of klp_get_or_add_object() [Mirek]
+ updated comment about synchronization in forced mode [Mirek]
+ added user documentation
+ fixed several typos

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 (5):
livepatch: Free only structures with initialized kobject
livepatch: Correctly handle atomic replace for not yet loaded modules
livepatch: Improve dynamic struct klp_object detection and
manipulation
livepatch: Allow to replace even disabled patches
livepatch: Atomic replace and cumulative patches documentation

 Documentation/livepatch/cumulative-patches.txt |  83 +++++
 include/linux/livepatch.h                      |  65 +++-
 kernel/livepatch/core.c                        | 422 ++++++++++++++++++++++---
 kernel/livepatch/core.h                        |   4 +
 kernel/livepatch/patch.c                       |  31 +-
 kernel/livepatch/patch.h                       |   4 +-
 kernel/livepatch/transition.c                  |  41 ++-
 7 files changed, 598 insertions(+), 52 deletions(-)
 create mode 100644 Documentation/livepatch/cumulative-patches.txt
Signature · 1 line
2.13.6