Messages in this thread | | | Date | Mon, 19 Jan 2015 08:54:31 -0600 | From | Josh Poimboeuf <> | Subject | Re: [PATCH] livepatch: support for repatching a function |
| |
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 concerned about, in a nutshell: > > foo_unpatched() > foo_patch1() > foo_patch2() > foo_patch3() > disable(foo_patch2) > disable(foo_patch3) > foo_patch1() > > I.e. basically due to reverting of foo_patch2() while it wasn't in use, we > turn subsequent revert of foo_patch3() into foo_patch1() state, although > the function foo_patch3() was originally patching was foo_patch2(). > > 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, I agree. Thanks for the comment.
Would you want to enforce stacking even if there are no dependencies between the patches? I think that would be easiest (and cleanest).
-- Josh
| |