Re: [PATCH] livepatch: support for repatching a function

2015-01-20 Thread Josh Poimboeuf
On Tue, Jan 20, 2015 at 10:56:33AM +0100, Miroslav Benes wrote: > On Fri, 9 Jan 2015, Josh Poimboeuf wrote: > > +struct klp_ops { > > + struct list_head node; > > + struct list_head func_stack; > > + struct ftrace_ops fops; > > +}; > > I think it would be useful to add some comments for this

Re: [PATCH] livepatch: support for repatching a function

2015-01-20 Thread Miroslav Benes
On Fri, 9 Jan 2015, Josh Poimboeuf wrote: > Add support for patching a function multiple times. If multiple patches > affect a function, the function in the most recently enabled patch > "wins". This enables a cumulative patch upgrade path, where each patch > is a superset of previous patches.

Re: [PATCH] livepatch: support for repatching a function

2015-01-19 Thread Josh Poimboeuf
On Mon, Jan 19, 2015 at 08:48:42PM +0100, Jiri Kosina wrote: > On Mon, 19 Jan 2015, Josh Poimboeuf wrote: > > > > If this is implemented really in a fully stackable manner (i.e. you > > > basically would be able to disable only the function that is currently > > > "active", i.e. on top of the st

Re: [PATCH] livepatch: support for repatching a function

2015-01-19 Thread Jiri Kosina
On Mon, 19 Jan 2015, Josh Poimboeuf wrote: > > If this is implemented really in a fully stackable manner (i.e. you > > basically would be able to disable only the function that is currently > > "active", i.e. on top of the stack), woudln't that provide more > > predictable semantics? > > Yes,

Re: [PATCH] livepatch: support for repatching a function

2015-01-19 Thread Josh Poimboeuf
On Fri, Jan 16, 2015 at 05:51:11PM +0100, Jiri Kosina wrote: > One thing that makes me worried here is we basically apply patches in a > 'stackable' manner, but then this allows them to be removed (disabled) in > an arbitrary order. Is this really the semantics we want? > > The scenario I am con

Re: [PATCH] livepatch: support for repatching a function

2015-01-16 Thread Jiri Kosina
On Fri, 9 Jan 2015, Josh Poimboeuf wrote: > Add support for patching a function multiple times. If multiple patches > affect a function, the function in the most recently enabled patch > "wins". This enables a cumulative patch upgrade path, where each patch > is a superset of previous patches. >

[PATCH] livepatch: support for repatching a function

2015-01-09 Thread Josh Poimboeuf
Add support for patching a function multiple times. If multiple patches affect a function, the function in the most recently enabled patch "wins". This enables a cumulative patch upgrade path, where each patch is a superset of previous patches. This requires restructuring the data a little bit.