lkml.org 
[lkml]   [2016]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: livepatch: Implement separate coming and going module notifiers
On Fri, 29 Jan 2016 15:04:51 -0500
Jessica Yu <jeyu@redhat.com> wrote:

> >diff --git a/kernel/module.c b/kernel/module.c
> >index 8358f46..aeabd81 100644
> >--- a/kernel/module.c
> >+++ b/kernel/module.c
> >@@ -3371,6 +3371,13 @@ static int complete_formation(struct module *mod, struct load_info *info)
> > mod->state = MODULE_STATE_COMING;
> > mutex_unlock(&module_mutex);
> >
> >+ ftrace_module_enable(mod);
> >+ err = klp_module_enable(mod);
> >+ if (err) {
> >+ ftrace_release_mod(mod);
> >+ return err;
> >+ }
>
> If we go this route, should we should print a big warning ("Livepatch
> couldn't patch loading module X") instead of aborting the module load
> completely?

If anything, that should be done in klp_module_enable() not in the
module code.

-- Steve


\
 
 \ /
  Last update: 2016-01-29 21:21    [W:1.309 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site