[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1502100954210.10719@pobox.suse.cz>
Date: Tue, 10 Feb 2015 09:57:44 +0100 (CET)
From: Jiri Kosina <jkosina@...e.cz>
To: Josh Poimboeuf <jpoimboe@...hat.com>
cc: Seth Jennings <sjenning@...hat.com>,
Vojtech Pavlik <vojtech@...e.cz>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
live-patching@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 0/9] livepatch: consistency model
On Mon, 9 Feb 2015, Josh Poimboeuf wrote:
> 2) As mentioned above, kthreads which are always sleeping on a patched function
> will never transition to the new universe. This is really a minor issue
> (less than 1% of patches). It's not necessarily something that needs to be
> resolved with this patch set, but it would be good to have some discussion
> about it regardless.
>
> To overcome this issue, I have 1/2 an idea: we could add some stack checking
> code to the ftrace handler itself to transition the kthread to the new
> universe after it re-enters the function it was originally sleeping on, if
> the stack doesn't already have have any other to-be-patched functions.
> Combined with the klp_transition_work_fn()'s periodic stack checking of
> sleeping tasks, that would handle most of the cases (except when trying to
> patch the high-level thread_fn itself).
>
> But then how do you make the kthread wake up? As far as I can tell,
> wake_up_process() doesn't seem to work on a kthread (unless I messed up my
> testing somehow). What does kGraft do in this case?
wake_up_process() really should work for (p->flags & PF_KTHREAD)
task_struct. What was your testing scenario?
--
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