17 Oct, 2020

1 commit

  • Fix multiple occurrences of duplicated words in kernel/.

    Fix one typo/spello on the same line as a duplicate word. Change one
    instance of "the the" to "that the". Otherwise just drop one of the
    repeated words.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Link: https://lkml.kernel.org/r/98202fa6-8919-ef63-9efe-c0fad5ca7af1@infradead.org
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

01 Nov, 2019

2 commits

  • The atomic replace runs pre/post (un)install callbacks only from the new
    livepatch. There are several reasons for this:

    + Simplicity: clear ordering of operations, no interactions between
    old and new callbacks.

    + Reliability: only new livepatch knows what changes can already be made
    by older livepatches and how to take over the state.

    + Testing: the atomic replace can be properly tested only when a newer
    livepatch is available. It might be too late to fix unwanted effect
    of callbacks from older livepatches.

    It might happen that an older change is not enough and the same system
    state has to be modified another way. Different changes need to get
    distinguished by a version number added to struct klp_state.

    The version can also be used to prevent loading incompatible livepatches.
    The check is done when the livepatch is enabled. The rules are:

    + Any completely new system state modification is allowed.

    + System state modifications with the same or higher version are allowed
    for already modified system states.

    + Cumulative livepatches must handle all system state modifications from
    already installed livepatches.

    + Non-cumulative livepatches are allowed to touch already modified
    system states.

    Link: http://lkml.kernel.org/r/20191030154313.13263-4-pmladek@suse.com
    To: Jiri Kosina
    Cc: Kamalesh Babulal
    Cc: Nicolai Stange
    Cc: live-patching@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Acked-by: Miroslav Benes
    Acked-by: Joe Lawrence
    Acked-by: Josh Poimboeuf
    Signed-off-by: Petr Mladek

    Petr Mladek
     
  • This is another step how to help maintaining more livepatches.

    One big help was the atomic replace and cumulative livepatches. These
    livepatches replace the already installed ones. Therefore it should
    be enough when each cumulative livepatch is consistent.

    The problems might come with shadow variables and callbacks. They might
    change the system behavior or state so that it is no longer safe to
    go back and use an older livepatch or the original kernel code. Also,
    a new livepatch must be able to detect changes which were made by
    the already installed livepatches.

    This is where the livepatch system state tracking gets useful. It
    allows to:

    - find whether a system state has already been modified by
    previous livepatches

    - store data needed to manipulate and restore the system state

    The information about the manipulated system states is stored in an
    array of struct klp_state. It can be searched by two new functions
    klp_get_state() and klp_get_prev_state().

    The dependencies are going to be solved by a version field added later.
    The only important information is that it will be allowed to modify
    the same state by more non-cumulative livepatches. It is similar
    to allowing to modify the same function several times. The livepatch
    author is responsible for preventing incompatible changes.

    Link: http://lkml.kernel.org/r/20191030154313.13263-3-pmladek@suse.com
    To: Jiri Kosina
    Cc: Kamalesh Babulal
    Cc: Nicolai Stange
    Cc: live-patching@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Acked-by: Miroslav Benes
    Acked-by: Joe Lawrence
    Acked-by: Josh Poimboeuf
    Signed-off-by: Petr Mladek

    Petr Mladek