Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751199AbbD3NWs (ORCPT ); Thu, 30 Apr 2015 09:22:48 -0400 Received: from mta-out1.inet.fi ([62.71.2.227]:56300 "EHLO jenni2.inet.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750719AbbD3NWp (ORCPT ); Thu, 30 Apr 2015 09:22:45 -0400 Date: Thu, 30 Apr 2015 16:22:30 +0300 From: "Kirill A. Shutemov" To: Konstantin Khlebnikov Cc: Linus Torvalds , Mark Williamson , Mark Seaborn , kernel list , "Kirill A. Shutemov" , Pavel Emelyanov , Andrew Morton , Andy Lutomirski , Linux API , Finn Grimwood , Daniel James Subject: Re: Regression: Requiring CAP_SYS_ADMIN for /proc//pagemap causes application-level breakage Message-ID: <20150430132230.GE15874@node.dhcp.inet.fi> References: <20150429193622.GA11892@node.dhcp.inet.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1364 Lines: 34 On Thu, Apr 30, 2015 at 04:11:30PM +0300, Konstantin Khlebnikov wrote: > On Thu, Apr 30, 2015 at 2:43 PM, Konstantin Khlebnikov wrote: > > On Thu, Apr 30, 2015 at 12:02 AM, Linus Torvalds > > wrote: > >> On Wed, Apr 29, 2015 at 1:44 PM, Konstantin Khlebnikov wrote: > >>> > >>> This's no longer true. After recent fixes for "anon_vma endless growing" new vma > >>> might reuse old anon_vma from grandparent vma. > >> > >> Oh well. I guess that was too simple. > >> > >> If Mark is ok with the rule that "it's not reliably if you have two > >> nested forks" (ie it only works if you exec for every fork you do), it > >> should still work, right? It sounds like Mark doesn't necessarily need > >> to handle the *generic* case. > > > > What about exposing shared/exclusive bit in pagemap == 1 if > > page_mapcount() > 1, otherwise 0 (or vise versa). > > > > Seems like this should work for detecting CoWed pages in child mm. > > Something like this (see patch in attachment) THP is not covered. Any comments on kcmp() idea? -- Kirill A. Shutemov -- 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/