linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH] Load/Unload Hooks for Livepatch
@ 2016-08-26 18:50 Chris J Arges
  2016-08-26 18:50 ` [PATCH] livepatch: add load/unload hooks to objects Chris J Arges
  0 siblings, 1 reply; 8+ messages in thread
From: Chris J Arges @ 2016-08-26 18:50 UTC (permalink / raw)
  To: live-patching
  Cc: Chris J Arges, Josh Poimboeuf, Jessica Yu, Jiri Kosina,
	Miroslav Benes, Petr Mladek, linux-kernel

Load/unload hooks will be useful to have when applying livepatches. Today
one can create hooks by writing code in the livepatch init/exit functions
and properly setting up module notifier callbacks to handle various cases.
This can be error prone and unwieldy as we have the proper mechanisms
already in the livepatch proper code.

I've tested this code with some sample livepatch code that exercised the
following:
  - works with single/multiple hooks for both load/unload
  - works if load_hooks/unload_hooks are NULL
  - works if individual hooks are NULL
  - handles bad return values from hooks
  - handles properly when inserting/removing dependent modules
  - can handle load_hook for vmlinux as well

The idea of these hooks are based off of the kpatch project.

Chris J Arges (1):
  livepatch: add load/unload hooks to objects

 include/linux/livepatch.h | 33 +++++++++++++++++++++++++++------
 kernel/livepatch/core.c   | 29 +++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+), 6 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2016-08-30 15:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-26 18:50 [RFC][PATCH] Load/Unload Hooks for Livepatch Chris J Arges
2016-08-26 18:50 ` [PATCH] livepatch: add load/unload hooks to objects Chris J Arges
2016-08-29 15:23   ` Petr Mladek
2016-08-29 16:16     ` Christopher Arges
2016-08-30  9:41       ` Jiri Kosina
2016-08-30 12:52         ` Christopher Arges
2016-08-30 14:43       ` Petr Mladek
2016-08-30 15:15         ` Christopher Arges

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).