From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Jiri Kosina <jikos@kernel.org>, Miroslav Benes <mbenes@suse.cz>,
Jason Baron <jbaron@akamai.com>,
Joe Lawrence <joe.lawrence@redhat.com>,
Jessica Yu <jeyu@kernel.org>,
Evgenii Shatokhin <eshatokhin@virtuozzo.com>,
live-patching@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/8] livepatch: Add atomic replace
Date: Fri, 6 Apr 2018 17:05:30 -0500 [thread overview]
Message-ID: <20180406220530.snglx7m3quye34wp@treble> (raw)
In-Reply-To: <20180323120028.31451-4-pmladek@suse.com>
On Fri, Mar 23, 2018 at 01:00:23PM +0100, Petr Mladek wrote:
> @@ -687,7 +858,14 @@ static void klp_free_patch(struct klp_patch *patch)
>
> static int klp_init_func(struct klp_object *obj, struct klp_func *func)
> {
> - if (!func->old_name || !func->new_func)
> + if (!func->old_name)
> + return -EINVAL;
> +
> + /*
> + * NOPs get the address later. The the patched module must be loaded,
"The the" -> "the"
> + * see klp_init_object_loaded().
> + */
> + if (!func->new_func && !func->nop)
> return -EINVAL;
>
> INIT_LIST_HEAD(&func->stack_node);
> @@ -742,6 +920,9 @@ static int klp_init_object_loaded(struct klp_patch *patch,
> return -ENOENT;
> }
>
> + if (func->nop)
> + func->new_func = (void *)func->old_addr;
> +
These changes make it more obvious that 'new_func' isn't quite the right
name. It should really be 'new_addr' IMO.
--
Josh
next prev parent reply other threads:[~2018-04-06 22:05 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-23 12:00 [PATCH 0/8] livepatch: Atomic replace feature Petr Mladek
2018-03-23 12:00 ` [PATCH 1/8] livepatch: Use lists to manage patches, objects and functions Petr Mladek
2018-03-23 12:00 ` [PATCH 2/8] livepatch: Free only structures with initialized kobject Petr Mladek
2018-03-23 12:00 ` [PATCH 3/8] livepatch: Add atomic replace Petr Mladek
2018-04-06 22:05 ` Josh Poimboeuf [this message]
2018-04-09 13:53 ` Miroslav Benes
2018-04-10 9:31 ` Petr Mladek
2018-03-23 12:00 ` [PATCH 4/8] livepatch: Add an extra flag to distinguish registered patches Petr Mladek
2018-04-06 22:06 ` Josh Poimboeuf
2018-04-09 14:02 ` Miroslav Benes
2018-04-10 10:56 ` Petr Mladek
2018-04-10 17:53 ` Josh Poimboeuf
2018-03-23 12:00 ` [PATCH 5/8] livepatch: Remove replaced patches from the stack Petr Mladek
2018-03-23 12:00 ` [PATCH 6/8] livepatch: Remove Nop structures when unused Petr Mladek
2018-04-06 22:07 ` Josh Poimboeuf
2018-04-10 9:14 ` Miroslav Benes
2018-04-10 11:09 ` Petr Mladek
2018-03-23 12:00 ` [PATCH 7/8] livepatch: Allow to replace even disabled patches Petr Mladek
2018-03-23 12:00 ` [PATCH 8/8] livepatch: Atomic replace and cumulative patches documentation Petr Mladek
2018-03-23 14:54 ` [PATCH 0/8] livepatch: Atomic replace feature Petr Mladek
2018-04-06 22:10 ` Josh Poimboeuf
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=20180406220530.snglx7m3quye34wp@treble \
--to=jpoimboe@redhat.com \
--cc=eshatokhin@virtuozzo.com \
--cc=jbaron@akamai.com \
--cc=jeyu@kernel.org \
--cc=jikos@kernel.org \
--cc=joe.lawrence@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®