Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757581AbZDUSRr (ORCPT ); Tue, 21 Apr 2009 14:17:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755058AbZDUSRh (ORCPT ); Tue, 21 Apr 2009 14:17:37 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:45318 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754767AbZDUSRg (ORCPT ); Tue, 21 Apr 2009 14:17:36 -0400 Date: Tue, 21 Apr 2009 14:17:33 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Tim Abbott cc: Rusty Russell , LKML , Ingo Molnar , Andrew Morton , Thomas Gleixner , Peter Zijlstra , Frederic Weisbecker , Anders Kaseorg , Jeffrey B Arnold , Arjan van de Ven Subject: Re: [PATCH 1/5] ftrace: use module notifier for function tracer In-Reply-To: Message-ID: References: <20090416021830.556671772@goodmis.org> <20090416021928.040177084@goodmis.org> <200904192055.04213.rusty@rustcorp.com.au> User-Agent: Alpine 2.00 (DEB 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: 1589 Lines: 43 [ added Arjan ] On Tue, 21 Apr 2009, Tim Abbott wrote: > On Sun, 19 Apr 2009, Rusty Russell wrote: > > > I think you need to do something else in general. Share the module_mutex for > > the ftrace code? The ksplice guys have a similar issue, so maybe we should > > generalize this into a "kernel_text" mutex? > > Yes, a kernel_text mutex is on my list of things to propose once Ksplice > gets merged. > > There are at present several systems that modify the kernel text after a > machine is booted (e.g. dynamic ftrace and toggling of smp_locks when > hotplugging a cpu). Currently, they avoid stepping on each other by only > making changes inside stop_machine. > > However, Ksplice does its run-pre matching checks outside stop_machine, Does Ksplice use break points to do the modification? I'd be interested in knowing how Ksplice protects against the nastiness of code executing on one CPU that is being modified by another CPU. -- Steve > and Ksplice needs a way to prevent e.g. dynamic ftrace from changing the > code out from under it between those checks and actually applying the > patches [1]. A kernel_text mutex would be a reasonable solution to this > problem. > > -Tim Abbott > > [1] At present this isn't a real problem because Ksplice and ftrace > conflict with each other for unrelated reasons. > -- 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/