Re: [RFC PATCH v4 4/6] livepatch: reuse module loader code to write relocations

2016-02-09 Thread Petr Mladek
On Wed 2016-02-03 20:11:09, Jessica Yu wrote: > Reuse module loader code to write relocations, thereby eliminating the need > for architecture specific relocation code in livepatch. Specifically, reuse > the apply_relocate_add() function in the module loader to write relocations > instead of

Re: [RFC PATCH v4 4/6] livepatch: reuse module loader code to write relocations

2016-02-09 Thread Miroslav Benes
> > +/* .klp.sym.[objname].symbol_name,sympos */ > > +static int klp_get_sym_objname(char *s, char **result) > > +{ > > Do we need result to be a double-pointer? If I am not mistaken just 'char > *result' could be sufficient. You check the return value, so result could > be NULL or objname as

Re: [RFC PATCH v4 4/6] livepatch: reuse module loader code to write relocations

2016-02-09 Thread Miroslav Benes
On Tue, 9 Feb 2016, Petr Mladek wrote: > On Wed 2016-02-03 20:11:09, Jessica Yu wrote: > > Reuse module loader code to write relocations, thereby eliminating the need > > for architecture specific relocation code in livepatch. Specifically, reuse > > the apply_relocate_add() function in the

[RFC PATCH v4 4/6] livepatch: reuse module loader code to write relocations

2016-02-03 Thread Jessica Yu
Reuse module loader code to write relocations, thereby eliminating the need for architecture specific relocation code in livepatch. Specifically, reuse the apply_relocate_add() function in the module loader to write relocations instead of duplicating functionality in livepatch's arch-dependent