Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755790AbbBLN0r (ORCPT ); Thu, 12 Feb 2015 08:26:47 -0500 Received: from mail-wg0-f41.google.com ([74.125.82.41]:51664 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755714AbbBLN0p (ORCPT ); Thu, 12 Feb 2015 08:26:45 -0500 Message-ID: <54DCAA12.9070400@suse.cz> Date: Thu, 12 Feb 2015 14:26:42 +0100 From: Jiri Slaby User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Josh Poimboeuf , Ingo Molnar , Peter Zijlstra CC: Masami Hiramatsu , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Seth Jennings , Jiri Kosina , Vojtech Pavlik Subject: Re: [RFC PATCH 6/9] livepatch: create per-task consistency model References: <2c3d1e685dae5cccc2dfdb1b24c241b2f1c89348.1423499826.git.jpoimboe@redhat.com> <20150212032121.GA18578@treble.redhat.com> In-Reply-To: <20150212032121.GA18578@treble.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1193 Lines: 31 On 02/12/2015, 04:21 AM, Josh Poimboeuf wrote: > Ingo, Peter, > > Would you have any objections to making task_rq_lock/unlock() non-static > (or moving them to kernel/sched/sched.h) so they can be called by the > livepatch code? > > To provide some background, I'm looking for a way to temporarily prevent > a sleeping task from running while its stack is examined, to decide > whether it can be safely switched to the new patching "universe". For > more details see klp_transition_task() in the patch below. > > Using task_rq_lock() is the most straightforward way I could find to > achieve that. Hi, I cannot speak whether it is the proper way or not. But if so, would it make sense to do the opposite: expose an API to walk through the processes' stack and make the decision? Concretely, move parts of klp_stacktrace_address_verify_func to sched.c or somewhere in kernel/sched/ and leave task_rq_lock untouched. regards, -- js 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/