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]
Message-ID: <CAKoi8FLePnSh+gpYw8GuUTiUiCOAvPdauK7-0TRgQXGUmm1HjQ@mail.gmail.com>
Date:	Wed, 1 Apr 2015 22:00:15 +0800
From:	Minfei Huang <mnfhuang@...il.com>
To:	jpoimboe@...hat.com, sjenning@...hat.com, jkosina@...e.cz,
	vojtech@...e.cz
Cc:	live-patching@...r.kernel.org, linux-kernel@...r.kernel.org,
	Minfei Huang <mnfhuang@...il.com>
Subject: Re: [PATCH] livepatch: Enhance livepatch to support remove patch
 module dynamically

2015-04-01 21:35 GMT+08:00 Jiri Kosina <jkosina@...e.cz>:
>
> On Wed, 1 Apr 2015, Minfei Huang wrote:
> >
> > Sorry, Use the gmail account to resend this patch, because the yahoo account cannt receive the maillist.
> >
> > ----
> >
> > As mentioned in the annotation, the patch module would not permit to
> > be removed once it is loaded.
> >
> > Kernel may crash in the case that the function in the patch module is
> > called during removing.
> >
> > We will increase the module reference when the patch module is enable,
> > so that the module cannt be removed. Once the module is disable, it will
> > be removed.
> >
> > Signed-off-by: Minfei Huang <mnfhuang@...il.com>
> > ---
> >  kernel/livepatch/core.c | 47 +++++++++++++++++++++++++++++++----------------
> >  1 file changed, 31 insertions(+), 16 deletions(-)
> >
> > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
> > index 3f9f1d6..0266950 100644
> > --- a/kernel/livepatch/core.c
> > +++ b/kernel/livepatch/core.c
> > @@ -502,6 +502,17 @@ static int __klp_disable_patch(struct klp_patch *patch)
> >       return 0;
> >  }
> >
> > +static int __klp_disable_patch_nolock(struct klp_patch *patch)
> > +{
> > +     int ret = 0;
> > +
> > +     ret = __klp_disable_patch(patch);
> > +     if (ret)
> > +             return ret;
> > +     module_put(patch->mod);
> > +     return ret;
> > +}
> > +
>
> Your patch doesn't solve the problem at all.
>
> There is no guarantee that once __klp_disable_patch() returns noone is
> using the old code any more.
>

Yes, thanks.

The __klp_disable_patch only guarantees that we will never call the
function in patch module. For now, patch module can never be removed
from the kernel once it was loaded. It may be inconvenience if we want
re-load a new patch module replace the old patch module.

Thanks
Minfei

> --
> Jiri Kosina
> SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ