mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: live-patching@vger.kernel.org
Cc: jpoimboe@redhat.com, sjenning@redhat.com, jkosina@suse.cz,
	vojtech@suse.cz, mingo@redhat.com, linux-kernel@vger.kernel.org,
	Jiri Slaby <jslaby@suse.cz>
Subject: [RFC kgr on klp 0/9] kGraft on the top of KLP
Date: Mon,  4 May 2015 14:20:09 +0200	[thread overview]
Message-ID: <1430742009-5895-1-git-send-email-jslaby@suse.cz> (raw)
In-Reply-To: <1430739625-4658-1-git-send-email-jslaby@suse.cz>

Hello,

this is a patchset which teaches the Kernel Live Patching to be
consistent when patching with the use of the kGraft approach [1].
Besides helpers, the set adds support for consistency models,
implements the kGraft consistency model, and finally allows for
sending signals to complete the patching process quickly (but still
safely).

Currently we have only two consistency models:
* none
* kGraft

None is the one which was present before the patchset and that one
indeed guarantees no consistency at all. LEAVE_FUNCTION and
SWITCH_FUNCTION as was described earlier [2]. kGraft is based on the
well-known RCU principle and every process is converted to the patched
world on its own, safely. kGraft is LEAVE_KERNEL and SWITCH_THREAD.

Signal "broadcasting" is added in the last patch of the series and is
based on the previous public discussions [3].

As usual, see the respective patches for more details about a
particular patch.

Since the KLP supports x86_64 and s390 currently, the same holds for
this patchset. It was tested on both of these arch's.

Thanks go to Petr Mladek, Mirek Benes, Jiri Kosina, and others, who
worked hard to improved the set much. 

[1] https://lkml.org/lkml/2014/6/25/284
[2] https://lkml.org/lkml/2014/11/7/354
[3] https://lkml.org/lkml/2015/2/21/119

Jiri Slaby (7):
  livepatch: introduce patch/func-walking helpers
  livepatch: add klp_*_to_patch helpers
  livepatch: add kgr infrastructure
  livepatch: teach klp about consistency models
  livepatch: do not allow failure while really patching
  livepatch: propagate the patch status to functions
  livepatch: add kgraft-like patching

Miroslav Benes (2):
  livepatch: make kobject in klp_object statically allocated
  livepatch: send a fake signal to all tasks

 arch/s390/include/asm/thread_info.h  |   2 +
 arch/s390/kernel/Makefile            |   1 +
 arch/s390/kernel/entry.S             |  11 ++
 arch/s390/kernel/livepatch.c         |  14 ++
 arch/x86/include/asm/thread_info.h   |  11 +-
 arch/x86/kernel/ptrace.c             |   7 +
 arch/x86/kernel/signal.c             |   5 +
 fs/proc/base.c                       |  14 ++
 include/linux/livepatch.h            |  81 +++++++++-
 include/linux/sched.h                |  28 ++++
 kernel/livepatch/Makefile            |   2 +-
 kernel/livepatch/cmodel-kgraft.c     | 204 +++++++++++++++++++++++++
 kernel/livepatch/cmodel-simple.c     |  39 +++++
 kernel/livepatch/core.c              | 284 +++++++++++++++++++++++++++--------
 kernel/signal.c                      |   3 +-
 samples/livepatch/livepatch-sample.c |   1 +
 16 files changed, 638 insertions(+), 69 deletions(-)
 create mode 100644 arch/s390/kernel/livepatch.c
 create mode 100644 kernel/livepatch/cmodel-kgraft.c
 create mode 100644 kernel/livepatch/cmodel-simple.c

-- 
2.3.5


  parent reply	other threads:[~2015-05-04 12:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-04 11:40 [RFC kgr on klp 1/9] livepatch: make kobject in klp_object statically allocated Jiri Slaby
2015-05-04 11:40 ` [RFC kgr on klp 2/9] livepatch: introduce patch/func-walking helpers Jiri Slaby
2015-05-04 11:40 ` [RFC kgr on klp 3/9] livepatch: add klp_*_to_patch helpers Jiri Slaby
2015-05-04 11:40 ` [RFC kgr on klp 4/9] livepatch: add kgr infrastructure Jiri Slaby
2015-05-04 12:23   ` Martin Schwidefsky
2015-05-05 13:27     ` Jiri Slaby
2015-05-05 14:34       ` Martin Schwidefsky
2015-05-04 11:40 ` [RFC kgr on klp 5/9] livepatch: teach klp about consistency models Jiri Slaby
2015-05-04 11:40 ` [RFC kgr on klp 6/9] livepatch: do not allow failure while really patching Jiri Slaby
2015-05-04 11:40 ` [RFC kgr on klp 7/9] livepatch: propagate the patch status to functions Jiri Slaby
2015-05-04 11:40 ` [RFC kgr on klp 8/9] livepatch: add kgraft-like patching Jiri Slaby
2015-05-04 11:40 ` [RFC kgr on klp 9/9] livepatch: send a fake signal to all tasks Jiri Slaby
2015-05-04 14:34   ` Oleg Nesterov
2015-05-06 12:58     ` Miroslav Benes
2015-05-04 12:20 ` Jiri Slaby [this message]
2015-05-04 15:44   ` [RFC kgr on klp 0/9] kGraft on the top of KLP Josh Poimboeuf
2015-05-04 22:48     ` Jiri Kosina
2015-05-05  3:43       ` Josh Poimboeuf
2015-05-05  6:14         ` Jiri Kosina
2015-05-05 16:24           ` Josh Poimboeuf
2015-05-12  9:45             ` Jiri Kosina
2015-05-12 15:20               ` Josh Poimboeuf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1430742009-5895-1-git-send-email-jslaby@suse.cz \
    --to=jslaby@suse.cz \
    --cc=jkosina@suse.cz \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=sjenning@redhat.com \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®