Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755871AbbBLPYe (ORCPT ); Thu, 12 Feb 2015 10:24:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54840 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755372AbbBLPYd (ORCPT ); Thu, 12 Feb 2015 10:24:33 -0500 Date: Thu, 12 Feb 2015 09:24:05 -0600 From: Josh Poimboeuf To: Jiri Kosina Cc: Peter Zijlstra , Jiri Slaby , Ingo Molnar , Masami Hiramatsu , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Seth Jennings , Vojtech Pavlik Subject: Re: [RFC PATCH 6/9] livepatch: create per-task consistency model Message-ID: <20150212152405.GE18578@treble.redhat.com> References: <2c3d1e685dae5cccc2dfdb1b24c241b2f1c89348.1423499826.git.jpoimboe@redhat.com> <20150212032121.GA18578@treble.redhat.com> <20150212115628.GL2896@worktop.programming.kicks-ass.net> <20150212125149.GB18578@treble.redhat.com> <20150212130817.GV23123@twins.programming.kicks-ass.net> <54DCA7AC.3080602@suse.cz> <20150212133540.GZ23123@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1161 Lines: 24 On Thu, Feb 12, 2015 at 03:08:38PM +0100, Jiri Kosina wrote: > On Thu, 12 Feb 2015, Peter Zijlstra wrote: > I personally am not a big fan of the task_rq_lock() public exposure > either. What might be generally useful though (not only for livepatching) > would be an API that would allow for "safe" stack dump (where "safe" means > that guarantee, that it wouldn't be interferred by process waking up in > the middle of dumping, would be provided). In general, I think a safe stack dump is needed. A lot of the stack dumping in the kernel seems dangerous. For example, it looks like doing a `cat /proc/pid/stack` while the process is writing the stack could easily go off into the weeds. But I don't see how it would help the livepatch case. What happens if the process starts running in the to-be-patched function after we call the "safe" dump_stack() but before switching it to the new universe? -- Josh -- 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/