Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752818Ab1FORiW (ORCPT ); Wed, 15 Jun 2011 13:38:22 -0400 Received: from merlin.infradead.org ([205.233.59.134]:55122 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752251Ab1FORiV (ORCPT ); Wed, 15 Jun 2011 13:38:21 -0400 Subject: Re: [PATCH v4 3.0-rc2-tip 4/22] 4: Uprobes: register/unregister probes. From: Peter Zijlstra To: Srikar Dronamraju Cc: Ingo Molnar , Steven Rostedt , Linux-mm , Arnaldo Carvalho de Melo , Linus Torvalds , Ananth N Mavinakayanahalli , Hugh Dickins , Christoph Hellwig , Jonathan Corbet , Thomas Gleixner , Masami Hiramatsu , Oleg Nesterov , Andrew Morton , Jim Keniston , Roland McGrath , Andi Kleen , LKML In-Reply-To: <20110607125900.28590.16071.sendpatchset@localhost6.localdomain6> References: <20110607125804.28590.92092.sendpatchset@localhost6.localdomain6> <20110607125900.28590.16071.sendpatchset@localhost6.localdomain6> Content-Type: text/plain; charset="UTF-8" Date: Wed, 15 Jun 2011 19:41:59 +0200 Message-ID: <1308159719.2171.57.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1315 Lines: 37 On Tue, 2011-06-07 at 18:29 +0530, Srikar Dronamraju wrote: > 1. Use mm->owner and walk thro the thread_group of mm->owner, siblings > of mm->owner, siblings of parent of mm->owner. This should be > good list to traverse. Not sure if this is an exhaustive > enough list that all tasks that have a mm set to this mm_struct are > walked through. As per copy_process(): /* * Thread groups must share signals as well, and detached threads * can only be started up within the thread group. */ if ((clone_flags & CLONE_THREAD) && !(clone_flags & CLONE_SIGHAND)) return ERR_PTR(-EINVAL); /* * Shared signal handlers imply shared VM. By way of the above, * thread groups also imply shared VM. Blocking this case allows * for various simplifications in other code. */ if ((clone_flags & CLONE_SIGHAND) && !(clone_flags & CLONE_VM)) return ERR_PTR(-EINVAL); CLONE_THREAD implies CLONE_VM, but not the other way around, we therefore would be able to CLONE_VM and not be part of the primary owner's thread group. This is of course all terribly sad.. -- 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/