Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753859AbbBJI5r (ORCPT ); Tue, 10 Feb 2015 03:57:47 -0500 Received: from cantor2.suse.de ([195.135.220.15]:52724 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751971AbbBJI5q (ORCPT ); Tue, 10 Feb 2015 03:57:46 -0500 Date: Tue, 10 Feb 2015 09:57:44 +0100 (CET) From: Jiri Kosina To: Josh Poimboeuf cc: Seth Jennings , Vojtech Pavlik , Masami Hiramatsu , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/9] livepatch: consistency model In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1511 Lines: 31 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/