From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932755Ab0EMUCy (ORCPT ); Thu, 13 May 2010 16:02:54 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:45578 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756473Ab0EMUCv (ORCPT ); Thu, 13 May 2010 16:02:51 -0400 Date: Thu, 13 May 2010 12:59:23 -0700 (PDT) From: Linus Torvalds To: Oleg Nesterov cc: Peter Zijlstra , Srikar Dronamraju , Ingo Molnar , Andrew Morton , Masami Hiramatsu , Randy Dunlap , Ananth N Mavinakayanahalli , Jim Keniston , Frederic Weisbecker , "Frank Ch. Eigler" , LKML , Roland McGrath , Mel Gorman , "Paul E. McKenney" , Andrea Arcangeli , Hugh Dickins , Rik van Riel Subject: Re: [PATCH v2 7/11] Uprobes Implementation In-Reply-To: <20100513194034.GA11207@redhat.com> Message-ID: References: <20100413183537.GA17538@redhat.com> <20100415093506.GA2064@linux.vnet.ibm.com> <20100419193139.GA24080@redhat.com> <20100420124358.GA20675@linux.vnet.ibm.com> <20100420153023.GA9351@redhat.com> <20100421065948.GA5440@linux.vnet.ibm.com> <20100421160515.GA11321@redhat.com> <20100422133154.GA10776@linux.vnet.ibm.com> <20100422154059.GA5916@redhat.com> <1273610723.1810.105.camel@laptop> <20100513194034.GA11207@redhat.com> User-Agent: Alpine 2.00 (LFD 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 On Thu, 13 May 2010, Oleg Nesterov wrote: > > But I still think this doesn't actually matter, replace_page() shouldn't > preserve the mapping, it should always install the anonymous page. I can > be wrong, of course. Well, if I reasd the patches right, uprobes will use "copy_to_user()" for the self-probing case. So that would definitely just modify a shared mapping. Of course, arguably, who really cares? As long as it's not a security issue (and it isn't - since the person could just have written to the thing directly instead), I guess it doesn't much matter. But it's a bit sad when a probing feature either - changes a global mapping that may be executed by other non-related processes that the prober isn't even _aware_ of. - changes semantics by creating a non-coherent private page so arguably it would be good to just make the rule be that you cannot probe a shared mapping. Because whatever you do, it's always the wrong thing. Linus