Re: Regression: Requiring CAP_SYS_ADMIN for /proc/<pid>/pagemap causes application-level breakage

From: Mark Williamson
Date: Thu Apr 30 2015 - 14:32:53 EST


Hi all,

On Thu, Apr 30, 2015 at 2:11 PM, Konstantin Khlebnikov <koct9i@xxxxxxxxx> wrote:
> On Thu, Apr 30, 2015 at 2:43 PM, Konstantin Khlebnikov <koct9i@xxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/