[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.20.1707181306200.24826@pobox.suse.cz>
Date: Tue, 18 Jul 2017 13:10:50 +0200 (CEST)
From: Miroslav Benes <mbenes@...e.cz>
To: Josh Poimboeuf <jpoimboe@...hat.com>
cc: Joe Lawrence <joe.lawrence@...hat.com>,
live-patching@...r.kernel.org, linux-kernel@...r.kernel.org,
Jessica Yu <jeyu@...nel.org>, Jiri Kosina <jikos@...nel.org>,
Petr Mladek <pmladek@...e.com>,
Chris J Arges <chris.j.arges@...onical.com>
Subject: Re: [PATCH] livepatch: add (un)patch hooks
> > > For the enable case, I think it would be a nice feature if we checked
> > > the return code and aborted the patching operation on error. I think
> > > that should be easy enough.
> >
> > Yeah, that should be easy. To be specific, you're only talking about
> > the patching operation on the associated klp_object, not the entire
> > klp_patch right?
>
> Oh, right, I forgot about modules. We can't stop the module from
> loading, so forget that. Maybe the load hook should just return void.
We can. We can stop a patch module from being loaded if there is an error
coming from a hook, or we can stop a patched module (patch module is
loaded) from being loaded. The latter case is not very user-friendly. We
have force_load_module sysfs attribute for exactly these cases (if an
admin is sure he can safely do that). It is not nice though.
> > > For the unload case, it's too late to do anything, so I'd say a void
> > > return code would be better. Otherwise it implies that we actually do
> > > something about it. Maybe in that case we can leave it up to the user
> > > to decide whether to print an error or WARN() or whatever.
> >
> > Good point. I can change that in v2.
I agree with this point.
Miroslav
Powered by blists - more mailing lists