Re: [RFC PATCH v4 2/6] module: preserve Elf information for livepatch modules

2016-02-10 Thread Petr Mladek
On Wed 2016-02-03 20:11:07, Jessica Yu wrote: > diff --git a/kernel/module.c b/kernel/module.c > index 71c77ed..9c16eb2 100644 > --- a/kernel/module.c > +++ b/kernel/module.c > @@ -2676,6 +2764,23 @@ static int copy_module_from_user(const void __user > *umod, unsigned long len, > return 0; >

Re: [RFC PATCH v4 2/6] module: preserve Elf information for livepatch modules

2016-02-09 Thread Rusty Russell
Petr Mladek writes: > On Tue 2016-02-09 11:33:07, Jiri Kosina wrote: >> On Tue, 9 Feb 2016, Petr Mladek wrote: >> >> > > +#ifdef CONFIG_KALLSYMS >> > > +/* Make symtab and strtab available prior to module init call */ >> > > +mod->num_symtab = mod->core_num_syms; >> > > +m

Re: [RFC PATCH v4 2/6] module: preserve Elf information for livepatch modules

2016-02-09 Thread Petr Mladek
On Tue 2016-02-09 11:33:07, Jiri Kosina wrote: > On Tue, 9 Feb 2016, Petr Mladek wrote: > > > > +#ifdef CONFIG_KALLSYMS > > > + /* Make symtab and strtab available prior to module init call */ > > > + mod->num_symtab = mod->core_num_syms; > > > + mod->symtab = mod->core_symtab; > > > + mod->strtab

Re: [RFC PATCH v4 2/6] module: preserve Elf information for livepatch modules

2016-02-09 Thread Jiri Kosina
On Tue, 9 Feb 2016, Petr Mladek wrote: > > +#ifdef CONFIG_KALLSYMS > > + /* Make symtab and strtab available prior to module init call */ > > + mod->num_symtab = mod->core_num_syms; > > + mod->symtab = mod->core_symtab; > > + mod->strtab = mod->core_strtab; > > +#endif > > This should be

Re: [RFC PATCH v4 2/6] module: preserve Elf information for livepatch modules

2016-02-09 Thread Petr Mladek
On Wed 2016-02-03 20:11:07, Jessica Yu wrote: > For livepatch modules, copy Elf section, symbol, and string information > from the load_info struct in the module loader. Persist copies of the > original symbol table and string table. > > Livepatch manages its own relocation sections in order to re

Re: [RFC PATCH v4 2/6] module: preserve Elf information for livepatch modules

2016-02-08 Thread Josh Poimboeuf
On Wed, Feb 03, 2016 at 08:11:07PM -0500, Jessica Yu wrote: > For livepatch modules, copy Elf section, symbol, and string information > from the load_info struct in the module loader. Persist copies of the > original symbol table and string table. > > Livepatch manages its own relocation sections

[RFC PATCH v4 2/6] module: preserve Elf information for livepatch modules

2016-02-03 Thread Jessica Yu
For livepatch modules, copy Elf section, symbol, and string information from the load_info struct in the module loader. Persist copies of the original symbol table and string table. Livepatch manages its own relocation sections in order to reuse module loader code to write relocations. Livepatch m