From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail6.bemta12.messagelabs.com (mail6.bemta12.messagelabs.com [216.82.250.247]) by kanga.kvack.org (Postfix) with ESMTP id 8EA5D6B0012 for ; Wed, 15 Jun 2011 13:38:22 -0400 (EDT) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QWu2k-0002Vt-TA for linux-mm@kvack.org; Wed, 15 Jun 2011 17:38:19 +0000 Received: from j77219.upc-j.chello.nl ([24.132.77.219] helo=dyad.programming.kicks-ass.net) by canuck.infradead.org with esmtpsa (Exim 4.76 #1 (Red Hat Linux)) id 1QWu2k-0004eE-E2 for linux-mm@kvack.org; Wed, 15 Jun 2011 17:38:18 +0000 Subject: Re: [PATCH v4 3.0-rc2-tip 4/22] 4: Uprobes: register/unregister probes. From: Peter Zijlstra 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 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: 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 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, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org