Re: [PATCH v14 08/11] livepatch: Remove Nop structures when unused

2018-12-17 Thread Josh Poimboeuf
On Mon, Dec 17, 2018 at 04:54:53PM +0100, Petr Mladek wrote: > On Thu 2018-12-13 17:00:45, Josh Poimboeuf wrote: > > On Thu, Nov 29, 2018 at 10:44:28AM +0100, Petr Mladek wrote: > > > +static void __klp_free_funcs(struct klp_object *obj, bool free_all) > > > { > > > - struct klp_func *func; > > >

Re: [PATCH v14 08/11] livepatch: Remove Nop structures when unused

2018-12-17 Thread Petr Mladek
On Thu 2018-12-13 17:00:45, Josh Poimboeuf wrote: > On Thu, Nov 29, 2018 at 10:44:28AM +0100, Petr Mladek wrote: > > +static void __klp_free_funcs(struct klp_object *obj, bool free_all) > > { > > - struct klp_func *func; > > + struct klp_func *func, *tmp_func; > > + > > +

Re: [PATCH v14 08/11] livepatch: Remove Nop structures when unused

2018-12-13 Thread Josh Poimboeuf
On Thu, Nov 29, 2018 at 10:44:28AM +0100, Petr Mladek wrote: > +static void __klp_free_funcs(struct klp_object *obj, bool free_all) > { > - struct klp_func *func; > + struct klp_func *func, *tmp_func; > + > + klp_for_each_func_safe(obj, func, tmp_func) { > + if (!free_all

Re: [PATCH v14 08/11] livepatch: Remove Nop structures when unused

2018-12-05 Thread Joe Lawrence
On Thu, Nov 29, 2018 at 10:44:28AM +0100, Petr Mladek wrote: > Replaced patches are removed from the stack when the transition is > finished. It means that Nop structures will never be needed again > and can be removed. Why should we care? > > + Nop structures make false feeling that the

Re: [PATCH v14 08/11] livepatch: Remove Nop structures when unused

2018-12-05 Thread Joe Lawrence
On Thu, Nov 29, 2018 at 10:44:28AM +0100, Petr Mladek wrote: > Replaced patches are removed from the stack when the transition is > finished. It means that Nop structures will never be needed again > and can be removed. Why should we care? > > + Nop structures make false feeling that the

Re: [PATCH v14 08/11] livepatch: Remove Nop structures when unused

2018-12-04 Thread Miroslav Benes
On Thu, 29 Nov 2018, Petr Mladek wrote: > Replaced patches are removed from the stack when the transition is > finished. It means that Nop structures will never be needed again > and can be removed. Why should we care? > > + Nop structures make false feeling that the function is patched >

Re: [PATCH v14 08/11] livepatch: Remove Nop structures when unused

2018-12-04 Thread Miroslav Benes
On Thu, 29 Nov 2018, Petr Mladek wrote: > Replaced patches are removed from the stack when the transition is > finished. It means that Nop structures will never be needed again > and can be removed. Why should we care? > > + Nop structures make false feeling that the function is patched >

[PATCH v14 08/11] livepatch: Remove Nop structures when unused

2018-11-29 Thread Petr Mladek
Replaced patches are removed from the stack when the transition is finished. It means that Nop structures will never be needed again and can be removed. Why should we care? + Nop structures make false feeling that the function is patched even though the ftrace handler has no effect. +

[PATCH v14 08/11] livepatch: Remove Nop structures when unused

2018-11-29 Thread Petr Mladek
Replaced patches are removed from the stack when the transition is finished. It means that Nop structures will never be needed again and can be removed. Why should we care? + Nop structures make false feeling that the function is patched even though the ftrace handler has no effect. +