Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1690161

Re: [PATCH] livepatch: add (un)patch hooks

From Miroslav Benes <mbenes@suse.cz>
Newsgroups linux.kernel
Subject Re: [PATCH] livepatch: add (un)patch hooks
Date 2017-07-18 13:20 +0200
Message-ID <u4yHM-1HH-17@gated-at.bofh.it> (permalink)
References <u2qEF-Q6-5@gated-at.bofh.it> <u2qEF-Q6-19@gated-at.bofh.it> <u2XTY-4Tk-5@gated-at.bofh.it> <u38Pp-413-45@gated-at.bofh.it> <u398K-48E-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> > > 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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] livepatch hooks, revisted Joe Lawrence <joe.lawrence@redhat.com> - 2017-07-12 16:20 +0200
  [PATCH] livepatch: add (un)patch hooks Joe Lawrence <joe.lawrence@redhat.com> - 2017-07-12 16:20 +0200
    Re: [PATCH] livepatch: add (un)patch hooks Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-14 03:50 +0200
      Re: [PATCH] livepatch: add (un)patch hooks Joe Lawrence <joe.lawrence@redhat.com> - 2017-07-14 15:30 +0200
        Re: [PATCH] livepatch: add (un)patch hooks Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-14 15:50 +0200
          Re: [PATCH] livepatch: add (un)patch hooks Miroslav Benes <mbenes@suse.cz> - 2017-07-18 13:20 +0200
      Re: [PATCH] livepatch: add (un)patch hooks Miroslav Benes <mbenes@suse.cz> - 2017-07-18 13:20 +0200
        Re: [PATCH] livepatch: add (un)patch hooks Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-19 04:10 +0200
          Re: [PATCH] livepatch: add (un)patch hooks Petr Mladek <pmladek@suse.com> - 2017-07-19 17:40 +0200
          Re: [PATCH] livepatch: add (un)patch hooks Miroslav Benes <mbenes@suse.cz> - 2017-07-19 21:20 +0200
    Re: [PATCH] livepatch: add (un)patch hooks Petr Mladek <pmladek@suse.com> - 2017-07-17 18:00 +0200
      Re: [PATCH] livepatch: add (un)patch hooks Joe Lawrence <joe.lawrence@redhat.com> - 2017-07-19 21:00 +0200
        Re: [PATCH] livepatch: add (un)patch hooks Petr Mladek <pmladek@suse.com> - 2017-07-20 16:40 +0200
      Re: [PATCH] livepatch: add (un)patch hooks Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-19 23:00 +0200
        Re: [PATCH] livepatch: add (un)patch hooks Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-20 06:20 +0200
          Re: [PATCH] livepatch: add (un)patch hooks Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-20 06:30 +0200
          Re: [PATCH] livepatch: add (un)patch hooks Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-20 06:40 +0200
          Re: [PATCH] livepatch: add (un)patch hooks Petr Mladek <pmladek@suse.com> - 2017-07-20 18:00 +0200
            Re: [PATCH] livepatch: add (un)patch hooks Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-20 19:10 +0200
          Re: [PATCH] livepatch: add (un)patch hooks Joe Lawrence <joe.lawrence@redhat.com> - 2017-07-27 22:50 +0200
            Re: [PATCH] livepatch: add (un)patch hooks Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-27 23:40 +0200
              Re: [PATCH] livepatch: add (un)patch hooks Joe Lawrence <joe.lawrence@redhat.com> - 2017-07-28 20:10 +0200
                Re: [PATCH] livepatch: add (un)patch hooks Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-28 20:30 +0200

csiph-web