[lkml]   [2015]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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).


 \ /
  Last update: 2015-01-19 16:01    [W:0.091 / U:11.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site