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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1606011339310.9734@pobox.suse.cz>
Date:	Wed, 1 Jun 2016 13:43:15 +0200 (CEST)
From:	Miroslav Benes <mbenes@...e.cz>
To:	Christopher Arges <chris.j.arges@...onical.com>
cc:	jpoimboe@...hat.com, jeyu@...hat.com, jikos@...nel.org,
	pmladek@...e.com, jslaby@...e.cz, live-patching@...r.kernel.org,
	linux-kernel@...r.kernel.org, huawei.libin@...wei.com,
	minfei.huang@...oo.com
Subject: Re: [PATCH v2] livepatch: allow removal of a disabled patch

On Wed, 1 Jun 2016, Christopher Arges wrote:

> On Wed, Jun 01, 2016 at 10:31:59AM +0200, Miroslav Benes wrote:
> >
> > diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c
> > index 92819bb0961b..6cc49d253195 100644
> > --- a/kernel/livepatch/transition.c
> > +++ b/kernel/livepatch/transition.c
> > @@ -197,13 +197,21 @@ void klp_complete_transition(void)
> >  	struct klp_func *func;
> >  	struct task_struct *g, *task;
> >  	unsigned int cpu;
> > +	bool is_immediate = false;
> >  
> >  	if (klp_transition_patch->immediate)
> >  		goto done;
> >  
> > -	klp_for_each_object(klp_transition_patch, obj)
> > -		klp_for_each_func(obj, func)
> > +	klp_for_each_object(klp_transition_patch, obj) {
> > +		klp_for_each_func(obj, func) {
> >  			func->transition = false;
> > +			if (func->immediate)
> > +				is_immediate = true;
> 
> Once an immediate function is found you could return from this function since
> releasing a reference from the livepatch module is no longer possible.

That is true, but I think we should tidy up after the patching process 
even in this case. That is clear all func->transition, task->patch_state 
and task->TIF_PATCH_PENDING flags. These all could be set if 
patch->immediate is false and one of the func->immediate is true.

Regards,
Miroslav

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ