[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1405201134100.1615@pobox.suse.cz>
Date: Tue, 20 May 2014 11:37:16 +0200 (CEST)
From: Jiri Kosina <jkosina@...e.cz>
To: Josh Poimboeuf <jpoimboe@...hat.com>
cc: Steven Rostedt <rostedt@...dmis.org>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Ingo Molnar <mingo@...nel.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Seth Jennings <sjenning@...hat.com>,
Ingo Molnar <mingo@...hat.com>, Jiri Slaby <jslaby@...e.cz>,
linux-kernel@...r.kernel.org,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC PATCH 0/2] kpatch: dynamic kernel patching
On Fri, 16 May 2014, Josh Poimboeuf wrote:
> > Consider this scenario:
> >
> > void foo()
> > {
> > for (i=0; i<10000; i++) {
> > bar(i);
> > something_else(i);
> > }
> > }
> >
> > Let's say you want to live-patch bar(). With stop_machine()-based aproach,
> > you can easily end-up with old bar() and new bar() being called in two
> > consecutive iterations before the loop is even exited, right? (especially
> > on preemptible kernel, or if something_else() goes to sleep).
>
> Can you clarify why this would be a problem? Is it because the new
> bar() changed some data semantics which confused foo() or
> something_else()?
I guess the example I used wasn't really completely illustrative, sorry
for that. But I guess this has been answered later in the thread already;
the thing is that you don't have a complete callgraph available (at least
I believe you don't ...?), so you don't really know where your patched
function will be called from, and thus you can't change function arguments
or return value semantics; with lazy aproach, you can do that.
Thanks,
--
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists