Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1304950
| From | Jessica Yu <jeyu@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC PATCH v3 3/6] module: s390: keep mod_arch_specific for livepatch modules |
| Date | 2016-01-08 20:30 +0100 |
| Message-ID | <qOKTx-2Pp-31@gated-at.bofh.it> (permalink) |
| References | <qOKTv-2Pp-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Livepatch needs to utilize the symbol information contained in the
mod_arch_specific struct in order to be able to call the s390
apply_relocate_add() function to apply relocations. Keep a reference to
syminfo if the module is a livepatch module. Remove the redundant vfree()
in module_finalize() since module_arch_freeing_init() (which also frees
those structures) is called in do_init_module(). If the module isn't a
livepatch module, we free the structures in module_arch_freeing_init() as
usual.
Signed-off-by: Jessica Yu <jeyu@redhat.com>
---
arch/s390/kernel/module.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c
index 7873e17..fbc0789 100644
--- a/arch/s390/kernel/module.c
+++ b/arch/s390/kernel/module.c
@@ -51,6 +51,10 @@ void *module_alloc(unsigned long size)
void module_arch_freeing_init(struct module *mod)
{
+ if (is_livepatch_module(mod) &&
+ mod->state == MODULE_STATE_LIVE)
+ return;
+
vfree(mod->arch.syminfo);
mod->arch.syminfo = NULL;
}
@@ -425,7 +429,5 @@ int module_finalize(const Elf_Ehdr *hdr,
struct module *me)
{
jump_label_apply_nops(me);
- vfree(me->arch.syminfo);
- me->arch.syminfo = NULL;
return 0;
}
--
2.4.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH v3 0/6] (mostly) Arch-independent livepatch Jessica Yu <jeyu@redhat.com> - 2016-01-08 20:30 +0100
[RFC PATCH v3 1/6] Elf: add livepatch-specific Elf constants Jessica Yu <jeyu@redhat.com> - 2016-01-08 20:30 +0100
[RFC PATCH v3 3/6] module: s390: keep mod_arch_specific for livepatch modules Jessica Yu <jeyu@redhat.com> - 2016-01-08 20:30 +0100
[RFC PATCH v3 5/6] samples: livepatch: mark as livepatch module Jessica Yu <jeyu@redhat.com> - 2016-01-08 20:30 +0100
[RFC PATCH v3 4/6] livepatch: reuse module loader code to write relocations Jessica Yu <jeyu@redhat.com> - 2016-01-08 20:40 +0100
Re: [RFC PATCH v3 4/6] livepatch: reuse module loader code to write relocations Petr Mladek <pmladek@suse.com> - 2016-01-11 18:00 +0100
Re: [RFC PATCH v3 4/6] livepatch: reuse module loader code to write relocations Josh Poimboeuf <jpoimboe@redhat.com> - 2016-01-11 22:00 +0100
Re: [RFC PATCH v3 4/6] livepatch: reuse module loader code to write relocations Josh Poimboeuf <jpoimboe@redhat.com> - 2016-01-11 22:40 +0100
Re: livepatch: reuse module loader code to write relocations Jessica Yu <jeyu@redhat.com> - 2016-01-11 23:40 +0100
Re: livepatch: reuse module loader code to write relocations Josh Poimboeuf <jpoimboe@redhat.com> - 2016-01-12 04:10 +0100
Re: livepatch: reuse module loader code to write relocations Petr Mladek <pmladek@suse.com> - 2016-01-12 10:20 +0100
Re: livepatch: reuse module loader code to write relocations Jessica Yu <jeyu@redhat.com> - 2016-01-14 06:10 +0100
Re: [RFC PATCH v3 4/6] livepatch: reuse module loader code to write relocations Miroslav Benes <mbenes@suse.cz> - 2016-01-12 17:50 +0100
Re: livepatch: reuse module loader code to write relocations Jessica Yu <jeyu@redhat.com> - 2016-01-14 05:00 +0100
Re: livepatch: reuse module loader code to write relocations Miroslav Benes <mbenes@suse.cz> - 2016-01-14 10:10 +0100
Re: [RFC PATCH v3 4/6] livepatch: reuse module loader code to write relocations Miroslav Benes <mbenes@suse.cz> - 2016-01-13 10:20 +0100
Re: [RFC PATCH v3 4/6] livepatch: reuse module loader code to write relocations Jiri Kosina <jikos@kernel.org> - 2016-01-13 10:40 +0100
Re: livepatch: reuse module loader code to write relocations Jessica Yu <jeyu@redhat.com> - 2016-01-13 19:40 +0100
Re: livepatch: reuse module loader code to write relocations Miroslav Benes <mbenes@suse.cz> - 2016-01-14 10:20 +0100
csiph-web