From: Minfei Huang <mnfhuang@gmail.com>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Miroslav Benes <mbenes@suse.cz>, Minfei Huang <mhuang@redhat.com>,
jpoimboe@redhat.com, sjenning@redhat.com,
Vojtech Pavlik <vojtech@suse.cz>,
live-patching@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] livepatch: Prevent to enable uninitialized patch
Date: Tue, 12 May 2015 15:24:19 +0800 [thread overview]
Message-ID: <20150512072419.GA41877@dhcp-129-218.nay.redhat.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1505120047180.8186@pobox.suse.cz>
On 05/12/15 at 12:49P, Jiri Kosina wrote:
> On Mon, 11 May 2015, Minfei Huang wrote:
>
> > 1) Patched a patch to fix the issue for module A.
> > 2) livepatch will try to enable the patch, while the corresponding
> > module is loaded ( call klp_module_notify_coming )
> > 3) Firstly, livepatch will do the instruction "obj->mod = mod", whatever
> > the result of klp_module_notify_coming is.
> > 4) livepatch may fail to call the klp_init_object_loaded or
> > klp_enable_object
> > 5) klp_module_notify_coming returns
> >
> > 6) For the userspace, we can enable the patch again ( disable the patch
> > firstly, then enable the patch from the sysfs )
> > 7) In order to enable the patch, livepatch will call __klp_enable_patch
> > 8) we can pass the limitation (klp_is_object_loaded), because the value
> > of obj->mod is not NULL ( the obj->mod obtains the value from the step 3 )
> > 9) the patch may be applied, although the patch is not initialized, if
> > the value of func->old_addr is not NULL
> >
> > From the above description, we can see the uninitialized patch ( the
> > patch should be initialized by the klp_init_object_loaded in general )
> > can be applied to the kernel.
>
> This indeed looks like a valid breakage scenario.
>
> Could you please resend v2 of this patch with much more detailed
> description in the changelog? (i.e. some reformulated variation on the
> text above). Your original submission didn't describe the problem your
> patch is fixing at all.
>
> Thanks,
Thanks for your review. I will repost a new patch.
Thanks
Minfei
>
> --
> Jiri Kosina
> SUSE Labs
next prev parent reply other threads:[~2015-05-12 7:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-11 2:57 Minfei Huang
2015-05-11 12:02 ` Miroslav Benes
2015-05-11 12:55 ` Minfei Huang
2015-05-11 22:49 ` Jiri Kosina
2015-05-12 7:24 ` Minfei Huang [this message]
2015-05-12 8:25 ` Miroslav Benes
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=20150512072419.GA41877@dhcp-129-218.nay.redhat.com \
--to=mnfhuang@gmail.com \
--cc=jkosina@suse.cz \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=mhuang@redhat.com \
--cc=sjenning@redhat.com \
--cc=vojtech@suse.cz \
/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®