From: Miroslav Benes <mbenes@suse.cz>
To: Joe Lawrence <joe.lawrence@redhat.com>
Cc: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org,
Josh Poimboeuf <jpoimboe@redhat.com>,
Jessica Yu <jeyu@kernel.org>, Jiri Kosina <jikos@kernel.org>,
Petr Mladek <pmladek@suse.com>, Jason Baron <jbaron@akamai.com>,
Evgenii Shatokhin <eshatokhin@virtuozzo.com>
Subject: Re: [PATCH v0 1/3] livepatch: add sample cumulative patch
Date: Tue, 27 Feb 2018 12:37:39 +0100 (CET) [thread overview]
Message-ID: <alpine.LSU.2.21.1802271129310.19255@pobox.suse.cz> (raw)
In-Reply-To: <1519421630-12025-2-git-send-email-joe.lawrence@redhat.com>
Hi,
On Fri, 23 Feb 2018, Joe Lawrence wrote:
> Add a simple atomic replace / cumulative livepatch example.
It's not a cumulative patch, so I'd stick with an atomic replace example.
The same applies to the subject, module name and also the comments.
> Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
> ---
> samples/livepatch/Makefile | 1 +
> samples/livepatch/livepatch-cumulative.c | 216 +++++++++++++++++++++++++++++++
> 2 files changed, 217 insertions(+)
> create mode 100644 samples/livepatch/livepatch-cumulative.c
>
> diff --git a/samples/livepatch/Makefile b/samples/livepatch/Makefile
> index 2472ce39a18d..dd0e2a8af1af 100644
> --- a/samples/livepatch/Makefile
> +++ b/samples/livepatch/Makefile
> @@ -5,3 +5,4 @@ obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch-shadow-fix2.o
> obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch-callbacks-demo.o
> obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch-callbacks-mod.o
> obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch-callbacks-busymod.o
> +obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch-cumulative.o
> diff --git a/samples/livepatch/livepatch-cumulative.c b/samples/livepatch/livepatch-cumulative.c
> new file mode 100644
> index 000000000000..ab036439e08c
> --- /dev/null
> +++ b/samples/livepatch/livepatch-cumulative.c
> @@ -0,0 +1,216 @@
> +/*
> + * Copyright (C) 2018 Joe Lawrence <joe.lawrence@redhat.com>
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, see <http://www.gnu.org/licenses/>.
> + */
> +
> +/*
> + * livepatch-callbacks-cumulative.c - atomic replace / cumulative livepatch demo
> + *
> + *
> + * Purpose
> + * -------
> + *
> + * Demonstration of atomic replace / cumulative livepatching.
> + *
> + *
> + * Usage
> + * -----
> + *
> + * Step 1 - Load the sample livepatch demo
> + *
> + * insmod samples/livepatch/livepatch-sample.ko
> + *
> + * Notice that /proc/cmdline was modified by the patch. For the moment,
> + * /proc/meminfo remains unmodified.
> + *
> + * head /proc/cmdline /proc/meminfo
> + * ==> /proc/cmdline <==
> + * this has been live patched
Could you add the module names to the messages in livepatch-sample.c and
here in the new sample module? It'd be clear what came from where then.
Otherwise it looks good.
Regards,
Miroslav
next prev parent reply other threads:[~2018-02-27 11:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-23 21:33 [PATCH v0 0/3] additional cumulative livepatch doc/samples Joe Lawrence
2018-02-23 21:33 ` [PATCH v0 1/3] livepatch: add sample cumulative patch Joe Lawrence
2018-02-25 1:38 ` Philippe Ombredanne
2018-02-27 11:54 ` Miroslav Benes
2018-03-02 1:19 ` Philippe Ombredanne
2018-03-02 8:31 ` Greg Kroah-Hartman
2018-03-02 9:11 ` Miroslav Benes
2018-02-27 11:37 ` Miroslav Benes [this message]
2018-02-23 21:33 ` [PATCH v0 2/3] livepatch: update documentation/samples for callbacks Joe Lawrence
2018-02-27 12:36 ` Miroslav Benes
2018-02-27 14:58 ` Joe Lawrence
2018-02-28 13:20 ` Miroslav Benes
2018-03-02 11:11 ` Petr Mladek
2018-03-02 22:08 ` Joe Lawrence
2018-02-23 21:33 ` [PATCH v0 3/3] livepatch: update documentation for shadow variables Joe Lawrence
2018-03-02 11:58 ` Petr Mladek
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=alpine.LSU.2.21.1802271129310.19255@pobox.suse.cz \
--to=mbenes@suse.cz \
--cc=eshatokhin@virtuozzo.com \
--cc=jbaron@akamai.com \
--cc=jeyu@kernel.org \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--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®