linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] livepatch: Atomic replace feature
@ 2018-03-23 12:00 Petr Mladek
  2018-03-23 12:00 ` [PATCH 1/8] livepatch: Use lists to manage patches, objects and functions Petr Mladek
                   ` (9 more replies)
  0 siblings, 10 replies; 21+ messages in thread
From: Petr Mladek @ 2018-03-23 12:00 UTC (permalink / raw)
  To: Jiri Kosina, Josh Poimboeuf, Miroslav Benes
  Cc: Jason Baron, Joe Lawrence, Jessica Yu, Evgenii Shatokhin,
	live-patching, linux-kernel, Petr Mladek

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 version is heavily refactored and cleaned based on feedback from Josh.
There are actually only three functional changes.

It still passes the first draft of the selfttest from Joe that can
be found at https://lkml.kernel.org/r/1520881024-29386-1-git-send-email-joe.lawrence@redhat.com


Changes against v10:

  + Bug fixes and functional changes:
    + Handle Nops in klp_ftrace_handled() to avoid infinite loop [Mirek]
    + Really add dynamically allocated klp_object into the list [Petr]
    + Clear patch->replace when transition finishes [Josh]

  + Refactoring and clean up [Josh]:
    + Replace enum types with bools
    + Avoid using ERR_PTR
    + Remove too paranoid warnings
    + Distinguish registered patches by a flag instead of a list
    + Squash some functions
    + Update comments, documentation, and commit messages
    + Squashed and split patches to do more controversial changes later

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 (3):
  livepatch: Use lists to manage patches, objects and functions
  livepatch: Add atomic replace
  livepatch: Remove replaced patches from the stack

Petr Mladek (5):
  livepatch: Free only structures with initialized kobject
  livepatch: Add an extra flag to distinguish registered patches
  livepatch: Remove Nop structures when unused
  livepatch: Allow to replace even disabled patches
  livepatch: Atomic replace and cumulative patches documentation

 Documentation/livepatch/cumulative-patches.txt | 105 ++++++++
 include/linux/livepatch.h                      |  33 ++-
 kernel/livepatch/core.c                        | 355 ++++++++++++++++++++++---
 kernel/livepatch/core.h                        |   4 +
 kernel/livepatch/patch.c                       |  39 ++-
 kernel/livepatch/patch.h                       |   1 +
 kernel/livepatch/transition.c                  |  27 ++
 7 files changed, 519 insertions(+), 45 deletions(-)
 create mode 100644 Documentation/livepatch/cumulative-patches.txt

-- 
2.13.6

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2018-04-10 17:53 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-23 12:00 [PATCH 0/8] livepatch: Atomic replace feature Petr Mladek
2018-03-23 12:00 ` [PATCH 1/8] livepatch: Use lists to manage patches, objects and functions Petr Mladek
2018-03-23 12:00 ` [PATCH 2/8] livepatch: Free only structures with initialized kobject Petr Mladek
2018-03-23 12:00 ` [PATCH 3/8] livepatch: Add atomic replace Petr Mladek
2018-04-06 22:05   ` Josh Poimboeuf
2018-04-09 13:53     ` Miroslav Benes
2018-04-10  9:31       ` Petr Mladek
2018-03-23 12:00 ` [PATCH 4/8] livepatch: Add an extra flag to distinguish registered patches Petr Mladek
2018-04-06 22:06   ` Josh Poimboeuf
2018-04-09 14:02   ` Miroslav Benes
2018-04-10 10:56     ` Petr Mladek
2018-04-10 17:53       ` Josh Poimboeuf
2018-03-23 12:00 ` [PATCH 5/8] livepatch: Remove replaced patches from the stack Petr Mladek
2018-03-23 12:00 ` [PATCH 6/8] livepatch: Remove Nop structures when unused Petr Mladek
2018-04-06 22:07   ` Josh Poimboeuf
2018-04-10  9:14   ` Miroslav Benes
2018-04-10 11:09     ` Petr Mladek
2018-03-23 12:00 ` [PATCH 7/8] livepatch: Allow to replace even disabled patches Petr Mladek
2018-03-23 12:00 ` [PATCH 8/8] livepatch: Atomic replace and cumulative patches documentation Petr Mladek
2018-03-23 14:54 ` [PATCH 0/8] livepatch: Atomic replace feature Petr Mladek
2018-04-06 22:10 ` Josh Poimboeuf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).