Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752738AbbD3Sct (ORCPT ); Thu, 30 Apr 2015 14:32:49 -0400 Received: from mail-la0-f54.google.com ([209.85.215.54]:36033 "EHLO mail-la0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752665AbbD3Scb (ORCPT ); Thu, 30 Apr 2015 14:32:31 -0400 MIME-Version: 1.0 In-Reply-To: References: <20150429193622.GA11892@node.dhcp.inet.fi> Date: Thu, 30 Apr 2015 19:32:29 +0100 Message-ID: Subject: Re: Regression: Requiring CAP_SYS_ADMIN for /proc//pagemap causes application-level breakage From: Mark Williamson To: Konstantin Khlebnikov Cc: Linus Torvalds , "Kirill A. Shutemov" , Mark Seaborn , kernel list , "Kirill A. Shutemov" , Pavel Emelyanov , Andrew Morton , Andy Lutomirski , Linux API , Finn Grimwood , Daniel James Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1149 Lines: 29 Hi all, On Thu, Apr 30, 2015 at 2:11 PM, Konstantin Khlebnikov wrote: > On Thu, Apr 30, 2015 at 2:43 PM, Konstantin Khlebnikov wrote: >> 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) Either something like this patch (updated to cover THPs), or Linus's suggestion seems worth a try. Could I perhaps get a steer on which would be more likely to be accepted / preferred? Either way, we'd want to expose the resulting flag somewhere within pagemap. We could do this either within the normal flags region, or potentially even repurpose one of the (now censored) physical bits. If there's a general feeling then I'll update my work-in-progress and post it here. Thanks, Mark -- 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/