Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030504AbVIOPq6 (ORCPT ); Thu, 15 Sep 2005 11:46:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030487AbVIOPq5 (ORCPT ); Thu, 15 Sep 2005 11:46:57 -0400 Received: from ppp-217-133-42-200.cust-adsl.tiscali.it ([217.133.42.200]:39239 "EHLO opteron.random") by vger.kernel.org with ESMTP id S1030504AbVIOPq5 (ORCPT ); Thu, 15 Sep 2005 11:46:57 -0400 Date: Thu, 15 Sep 2005 17:47:02 +0200 From: Andrea Arcangeli To: Linus Torvalds Cc: Hugh Dickins , Nick Piggin , linux-kernel@vger.kernel.org, Andrew Morton , Roland McGrath Subject: Re: ptrace can't be transparent on readonly MAP_SHARED Message-ID: <20050915154702.GA4122@opteron.random> References: <20050914212405.GD4966@opteron.random> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1196 Lines: 29 On Thu, Sep 15, 2005 at 08:12:59AM -0700, Linus Torvalds wrote: > have a PROT_READONLY/PROT_NONE area that is visible from the debugger, but > continues to cause SIGSEGV's if the user process itself tries to access > it. To me, that's good. Continue to cause sigsegv yes, but on the wrong page, when it will read the page it can contain different data compared to what is on disk/pagecache. > There would have to be some real advantage to _not_ doing what we're doing > now. And I don't see an advantage. The advantage is a faster fast path and less special cases to keep in mind. > The real complexity is not "maybe_mkwrite()", which is trivial. The real It is trivial yes, but for it to work without deadlocks, it requires non-trivial changes to the page fault handler and get_user_pages. I guess this is mostly a matter of taste, but my taste is about keeping it simple and fast (though the difference is certainly not measurable). Thanks. - 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/