mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Lawrence <joe.lawrence@redhat.com>
To: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Josh Poimboeuf <jpoimboe@redhat.com>,
	Jessica Yu <jeyu@redhat.com>, Jiri Kosina <jikos@kernel.org>,
	Miroslav Benes <mbenes@suse.cz>, Petr Mladek <pmladek@suse.com>
Subject: [PATCH v3] livepatch: shadow variables
Date: Fri, 28 Jul 2017 13:25:21 -0400	[thread overview]
Message-ID: <1501262722-26502-1-git-send-email-joe.lawrence@redhat.com> (raw)

Hi all,

This is v3 of the livepatch shadow variable API.  v2 collected a bunch
of great feedback on terminology, use cases and concurrency notes which
I've tried to incorporate here.

Here's a high-level sketch of v2 changes:

- Overall
  
  - Squash into a one patch, makes for finding terms and code across
    docs/implementation/example easier
  
  - Variable naming:
    - obj, original data -> obj, parent object
    - num, numerical description of new data -> id, data identifier
    - new_data -> data
    - new_size -> size
  
- Documentation
  
  - API summary: s/klp_shadow_detach/klp_shadow_detach_all
  - describe uses for the data id (versions, class/type, etc)
  - clarify that shadow data is a copy
  - fix use-cases - use one upstream commit and steal Petr's example for
                    klp_shadow_get_or_attach()
  
- Implementation
  
  - Modify klp_shadow_get_or_attach() to WARN and return NULL if shadow
    variable already exists
  
  - Add klp_shadow_update_or_attach() to update if shadow variable already
    exists
  
  
- Sample modules
  
  - s/_thread/_work_func
  - use system workqueue, DECLARE_DELAYED_WORK
  - use XXX_PERIOD constants
  - overhaul usage/comments, drop the verbose dmesg logs

Joe Lawrence (1):
  livepatch: introduce shadow variable API

 Documentation/livepatch/shadow-vars.txt   | 217 +++++++++++++++++
 include/linux/livepatch.h                 |  10 +
 kernel/livepatch/Makefile                 |   2 +-
 kernel/livepatch/shadow.c                 | 383 ++++++++++++++++++++++++++++++
 samples/Kconfig                           |   5 +-
 samples/livepatch/Makefile                |   3 +
 samples/livepatch/livepatch-shadow-mod.c  | 222 +++++++++++++++++
 samples/livepatch/livepatch-shadow-fix1.c | 174 ++++++++++++++
 samples/livepatch/livepatch-shadow-fix2.c | 167 +++++++++++++
 9 files changed, 1179 insertions(+), 4 deletions(-)
 create mode 100644 Documentation/livepatch/shadow-vars.txt
 create mode 100644 kernel/livepatch/shadow.c
 create mode 100644 samples/livepatch/livepatch-shadow-mod.c
 create mode 100644 samples/livepatch/livepatch-shadow-fix1.c
 create mode 100644 samples/livepatch/livepatch-shadow-fix2.c

-- 
1.8.3.1

             reply	other threads:[~2017-07-28 17:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-28 17:25 Joe Lawrence [this message]
2017-07-28 17:25 ` [PATCH v3] livepatch: introduce shadow variable API Joe Lawrence
2017-08-10 14:40   ` Miroslav Benes
2017-08-10 16:04     ` Joe Lawrence
2017-08-11  6:27       ` Miroslav Benes
2017-08-11 16:35   ` Josh Poimboeuf
2017-08-14 13:56     ` Joe Lawrence

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=1501262722-26502-1-git-send-email-joe.lawrence@redhat.com \
    --to=joe.lawrence@redhat.com \
    --cc=jeyu@redhat.com \
    --cc=jikos@kernel.org \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=pmladek@suse.com \
    /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®