linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] livepatch hooks, revisted
@ 2017-07-12 14:09 Joe Lawrence
  2017-07-12 14:10 ` [PATCH] livepatch: add (un)patch hooks Joe Lawrence
  0 siblings, 1 reply; 23+ messages in thread
From: Joe Lawrence @ 2017-07-12 14:09 UTC (permalink / raw)
  To: live-patching, linux-kernel
  Cc: Josh Poimboeuf, Jessica Yu, Jiri Kosina, Miroslav Benes,
	Petr Mladek, Chris J Arges

Hi all,

This patch revists the effort that Chris Argus made last year to port
kpatch-style "load hooks" to livepatch:

  https://lkml.org/lkml/2016/8/26/434

Since that discussion, the consistency model has been merged.

This patch locates the hooks in a slightly different place, providing
callbacks to a livepatch module whenever a klp_object is being patched
or unpatched.

A pointer to the current klp_object undergoing (un)patching is also
passed to the hook callback -- with that in hand, the hook
implementation can make decisions based on the current module state
(live, coming, going).

A new Documentation/ file is provided as well as a contrived sample
module and livepatch demo to demonstrate the callbacks.  The example is
about as simple as possible, but could be further embellished to
resemble a real-world livepatch fix if desired.

Thanks,

Joe Lawrence (1):
  livepatch: add (un)patch hooks

 Documentation/livepatch/hooks.txt        |  98 +++++++++++++++++++++++++
 include/linux/livepatch.h                |  32 ++++++++
 kernel/livepatch/core.c                  |   5 --
 kernel/livepatch/patch.c                 |  35 +++++++++
 samples/livepatch/Makefile               |   2 +
 samples/livepatch/livepatch-hooks-demo.c | 122 +++++++++++++++++++++++++++++++
 samples/livepatch/livepatch-hooks-mod.c  |  38 ++++++++++
 7 files changed, 327 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/livepatch/hooks.txt
 create mode 100644 samples/livepatch/livepatch-hooks-demo.c
 create mode 100644 samples/livepatch/livepatch-hooks-mod.c

-- 
1.8.3.1

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

end of thread, other threads:[~2017-07-28 18:29 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-12 14:09 [PATCH] livepatch hooks, revisted Joe Lawrence
2017-07-12 14:10 ` [PATCH] livepatch: add (un)patch hooks Joe Lawrence
2017-07-14  1:46   ` Josh Poimboeuf
2017-07-14 13:23     ` Joe Lawrence
2017-07-14 13:46       ` Josh Poimboeuf
2017-07-18 11:10         ` Miroslav Benes
2017-07-18 11:15     ` Miroslav Benes
2017-07-19  2:08       ` Josh Poimboeuf
2017-07-19 15:29         ` Petr Mladek
2017-07-19 19:11         ` Miroslav Benes
2017-07-17 15:51   ` Petr Mladek
2017-07-19 18:59     ` Joe Lawrence
2017-07-20 14:36       ` Petr Mladek
2017-07-19 20:49     ` Josh Poimboeuf
2017-07-20  4:17       ` Josh Poimboeuf
2017-07-20  4:20         ` Josh Poimboeuf
2017-07-20  4:30         ` Josh Poimboeuf
2017-07-20 15:50         ` Petr Mladek
2017-07-20 17:04           ` Josh Poimboeuf
2017-07-27 20:43         ` Joe Lawrence
2017-07-27 21:36           ` Josh Poimboeuf
2017-07-28 18:08             ` Joe Lawrence
2017-07-28 18:29               ` 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).