Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1470953

[RFC][PATCH] Load/Unload Hooks for Livepatch

From Chris J Arges <chris.j.arges@canonical.com>
Newsgroups linux.kernel
Subject [RFC][PATCH] Load/Unload Hooks for Livepatch
Date 2016-08-26 21:00 +0200
Message-ID <sauw9-2lJ-13@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[RFC][PATCH] Load/Unload Hooks for Livepatch Chris J Arges <chris.j.arges@canonical.com> - 2016-08-26 21:00 +0200

csiph-web