lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 12 Jul 2017 10:09:59 -0400
From:   Joe Lawrence <joe.lawrence@...hat.com>
To:     live-patching@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Josh Poimboeuf <jpoimboe@...hat.com>, Jessica Yu <jeyu@...nel.org>,
        Jiri Kosina <jikos@...nel.org>,
        Miroslav Benes <mbenes@...e.cz>,
        Petr Mladek <pmladek@...e.com>,
        Chris J Arges <chris.j.arges@...onical.com>
Subject: [PATCH] livepatch hooks, revisted

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ